CN111291543A - Data display method and device, storage medium and processor - Google Patents

Data display method and device, storage medium and processor Download PDF

Info

Publication number
CN111291543A
CN111291543A CN201811393419.2A CN201811393419A CN111291543A CN 111291543 A CN111291543 A CN 111291543A CN 201811393419 A CN201811393419 A CN 201811393419A CN 111291543 A CN111291543 A CN 111291543A
Authority
CN
China
Prior art keywords
color
field
target
mapping table
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811393419.2A
Other languages
Chinese (zh)
Other versions
CN111291543B (en
Inventor
钟艺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201811393419.2A priority Critical patent/CN111291543B/en
Publication of CN111291543A publication Critical patent/CN111291543A/en
Application granted granted Critical
Publication of CN111291543B publication Critical patent/CN111291543B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses a data display method and device, a storage medium and a processor. The method comprises the following steps: determining a field of a color to be configured in a target table according to a preset rule, wherein the field of the color to be configured is a row name field and/or a column name field to which data in the target table belongs; creating a color mapping table according to the field of the color to be configured, wherein keys of the color mapping table correspond to the field of the color to be configured, and values of the color mapping table correspond to configuration colors of data under the field of the color to be configured; and drawing a visual chart by utilizing the target table and the color mapping table. By the method and the device, the problem that characteristics of data under different fields are difficult to display conveniently when the chart data are displayed by adopting the chart in the related technology is solved.

Description

Data display method and device, storage medium and processor
Technical Field
The present application relates to the field of data display, and in particular, to a method and an apparatus for displaying data, a storage medium, and a processor.
Background
After the data is counted in the table, in order to more intuitively display the table data, the data can be displayed by means of a histogram or a sector graph, so that the distribution characteristics of the data are highlighted. In order to make data display more intuitive, a scheme of distinguishing different data by colors in a chart also appears in the related art, but the scheme is mainly performed under the same classification dimension, different colors are distributed for data belonging to different categories under the same classification dimension, when the classification is complex, the same field of table data belongs to different categories under different classification standards, the characteristics of the data under the field under different classification dimensions need to be displayed and analyzed in the chart, the matching of the data and the colors is complicated, and when fields needing attention are changed to be redrawn, the colors and the data need to be corresponding one by one, so that the workload is large, and errors are easy to occur.
Aiming at the problem that the characteristics of data under different fields are difficult to conveniently show when table data is displayed by using a chart in the related art, an effective solution is not provided at present.
Disclosure of Invention
The present application mainly aims to provide a data display method and apparatus, a storage medium, and a processor, so as to solve the problem that it is difficult to conveniently display characteristics of data in different fields when table data is displayed by using a chart in the related art.
In order to achieve the above object, according to one aspect of the present application, there is provided a display method of data. The method comprises the following steps: determining a field of a color to be configured in a target table according to a preset rule, wherein the field of the color to be configured is a row name field and/or a column name field to which data in the target table belongs; creating a color mapping table according to the field of the color to be configured, wherein keys of the color mapping table correspond to the field of the color to be configured, and values of the color mapping table correspond to configuration colors of data under the field of the color to be configured; and drawing a visual chart by utilizing the target table and the color mapping table.
Further, determining the field of the color to be configured in the target table according to the preset rule includes: determining a target chart type, wherein the target chart type is a type of a visual chart to be drawn based on data in a target table; determining a plurality of target fields in a target table, wherein the plurality of target fields at least belong to one classification dimension, and the classification dimension is used for classifying the plurality of target fields; judging whether the number of the classification dimensions of the plurality of target fields is less than or equal to the number of the classification dimensions supported by the target chart type; and under the condition that the number of the classification dimensions of the plurality of target fields is less than or equal to the number of the classification dimensions supported by the target chart type, determining the plurality of target fields as the fields of the colors to be configured.
Further, creating the color mapping table according to the field to be configured with the color comprises: creating a temporary mapping table; determining the identifier of the field to be configured with the color as a key of the temporary mapping table; taking the color value configured for the field of the color to be configured as the value of the temporary mapping table; and obtaining the color mapping table according to the keys of the temporary mapping table and the values of the temporary mapping table.
Further, still include: and adjusting the key corresponding to the field of the color to be configured in the temporary mapping table/color mapping table and/or the value corresponding to the key.
Further, still include: and when detecting that the fields of the colors to be configured in the temporary mapping table which are configured already cause conflict, prompting the conflict.
Further, the chart type is a histogram, and drawing the visual chart by using the target table and the color mapping table comprises: setting fields for completing color configuration on a target coordinate axis of the histogram in sequence; and determining the height of the rectangle corresponding to the field which completes the color configuration on the target coordinate axis based on the data value under the field which completes the color configuration.
In order to achieve the above object, according to another aspect of the present application, there is provided a display device of data. The device includes: the device comprises a determining unit, a color setting unit and a color setting unit, wherein the determining unit is used for determining a field of a color to be configured in a target table according to a preset rule, and the field of the color to be configured is a row name field and/or a column name field to which data in the target table belongs; the system comprises a creating unit, a color mapping unit and a color mapping unit, wherein the creating unit is used for creating a color mapping table according to a field of a color to be configured, keys of the color mapping table correspond to the field of the color to be configured, and values of the color mapping table correspond to configuration colors of data under the field of the color to be configured; and the drawing unit is used for drawing a visual chart by utilizing the target table and the color mapping table.
Further, the determination unit includes: the first determination module is used for determining a target chart type, wherein the target chart type is the type of a visual chart to be drawn based on data in a target table; a second determining module, configured to determine a plurality of target fields in a target table, where the plurality of target fields belong to at least one classification dimension, and the classification dimension is used to classify the plurality of target fields; the judging module is used for judging whether the number of the classification dimensionalities of the target fields is less than or equal to the number of the classification dimensionalities supported by the target chart type; and the third determining module is used for determining the plurality of target fields as the fields of the colors to be configured under the condition that the number of the classification dimensions of the plurality of target fields is less than or equal to the number of the classification dimensions supported by the target chart type.
Further, the creating unit includes: a creating module for creating a temporary mapping table; a fourth determining module, configured to determine that an identifier of the field to be configured with the color is a key of the temporary mapping table; taking the color value configured for the field of the color to be configured as the value of the temporary mapping table; and obtaining the color mapping table according to the keys of the temporary mapping table and the values of the temporary mapping table.
In order to achieve the above object, according to another aspect of the present application, there is provided a storage medium including a stored program, wherein the program performs any one of the above-described data display methods.
In order to achieve the above object, according to another aspect of the present application, there is provided a processor for executing a program, wherein the program executes a display method of any one of the above data.
Through the application, the following steps are adopted: determining a field of a color to be configured in a target table according to a preset rule, wherein the field of the color to be configured is a row name field and/or a column name field to which data in the target table belongs; creating a color mapping table according to the field of the color to be configured, wherein keys of the color mapping table correspond to the field of the color to be configured, and values of the color mapping table correspond to configuration colors of data under the field of the color to be configured; the visual chart is drawn by utilizing the target table and the color mapping table, and the problem that the characteristics of data under different fields are difficult to display conveniently when the chart is adopted to display the table data in the related technology is solved. And creating a color mapping table according to the fields to be configured with colors, configuring colors for the data in the target table and drawing a visual chart, thereby achieving the effect of conveniently showing the characteristics of the data in different fields by using the chart.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application. In the drawings:
fig. 1 is a flowchart of a display method of data provided according to an embodiment of the present application;
FIG. 2 is a table of objects in a method for displaying data according to an embodiment of the present application;
FIG. 3 is a table of color configurations in a method of displaying data provided in accordance with an embodiment of the present application;
FIG. 4 is a target chart in a method for displaying data according to an embodiment of the present application;
FIG. 5 is another color configuration table in a display method of data provided according to an embodiment of the present application;
FIG. 6 is another target chart in a display method of data provided according to an embodiment of the present application;
FIG. 7 is another color configuration table in a display method of data provided according to an embodiment of the present application;
FIG. 8 is another target chart in a display method of data provided according to an embodiment of the present application;
fig. 9 is another color configuration table in a display method of data provided according to an embodiment of the present application;
FIG. 10 is another target chart in a display method of data provided according to an embodiment of the present application; and
fig. 11 is a schematic diagram of a display device for data provided according to an embodiment of the present application.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an embodiment of the present application, there is provided a display method of data.
Fig. 1 is a flowchart of a display method of data according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
step S101, determining a field of the color to be configured in the target table according to a preset rule, wherein the field of the color to be configured is a row name field and/or a column name field of the data in the target table.
It should be noted that the field to be configured with a color is a field in the chart that needs to display data under the field in a color-differentiated manner.
As shown in fig. 2, each data belongs to 3 classification dimensions, the first classification dimension is a dimension, the dimension may be a region, the specific value of the region may be province or prefecture city, the category in the region dimension may include beijing, fujian province, guangdong province, and the like, the second classification dimension is a product large category, the category in the second classification dimension may include Furniture, Office Supplies, Technology, and the third classification dimension is an index, and the category in the index may include, for example, profit and unit price. The category name under each category dimension is a field in the target table.
Optionally, in the data display method provided in the embodiment of the present application, determining, according to a preset rule, a field of a color to be configured in a target table includes: determining a target chart type, wherein the target chart type is a type of a visual chart to be drawn based on data in a target table; determining a plurality of target fields in a target table, wherein the plurality of target fields at least belong to one classification dimension, and the classification dimension is used for classifying the plurality of target fields; judging whether the number of the classification dimensions of the plurality of target fields is less than or equal to the number of the classification dimensions supported by the target chart type; and under the condition that the number of the classification dimensions of the plurality of target fields is less than or equal to the number of the classification dimensions supported by the target chart type, determining the plurality of target fields as the fields of the colors to be configured.
It should be noted that the number of classification dimensions supported by the graph type is different, for example, one pie chart supports data display under one classification dimension, if data under multiple classification dimensions need to be displayed in the pie chart, multiple pie charts need to be established, and a histogram can support data display under multiple classification dimensions.
Specifically, a user may specify a field to which a color is currently configured by dragging the field, and dragging a field to a certain color region indicates that the color is to be configured for the field, for example, the user selects a pie chart, and drags fields in a product major dimension and fields in an index dimension to a color configuration region in sequence, and the system may prompt a configuration error according to a rule of the color configuration field.
Step S102, a color mapping table is created according to the field of the color to be configured, wherein keys of the color mapping table correspond to the field of the color to be configured, and values of the color mapping table correspond to configuration colors of data under the field of the color to be configured.
It should be noted that the color mapping table is a bridge between the target table data and the target chart, and the color mapping table is obtained based on the target table, and lays a foundation for drawing the target chart.
Optionally, in the data display method provided in the embodiment of the present application, a temporary mapping table is created; determining the identifier of the field to be configured with the color as a key of the temporary mapping table; taking the color value configured for the field of the color to be configured as the value of the temporary mapping table; and obtaining the color mapping table according to the keys of the temporary mapping table and the values of the temporary mapping table.
For example, as shown in fig. 3, the fields to be configured with colors are profit and unit price, which are column name fields to which data in the target table belongs, the keys of the temporary mapping table are determined as profit and unit price, different colors are respectively allocated to profit and unit price, green is allocated to profit, yellow is allocated to unit price, the value corresponding to the key "profit" of the temporary mapping table is determined as green, and the value corresponding to the key "unit price" of the temporary mapping table is determined as yellow, thereby obtaining the color mapping table.
And step S103, drawing a visual chart by using the target table and the color mapping table.
For example, as shown in fig. 3, since the value corresponding to the key "profit" of the color mapping table is green and the value corresponding to the key "unit price" of the color mapping table is yellow, the data at profit are all configured to be green and the data at unit price are all configured to be yellow, and the color configuration of the data in the target table is completed.
Optionally, in the data display method provided in the embodiment of the present application, the drawing a visual chart by using the target table and the color mapping table includes:
setting fields in a target table corresponding to each key in the color mapping table on a target coordinate axis of the histogram in sequence; determining the height of a rectangle corresponding to each field on the target coordinate axis based on the data value under the field in the target table corresponding to the key in the color mapping table; drawing a histogram according to the height of the rectangle corresponding to each field on the target coordinate axis and the corresponding color value of each field in the color mapping table
For example, as shown in fig. 4, under each classification in the classification dimension of province or prefecture city, the fuel, Office Supplies, and Technology data under the profit field and the fuel, Office Supplies, and Technology data under the unit price field are arranged in sequence, wherein the data under the profit field is displayed by a green rectangle, the data under the unit price field is displayed by a yellow rectangle, and the height of the rectangle is the size of the data value.
For another example, as shown in fig. 5, the fields to be configured with colors are Furniture, Office Supplies and Technology, which are column name fields to which data in the target table belongs, the key determining the temporary mapping table is Furniture, Office Supplies and Technology, green is allocated to Furniture, blue is allocated to Office Supplies and yellow is allocated to Technology, the value corresponding to the key "Furniture" of the temporary mapping table is determined to be green, the value corresponding to the key "Office Supplies" of the temporary mapping table is determined to be blue, and the value corresponding to the key "Technology" of the temporary mapping table is determined to be yellow, so as to obtain the color mapping table. And according to the color mapping table, configuring the data under the fire to be green, configuring the data under the Office Supplies to be blue, and configuring the data under the Technology to be yellow, thereby completing the color configuration of the data in the target table.
If the target chart type is a histogram, as shown in fig. 6, under each classification in the classification dimension of province or prefecture, the Furniture, Office Supplies and Technology data in the profit field and the Furniture, Office Supplies and Technology data in the unit price field are arranged in sequence, wherein the data in the Furniture field is displayed by a green rectangle, the data in the Office Supplies field is displayed by a blue rectangle, the data in the Technology field is displayed by a yellow rectangle, and the height of the rectangle is the size of the data value.
For another example, as shown in fig. 7, the fields to be configured with colors are all the field of the line name to which the data in the target table belongs in a classification dimension of province or prefecture city, the keys of the temporary mapping table are determined to be the fields of the province or the prefecture city, different colors are respectively allocated to the fields of the province or the prefecture city, specifically, green is allocated to beijing, dark blue is allocated to fujian province, light yellow is allocated to guangdong province, orange red is allocated to northwest province, dark purple is allocated to hunnan province, light blue is allocated to Jiangsu province, orange is allocated to shanghai, red is allocated to sichuan province, cyan is allocated to zhejiang province, and the corresponding values of the keys of the temporary mapping table are determined to be corresponding colors, so as to obtain the color mapping table. And configuring the data under each field into corresponding colors according to the color mapping table, and finishing the color configuration of the data in the target table.
The target chart type is a bar chart, as shown in FIG. 8, under each classification in the classification dimension of province or prefecture, the Furniture, Office Supplies, Technology data under the profit field are arranged in turn, and Furniture, Office Supplies, Technology data under the unit price field, data in the Beijing field is displayed as green rectangles, data in the Fujian province field is displayed as dark blue rectangles, data in the Guangdong province field is displayed as light yellow rectangles, data in the Hubei province field is displayed as orange red rectangles, data in the Hunan province field is displayed as dark purple rectangles, data in the Jiansu province field is displayed as light blue rectangles, data in the Shanghai province field is displayed as orange rectangles, data in the Sichuan province field is displayed as red rectangles, data in the Zhejiang province field is displayed as cyan rectangles, and the height of each rectangle is the size of a data value.
Optionally, in the data display method provided in the embodiment of the present application, the method further includes: and adjusting keys corresponding to fields to be configured with colors and/or values corresponding to the keys in the temporary mapping table/color mapping table. In the process of configuring the color by the user, or after configuring the color mapping table, the adjustment may be performed again, and the keys and/or values of the temporary mapping table or the color mapping table may be adjusted.
A field to be configured with color may include information of rows and columns in the target table, where the field to be configured with color may not correspond to an entire row or an entire column in the target table, but may be a cell or several consecutive cells, for example, when the field to be configured with color corresponds to a row name of shanghai and a column name of profit, the field to be configured with color is three cells with a row name of shanghai and a column name of profit in fig. 2, and when the field to be configured with color corresponds to a row name of shanghai, a column name of profit and a column name of furniture, the field to be configured with color is a cell with a row name of shanghai and a column name of profit in fig. 2. When some or several continuous cells are configured, the classification dimensions capable of representing the cells can be dragged into the boxes of the keys of the temporary mapping table to complete the setting of the fields of the colors to be configured.
For example, as shown in fig. 9, the fields to be color-configured include not only fields in a classification dimension of province or prefecture, but also fields in a classification dimension of index and product major categories, and the fields to be color-configured include both a row name field to which data in the target table belongs and a column name field to which data in the target table belongs.
The fields to be configured with colors may be set as fields in a classification dimension of province or prefecture cities, different colors may be respectively allocated to the fields in each province or prefecture city, a temporary mapping table may be created, and colors of each value in each province or prefecture city may be modified, for example, each value under a key of "beijing" may be pre-configured as green, and each value may be modified, specifically, Furniture under a profit field may be kept as green, Office Supplies under the profit field may be modified as medium yellow, Technology under the profit field may be modified as deep blue, Furniture under the price field may be modified as orange red, Office Supplies under the price field may be modified as deep yellow, Technology under the price field may be modified as rose, and thus an adjusted color mapping table may be obtained. And configuring the data under each field into corresponding colors according to the adjusted color mapping table, and finishing the color configuration of the data in the target table.
Optionally, in the data display method provided in the embodiment of the present application, the method further includes: and when detecting that the fields of the colors to be configured in the temporary mapping table which are configured already cause conflict, prompting the conflict. When a user configures color for a field to be configured with color, the fields to be configured with color corresponding to two keys in the temporary mapping table may collide, for example, a row name of a field to be configured with color corresponding to one key is shanghai, and a column name of a field to be configured with color corresponding to another key is profit, and color values corresponding to the two keys are different, so that the configured display color of the cells with row names of shanghai and column names of profit at the bottom of the cell will collide, and at this time, a collision is prompted.
Optionally, in the data display method provided in the embodiment of the present application, the method further includes: and generating a data table with colors by using the target table and the temporary mapping table/color mapping table, wherein the line number, the column number, the field name and the data value of the data table are the same as those of the target table. The colored data table is convenient for a user to check the state of the currently configured temporary mapping table or the color mapping table fed back in the target table, and the user can adjust the data table conveniently according to the state.
The target chart type is a bar chart, as shown in fig. 10, under each classification in the classification dimension of province or prefecture, the Furniture, Office Supplies and Technology data under the profit field and the Furniture, Office Supplies and Technology data under the unit price field are arranged in sequence, each rectangle is displayed in different colors in a distinguishing way, and the height of the rectangle is the size of the data value.
According to the data display method provided by the embodiment of the application, the field of the color to be configured is determined in the target table according to the preset rule, wherein the field of the color to be configured is the row name field and/or the column name field of the data in the target table; creating a color mapping table according to the field of the color to be configured, wherein keys of the color mapping table correspond to the field of the color to be configured, and values of the color mapping table correspond to configuration colors of data under the field of the color to be configured; the visual chart is drawn by utilizing the target table and the color mapping table, and the problem that the characteristics of data under different fields are difficult to display conveniently when the chart is adopted to display the table data in the related technology is solved. And creating a color mapping table according to the fields to be configured with colors, configuring colors for the data in the target table and drawing a visual chart, thereby achieving the effect of conveniently showing the characteristics of the data in different fields by using the chart.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
The embodiment of the present application further provides a data display device, and it should be noted that the data display device in the embodiment of the present application may be used to execute the data display method provided in the embodiment of the present application. The following describes a display device for data provided in an embodiment of the present application.
Fig. 11 is a schematic diagram of a display device of data according to an embodiment of the present application. As shown in fig. 11, the apparatus includes: a determination unit 10, a creation unit 20 and a rendering unit 30.
The determining unit 10 is configured to determine a field of a color to be configured in the target table according to a preset rule, where the field of the color to be configured is a row name field and/or a column name field to which data in the target table belongs;
a creating unit 20, configured to create a color mapping table according to a field of a color to be configured, where a key of the color mapping table corresponds to the field of the color to be configured, and a value of the color mapping table corresponds to a configuration color of data in the field of the color to be configured;
and the drawing unit 30 is used for drawing the visual chart by utilizing the target table and the color mapping table.
Optionally, in the display device for data provided in the embodiment of the present application, the determining unit includes: the first determination module is used for determining a target chart type, wherein the target chart type is the type of a visual chart to be drawn based on data in a target table; a second determining module, configured to determine a plurality of target fields in a target table, where the plurality of target fields belong to at least one classification dimension, and the classification dimension is used to classify the plurality of target fields; the judging module is used for judging whether the number of the classification dimensionalities of the target fields is less than or equal to the number of the classification dimensionalities supported by the target chart type; and the third determining module is used for determining the plurality of target fields as the fields of the colors to be configured under the condition that the number of the classification dimensions of the plurality of target fields is less than or equal to the number of the classification dimensions supported by the target chart type.
Optionally, in the display device for data provided in the embodiment of the present application, the creating unit includes: a creating module for creating a temporary mapping table; a fourth determining module, configured to determine that an identifier of the field to be configured with the color is a key of the temporary mapping table; taking the color value configured for the field of the color to be configured as the value of the temporary mapping table; and obtaining the color mapping table according to the keys of the temporary mapping table and the values of the temporary mapping table.
Optionally, in the display device for data provided in the embodiment of the present application, the device further includes: and the modification module is used for adjusting keys corresponding to fields to be configured with colors and/or values corresponding to the keys in the temporary mapping table/color mapping table.
Optionally, in the display device for data provided in the embodiment of the present application, the device further includes: and the checking module prompts a conflict when detecting that the fields of the colors to be configured, which are configured in the temporary mapping table, can cause the conflict.
Optionally, in the display device for data provided in the embodiment of the present application, the chart type is a histogram, and the drawing unit includes: the setting module is used for sequentially setting fields in the target table corresponding to each key in the color mapping table on the target coordinate axis of the histogram; a fifth determining module, configured to determine, based on the data values in the fields in the target table corresponding to the keys in the color mapping table, heights of rectangles corresponding to the fields on the target coordinate axis; and the drawing module is used for drawing the histogram according to the height of the rectangle corresponding to each field on the target coordinate axis and the corresponding color value of each field in the color mapping table.
According to the data display device provided by the embodiment of the application, the field of the color to be configured is determined in the target table according to the preset rule through the determining unit 10, wherein the field of the color to be configured is a row name field and/or a column name field to which the data in the target table belongs; the creating unit 20 creates a color mapping table according to the field of the color to be configured, wherein a key of the color mapping table corresponds to the field of the color to be configured, and a value of the color mapping table corresponds to the configured color of the data in the field of the color to be configured; the drawing unit 30 draws a visual chart by using the target table and the color mapping table, solves the problem that it is difficult to conveniently show the characteristics of data in different fields when the table data is displayed by using a chart in the related art, creates the color mapping table according to the fields to be configured with colors, configures colors for the data in the target table and draws the visual chart, and further achieves the effect of conveniently showing the characteristics of the data in different fields by using the chart.
The display device of the data comprises a processor and a memory, the above-mentioned determining unit 10, the creating unit 20, the drawing unit 30 and the like are all stored in the memory as program units, and the above-mentioned program units stored in the memory are executed by the processor to realize the corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the problem that the characteristics of data under different fields are difficult to display conveniently when the table data is displayed by adopting a chart in the related technology is solved by adjusting the kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the present invention provides a storage medium on which a program is stored, the program implementing a display method of the data when executed by a processor.
The embodiment of the invention provides a processor, which is used for running a program, wherein the program executes a display method of data when running.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps: determining a field of a color to be configured in a target table according to a preset rule, wherein the field of the color to be configured is a row name field and/or a column name field to which data in the target table belongs; creating a color mapping table according to the field of the color to be configured, wherein keys of the color mapping table correspond to the field of the color to be configured, and values of the color mapping table correspond to configuration colors of data under the field of the color to be configured; and drawing a visual chart by using the target table and the color mapping table.
Determining fields of the colors to be configured in the target table according to preset rules comprises the following steps: determining a target chart type, wherein the target chart type is a type of a visual chart to be drawn based on data in a target table; determining a plurality of target fields in a target table, wherein the plurality of target fields at least belong to one classification dimension, and the classification dimension is used for classifying the plurality of target fields; judging whether the number of the classification dimensions of the plurality of target fields is less than or equal to the number of the classification dimensions supported by the target chart type; and under the condition that the number of the classification dimensions of the plurality of target fields is less than or equal to the number of the classification dimensions supported by the target chart type, determining the plurality of target fields as the fields of the colors to be configured.
Creating a color mapping table according to a field to be configured with a color comprises: creating a temporary mapping table; determining the identifier of the field to be configured with the color as a key of the temporary mapping table; taking the color value configured for the field of the color to be configured as the value of the temporary mapping table; and obtaining the color mapping table according to the keys of the temporary mapping table and the values of the temporary mapping table.
The method further comprises the following steps: and adjusting the key corresponding to the field of the color to be configured and/or the value corresponding to the key in the temporary mapping table/color mapping table.
The method further comprises the following steps: and when detecting that the fields of the colors to be configured in the temporary mapping table which are configured already cause conflict, prompting the conflict.
The chart type is a histogram, and drawing the visual chart by using the target table and the color mapping table comprises the following steps: setting fields in a target table corresponding to each key in the color mapping table on a target coordinate axis of the histogram in sequence; determining the height of a rectangle corresponding to each field on the target coordinate axis based on the data value under the field in the target table corresponding to the key in the color mapping table; and drawing a histogram according to the height of the rectangle corresponding to each field on the target coordinate axis and the corresponding color value of each field in the color mapping table. The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: determining a field of a color to be configured in a target table according to a preset rule, wherein the field of the color to be configured is a row name field and/or a column name field to which data in the target table belongs; creating a color mapping table according to the field of the color to be configured, wherein keys of the color mapping table correspond to the field of the color to be configured, and values of the color mapping table correspond to configuration colors of data under the field of the color to be configured; and drawing a visual chart by using the target table and the color mapping table.
Determining fields of the colors to be configured in the target table according to preset rules comprises the following steps: determining a target chart type, wherein the target chart type is a type of a visual chart to be drawn based on data in a target table; determining a plurality of target fields in a target table, wherein the plurality of target fields at least belong to one classification dimension, and the classification dimension is used for classifying the plurality of target fields; judging whether the number of the classification dimensions of the plurality of target fields is less than or equal to the number of the classification dimensions supported by the target chart type; and under the condition that the number of the classification dimensions of the plurality of target fields is less than or equal to the number of the classification dimensions supported by the target chart type, determining the plurality of target fields as the fields of the colors to be configured.
Creating a color mapping table according to a field to be configured with a color comprises: creating a temporary mapping table; determining the identifier of the field to be configured with the color as a key of the temporary mapping table; taking the color value configured for the field of the color to be configured as the value of the temporary mapping table; and obtaining the color mapping table according to the keys of the temporary mapping table and the values of the temporary mapping table.
The method further comprises the following steps: and adjusting the key corresponding to the field of the color to be configured and/or the value corresponding to the key in the temporary mapping table/color mapping table.
The method further comprises the following steps: and when detecting that the fields of the colors to be configured in the temporary mapping table which are configured already cause conflict, prompting the conflict.
The chart type is a histogram, and drawing the visual chart by using the target table and the color mapping table comprises the following steps: setting fields in a target table corresponding to each key in the color mapping table on a target coordinate axis of the histogram in sequence; determining the height of a rectangle corresponding to each field on the target coordinate axis based on the data value under the field in the target table corresponding to the key in the color mapping table; and drawing a histogram according to the height of the rectangle corresponding to each field on the target coordinate axis and the corresponding color value of each field in the color mapping table.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method for displaying data, comprising:
determining a field of a color to be configured in a target table according to a preset rule, wherein the field of the color to be configured is a row name field and/or a column name field to which data in the target table belongs;
creating a color mapping table according to the field of the color to be configured, wherein keys of the color mapping table correspond to the field of the color to be configured, and values of the color mapping table correspond to configuration colors of data under the field of the color to be configured;
and drawing a visual chart by utilizing the target table and the color mapping table.
2. The method of claim 1, wherein determining the fields of the color to be configured in the target table according to the preset rule comprises:
determining a target chart type, wherein the target chart type is a type of a visual chart to be drawn based on data in the target table;
determining a plurality of target fields in the target table, wherein the plurality of target fields belong to at least one classification dimension, and the classification dimension is used for classifying the plurality of target fields;
judging whether the number of the classification dimensions of the target fields is less than or equal to the number of the classification dimensions supported by the target chart type;
determining the plurality of target fields as the fields to be configured with colors when the number of the classification dimensions of the plurality of target fields is less than or equal to the number of the classification dimensions supported by the target chart type.
3. The method of claim 1, wherein creating a color mapping table from the fields of the color to be configured comprises:
creating a temporary mapping table;
determining the identifier of the field to be configured with the color as a key of the temporary mapping table;
taking the color value configured for the field of the color to be configured as the value of the temporary mapping table;
and obtaining the color mapping table according to the keys of the temporary mapping table and the values of the temporary mapping table.
4. The method of claim 3, further comprising:
and adjusting the key corresponding to the field of the color to be configured in the temporary mapping table/color mapping table and/or the value corresponding to the key.
5. The method according to claim 3 or 4, characterized in that the method further comprises:
and when detecting that the fields of the colors to be configured in the temporary mapping table which are configured already cause conflict, prompting the conflict.
6. The method of claim 2, wherein the chart type is a histogram, and wherein drawing a visual chart using the target table and the colormap comprises:
setting fields in a target table corresponding to each key in the color mapping table on a target coordinate axis of the histogram in sequence;
determining the height of a rectangle corresponding to each field on the target coordinate axis based on the data value under the field in the target table corresponding to the key in the color mapping table;
and drawing a histogram according to the height of the rectangle corresponding to each field on the target coordinate axis and the corresponding color value of each field in the color mapping table.
7. The method according to claim 3 or 4, characterized in that the method further comprises:
and generating a data table with colors by using the target table and the temporary mapping table/color mapping table, wherein the line number, the column number, the field name and the data value of the data table are the same as those of the target table.
8. A device for displaying data, comprising:
the device comprises a determining unit, a color setting unit and a color setting unit, wherein the determining unit is used for determining a field of a color to be configured in a target table according to a preset rule, and the field of the color to be configured is a row name field and/or a column name field to which data in the target table belongs;
a creating unit, configured to create a color mapping table according to the field of the color to be configured, where a key of the color mapping table corresponds to the field of the color to be configured, and a value of the color mapping table corresponds to a configuration color of data in the field of the color to be configured;
and the drawing unit is used for drawing a visual chart by utilizing the target table and the color mapping table.
9. A storage medium characterized by comprising a stored program, wherein the program executes a display method of data according to any one of claims 1 to 6.
10. A processor for running a program, wherein the program is run to perform a method of displaying data according to any one of claims 1 to 6.
CN201811393419.2A 2018-11-21 2018-11-21 Data display method and device, storage medium and processor Active CN111291543B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811393419.2A CN111291543B (en) 2018-11-21 2018-11-21 Data display method and device, storage medium and processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811393419.2A CN111291543B (en) 2018-11-21 2018-11-21 Data display method and device, storage medium and processor

Publications (2)

Publication Number Publication Date
CN111291543A true CN111291543A (en) 2020-06-16
CN111291543B CN111291543B (en) 2023-08-25

Family

ID=71026559

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811393419.2A Active CN111291543B (en) 2018-11-21 2018-11-21 Data display method and device, storage medium and processor

Country Status (1)

Country Link
CN (1) CN111291543B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112614203A (en) * 2020-12-25 2021-04-06 北京知因智慧科技有限公司 Correlation matrix visualization method and device, electronic equipment and storage medium
CN114185463A (en) * 2021-11-17 2022-03-15 北京字跳网络技术有限公司 Form processing method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102067111A (en) * 2008-06-20 2011-05-18 微软公司 Hierarchically presenting tabular data
CN105843788A (en) * 2016-03-31 2016-08-10 浪潮通信信息***有限公司 Report generation method and device
CN105843945A (en) * 2016-04-08 2016-08-10 联动优势科技有限公司 Report generation method and system
CN106598924A (en) * 2016-10-28 2017-04-26 深圳前海微众银行股份有限公司 Form generation method and device
US20170228898A1 (en) * 2016-02-08 2017-08-10 Adobe Systems Incorporated Generating graphical depictions of data sets based on mapping paths of graphical objects to data properties
CN107767825A (en) * 2016-08-17 2018-03-06 e解决方案有限公司 Method, apparatus and computer-readable recording medium for the color configuration of display device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102067111A (en) * 2008-06-20 2011-05-18 微软公司 Hierarchically presenting tabular data
US20170228898A1 (en) * 2016-02-08 2017-08-10 Adobe Systems Incorporated Generating graphical depictions of data sets based on mapping paths of graphical objects to data properties
CN105843788A (en) * 2016-03-31 2016-08-10 浪潮通信信息***有限公司 Report generation method and device
CN105843945A (en) * 2016-04-08 2016-08-10 联动优势科技有限公司 Report generation method and system
CN107767825A (en) * 2016-08-17 2018-03-06 e解决方案有限公司 Method, apparatus and computer-readable recording medium for the color configuration of display device
CN106598924A (en) * 2016-10-28 2017-04-26 深圳前海微众银行股份有限公司 Form generation method and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112614203A (en) * 2020-12-25 2021-04-06 北京知因智慧科技有限公司 Correlation matrix visualization method and device, electronic equipment and storage medium
CN112614203B (en) * 2020-12-25 2023-07-04 北京知因智慧科技有限公司 Correlation matrix visualization method and device, electronic equipment and storage medium
CN114185463A (en) * 2021-11-17 2022-03-15 北京字跳网络技术有限公司 Form processing method and device, electronic equipment and storage medium
WO2023088379A1 (en) * 2021-11-17 2023-05-25 北京字跳网络技术有限公司 Table processing method and apparatus, electronic device, and storage medium
CN114185463B (en) * 2021-11-17 2023-10-13 北京字跳网络技术有限公司 Form processing method, form processing device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111291543B (en) 2023-08-25

Similar Documents

Publication Publication Date Title
US10290128B2 (en) Interactive scene graph manipulation for visualization authoring
US20190102348A1 (en) Page Resource Placement Method and Apparatus
WO2019127824A1 (en) Visual diagram page realization method and apparatus, terminal device and storage medium
US9128595B2 (en) Managing data content on a computing device
CN109542789B (en) Code coverage rate statistical method and device
US20110007075A1 (en) Data processing apparatus and method
CN102104510B (en) Data view processing method and system
CN106776655B (en) Web application system display method and device
JP6438565B2 (en) Information search method and information search apparatus
CN111291543A (en) Data display method and device, storage medium and processor
CN107257968B (en) Discovering unique formula sets in a spreadsheet
CN112068911A (en) Method, device, system, equipment and medium for generating electronic form
CN106250110A (en) Set up the method and device of model
CN116305895A (en) Product model generation method, device, computer equipment and storage medium
CN106981084A (en) A kind of method and device of drawing isoline
CN106326436A (en) Interface element display method and device
CN103561289A (en) Interface configuration method and device
CN116611678B (en) Data processing method, device, computer equipment and storage medium
CN106909397A (en) The method and device of input frame is generated in Unity interfaces
KR20200094637A (en) Method, apparatus, device, and storage medium for providing visual representation of set of objects
CN112579066A (en) Chart display method and device, storage medium and equipment
CN115268863A (en) Low-code platform data description method, equipment and medium
US20140278700A1 (en) Systems and methods of prioritizing initiatives
CN106651994A (en) Bubble chart display method and device
CN105989276A (en) Role optimization method and apparatus in RBAC permission system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant