CN108845978A - A kind of generation method and device of chart - Google Patents
A kind of generation method and device of chart Download PDFInfo
- Publication number
- CN108845978A CN108845978A CN201810507911.1A CN201810507911A CN108845978A CN 108845978 A CN108845978 A CN 108845978A CN 201810507911 A CN201810507911 A CN 201810507911A CN 108845978 A CN108845978 A CN 108845978A
- Authority
- CN
- China
- Prior art keywords
- chart
- data
- determined
- axis
- coordinate scale
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
- G06F40/174—Form filling; Merging
Abstract
The present invention relates to a kind of generation method of chart and device, the method includes:Obtain real-time chart data;According to the chart data, the reference axis of the chart is determined;According to the reference axis and chart data, the graphic parameter of the chart is determined;The chart is generated according to the graphic parameter.The present invention can generate corresponding chart in real time and analyze real time data, to avoid the delay analyzed data, promote the timeliness of data analysis.
Description
Technical field
The present invention relates to field of computer technology, more particularly to the generation method and device of a kind of chart.
Background technique
With the development of internet, the ever more important of user data.Depth and irregular is presented in the data of usual user
Property, during carrying out excavation analysis to data, chart is a kind of display means being commonly used.
Then existing technology integrates the data being saved often by data are saved, data is shown
Out.This will lead to cannot timely analyze data, and message delay is higher;And operation personnel simultaneously be responsible for it is huge
Quantity, be easy to happen mistake.
Summary of the invention
Based on this, it is necessary to aiming at the problem that cannot generate chart in real time at present, provide a kind of chart generation method and
Device.
A kind of generation method of chart, the method includes:
Obtain real-time chart data;
According to the chart data, the reference axis of the chart is determined;
According to the reference axis and chart data, the graphic parameter of the chart is determined;
The chart is generated according to the graphic parameter.
Preferably, described that the reference axis of the chart is determined according to the chart data, including:
When the chart data is 2-D data, the two-dimensional coordinates of the chart are determined;
When the chart data is three-dimensional data, the 3-D walls and floor of the chart is determined.
Preferably, the reference axis include in two-dimensional coordinate system horizontally and vertically;
It is described that the graphic parameter of the chart is determined according to the reference axis and chart data, including:
According to the chart data, the coordinate scale of the horizontal axis is determined;
According to the chart data, the coordinate scale of the longitudinal axis is determined;
According to the coordinate scale of the coordinate scale of the horizontal axis and the longitudinal axis, the extensograph parameter of the chart is determined.
Preferably, the reference axis includes horizontal axis, the longitudinal axis and the vertical pivot in three-dimensional system of coordinate;
It is described that the graphic parameter of the chart is determined according to the reference axis and chart data, including:
According to the chart data, the coordinate scale of the horizontal axis is determined;
According to the chart data, the coordinate scale of the longitudinal axis is determined;
According to the chart data, the coordinate scale of the vertical pivot is determined;
According to the coordinate scale of the horizontal axis, the coordinate scale of the coordinate scale of the longitudinal axis and the vertical pivot, institute is determined
State the extensograph parameter of chart.
Preferably, described that the chart is generated according to the graphic parameter, including:
According to the graphic parameter, color rendering is carried out to line, the face figure of the chart;
Animation effect is added on the chart after rendering;
According to the extensograph parameter of the chart, the chart is shown on the screen according to the animation effect.
A kind of generating means of chart, described device include:
Module is obtained, for obtaining real-time chart data;
Axis determining module, for determining the reference axis of the chart according to the chart data;
Parameter determination module, for determining the graphic parameter of the chart according to the reference axis and chart data;
Generation module, for generating the chart according to the graphic parameter.
Preferably, the axis determining module is used for:
When the chart data is 2-D data, the two-dimensional coordinates of the chart are determined;
When the chart data is three-dimensional data, the 3-D walls and floor of the chart is determined.
Preferably, the reference axis include in two-dimensional coordinate system horizontally and vertically;
The parameter determination module is used for:
According to the chart data, the coordinate scale of the horizontal axis is determined;
According to the chart data, the coordinate scale of the longitudinal axis is determined;
According to the coordinate scale of the coordinate scale of the horizontal axis and the longitudinal axis, the extensograph parameter of the chart is determined.
Preferably, the reference axis includes horizontal axis, the longitudinal axis and the vertical pivot in three-dimensional system of coordinate;
The parameter determination module is used for:
According to the chart data, the coordinate scale of the horizontal axis is determined;
According to the chart data, the coordinate scale of the longitudinal axis is determined;
According to the chart data, the coordinate scale of the vertical pivot is determined;
According to the coordinate scale of the horizontal axis, the coordinate scale of the coordinate scale of the longitudinal axis and the vertical pivot, institute is determined
State the extensograph parameter of chart.
Preferably, the generation module is used for:
According to the graphic parameter, color rendering is carried out to line, the face figure of the chart;
Animation effect is added on the chart after rendering;
According to the extensograph parameter of the chart, the chart is shown on the screen according to the animation effect.
In the embodiment of the present invention, the electronic equipments such as server can determine after obtaining chart data in real time according to chart
The reference axis of chart determines the graphic parameter of chart then according to reference axis and chart data, and is generated and schemed according to graphic parameter
Table;Accordingly, for real-time chart data, can it is online in the state of generate corresponding chart in real time real time data divided
Analysis promotes the timeliness of data analysis to avoid the delay analyzed data;Relative to quiet after saving all data
State analysis, real-time dynamic analysis can reduce the data volume of analysis, promote the accuracy of analysis.
Detailed description of the invention
Fig. 1 is the flow chart of the generation method of the chart of an embodiment;
Fig. 2 is the structure chart of the generating means of the chart of an embodiment.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
Fig. 1 is the flow chart of the generation method of the chart of an embodiment.As shown in Figure 1, this method includes:
Step 101, real-time chart data is obtained.
Real-time chart data may come from charging background server system, can be from other systems or electronics
The data of equipment.
Step 102, according to the chart data, the reference axis of the chart is determined.
According to chart data, it may be necessary to establish two-dimensional diagram or three-dimensional chart.This is just needed according to chart data pair
The reference axis for the determination chart answered.
Wherein, when the chart data is 2-D data, the two-dimensional coordinates of the chart are determined;When the chart numbers
When according to for three-dimensional data, the 3-D walls and floor of the chart is determined.
Step 103, according to the reference axis and chart data, the graphic parameter of the chart is determined.
Graphic parameter can be used for drawing and showing chart.
Step 104, the chart is generated according to the graphic parameter.
It can be drawn a diagram by graphic parameter, and after drawing a diagram, show the chart on the screen of the electronic device.
In the embodiment of the present invention, the electronic equipments such as server can determine after obtaining chart data in real time according to chart
The reference axis of chart determines the graphic parameter of chart then according to reference axis and chart data, and is generated and schemed according to graphic parameter
Table;Accordingly, for real-time chart data, can it is online in the state of generate corresponding chart in real time real time data divided
Analysis promotes the timeliness of data analysis to avoid the delay analyzed data;Relative to quiet after saving all data
State analysis, real-time dynamic analysis can reduce the data volume of analysis, promote the accuracy of analysis.
Wherein, in an embodiment, the reference axis include in two-dimensional coordinate system horizontally and vertically;Step 103 can have
Body is embodied as:
According to the chart data, the coordinate scale of the horizontal axis is determined;
According to the chart data, the coordinate scale of the longitudinal axis is determined;
According to the coordinate scale of the coordinate scale of the horizontal axis and the longitudinal axis, the extensograph parameter of the chart is determined.
It is understood that the coordinate scale of horizontal axis is the distribution that the specific data of horizontal axis are mapped to according to chart data,
The coordinate scale of the longitudinal axis is the distribution that the specific data of the longitudinal axis are mapped to according to chart data.
According to the coordinate scale of the coordinate scale of horizontal axis and the longitudinal axis, it can determine that chart data fastens distribution in two-dimensional coordinate
Data point, can also determine the extensograph parameter of chart.Extensograph parameter indicates the size degree that two-dimensional diagram is shown on the screen.
In another embodiment, the reference axis includes horizontal axis, the longitudinal axis and vertical pivot in three-dimensional system of coordinate;Step 103 can be with
It is implemented as:
According to the chart data, the coordinate scale of the horizontal axis is determined;
According to the chart data, the coordinate scale of the longitudinal axis is determined;
According to the chart data, the coordinate scale of the vertical pivot is determined;
According to the coordinate scale of the horizontal axis, the coordinate scale of the coordinate scale of the longitudinal axis and the vertical pivot, institute is determined
State the extensograph parameter of chart.
Similarly, the coordinate scale of horizontal axis is the distribution that the specific data of horizontal axis are mapped to according to chart data, the seat of the longitudinal axis
Indexing is the distribution that the specific data of the longitudinal axis are mapped to according to chart data, and the coordinate scale of vertical pivot is reflected according to chart data
It is incident upon the distribution of the specific data of vertical pivot.
According to the coordinate scale of horizontal axis, the coordinate scale of the coordinate scale of the longitudinal axis and vertical pivot, it can determine that chart data exists
Three-dimensional coordinate fastens the data point of distribution, can also determine the extensograph parameter of chart.Extensograph parameter indicates three-dimensional chart in screen
The size degree of upper display.
In the present embodiment, it can be called by OpenGl and enter OpenGL, determine chart in horizontal axis, the longitudinal axis and vertical
Coordinate scale.
It should be pointed out that horizontal axis, the longitudinal axis, title can pre-generate representated by vertical pivot in the present embodiment, for example,
Horizontal axis can indicate that time, the longitudinal axis can indicate that quantity, vertical pivot can indicate amount of money etc..If representated by horizontal axis, the longitudinal axis, vertical pivot
Title not within pre-set title, then user can be customized.
In the present embodiment, step 104 can be implemented as:
According to the graphic parameter, color rendering is carried out to line, the face figure of the chart;
Animation effect is added on the chart after rendering;
According to the extensograph parameter of the chart, the chart is shown on the screen according to the animation effect.
Wherein, when carrying out the rendering of line face, since there is OpenGL the api for executing rendering to call, pass through OpenGL's
Api calling can dye pixel.It is dyed to that whole-colored point is more, and line or face can shapes on one line or a face
At.It should be pointed out that line, face rendering can be with asynchronous implements.
It should be pointed out that the present embodiment realize Real time graph generation, the chart next day being no longer artificial, can with point with
It generates, and chart production efficiency can be improved in the rendering of the chart based on OpenGL.
Fig. 2 is the structure chart of the generating means of the chart of an embodiment.As shown in Fig. 2, the device includes:
Module 201 is obtained, for obtaining real-time chart data;
Axis determining module 202, for determining the reference axis of the chart according to the chart data;
Parameter determination module 203, for determining the graphic parameter of the chart according to the reference axis and chart data;
Generation module 204, for generating the chart according to the graphic parameter.
In the embodiment of the present invention, the electronic equipments such as server can determine after obtaining chart data in real time according to chart
The reference axis of chart determines the graphic parameter of chart then according to reference axis and chart data, and is generated and schemed according to graphic parameter
Table;Accordingly, for real-time chart data, can it is online in the state of generate corresponding chart in real time real time data divided
Analysis promotes the timeliness of data analysis to avoid the delay analyzed data;Relative to quiet after saving all data
State analysis, real-time dynamic analysis can reduce the data volume of analysis, promote the accuracy of analysis.
Optionally, as one embodiment, the axis determining module is used for:
When the chart data is 2-D data, the two-dimensional coordinates of the chart are determined;
When the chart data is three-dimensional data, the 3-D walls and floor of the chart is determined.
Optionally, as one embodiment, the reference axis include in two-dimensional coordinate system horizontally and vertically;
The parameter determination module is used for:
According to the chart data, the coordinate scale of the horizontal axis is determined;
According to the chart data, the coordinate scale of the longitudinal axis is determined;
According to the coordinate scale of the coordinate scale of the horizontal axis and the longitudinal axis, the extensograph parameter of the chart is determined.
Optionally, as one embodiment, the reference axis includes horizontal axis, the longitudinal axis and vertical pivot in three-dimensional system of coordinate;
The parameter determination module is used for:
According to the chart data, the coordinate scale of the horizontal axis is determined;
According to the chart data, the coordinate scale of the longitudinal axis is determined;
According to the chart data, the coordinate scale of the vertical pivot is determined;
According to the coordinate scale of the horizontal axis, the coordinate scale of the coordinate scale of the longitudinal axis and the vertical pivot, institute is determined
State the extensograph parameter of chart.
Optionally, as one embodiment, the generation module is used for:
According to the graphic parameter, color rendering is carried out to line, the face figure of the chart;
Animation effect is added on the chart after rendering;
According to the extensograph parameter of the chart, the chart is shown on the screen according to the animation effect.
The specific implementation of the device of above embodiments is referred to the particular content of above method embodiment, the present embodiment
The particular content in above method embodiment may be implemented in Installation practice.
Each technical characteristic of embodiment described above can be combined arbitrarily, for simplicity of description, not to above-mentioned reality
It applies all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited
In contradiction, all should be considered as described in this specification.
The embodiments described above only express several embodiments of the present invention, and the description thereof is more specific and detailed, but simultaneously
It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art
It says, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to protection of the invention
Range.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.
Claims (10)
1. a kind of generation method of chart, which is characterized in that the method includes:
Obtain real-time chart data;
According to the chart data, the reference axis of the chart is determined;
According to the reference axis and chart data, the graphic parameter of the chart is determined;
The chart is generated according to the graphic parameter.
2. determining the chart the method according to claim 1, wherein described according to the chart data
Reference axis, including:
When the chart data is 2-D data, the two-dimensional coordinates of the chart are determined;
When the chart data is three-dimensional data, the 3-D walls and floor of the chart is determined.
3. the method according to claim 1, wherein the reference axis includes horizontal axis in two-dimensional coordinate system and vertical
Axis;
It is described that the graphic parameter of the chart is determined according to the reference axis and chart data, including:
According to the chart data, the coordinate scale of the horizontal axis is determined;
According to the chart data, the coordinate scale of the longitudinal axis is determined;
According to the coordinate scale of the coordinate scale of the horizontal axis and the longitudinal axis, the extensograph parameter of the chart is determined.
4. the method according to claim 1, wherein the reference axis include horizontal axis in three-dimensional system of coordinate, it is vertical
Axis and vertical pivot;
It is described that the graphic parameter of the chart is determined according to the reference axis and chart data, including:
According to the chart data, the coordinate scale of the horizontal axis is determined;
According to the chart data, the coordinate scale of the longitudinal axis is determined;
According to the chart data, the coordinate scale of the vertical pivot is determined;
According to the coordinate scale of the horizontal axis, the coordinate scale of the coordinate scale of the longitudinal axis and the vertical pivot, the figure is determined
The extensograph parameter of table.
5. the method according to claim 3 or 4, which is characterized in that it is described that the chart is generated according to the graphic parameter,
Including:
According to the graphic parameter, color rendering is carried out to line, the face figure of the chart;
Animation effect is added on the chart after rendering;
According to the extensograph parameter of the chart, the chart is shown on the screen according to the animation effect.
6. a kind of generating means of chart, which is characterized in that described device includes:
Module is obtained, for obtaining real-time chart data;
Axis determining module, for determining the reference axis of the chart according to the chart data;
Parameter determination module, for determining the graphic parameter of the chart according to the reference axis and chart data;
Generation module, for generating the chart according to the graphic parameter.
7. device according to claim 6, which is characterized in that the axis determining module is used for:
When the chart data is 2-D data, the two-dimensional coordinates of the chart are determined;
When the chart data is three-dimensional data, the 3-D walls and floor of the chart is determined.
8. device according to claim 6, which is characterized in that the reference axis includes horizontal axis in two-dimensional coordinate system and vertical
Axis;
The parameter determination module is used for:
According to the chart data, the coordinate scale of the horizontal axis is determined;
According to the chart data, the coordinate scale of the longitudinal axis is determined;
According to the coordinate scale of the coordinate scale of the horizontal axis and the longitudinal axis, the extensograph parameter of the chart is determined.
9. device according to claim 6, which is characterized in that the reference axis includes horizontal axis in three-dimensional system of coordinate, vertical
Axis and vertical pivot;
The parameter determination module is used for:
According to the chart data, the coordinate scale of the horizontal axis is determined;
According to the chart data, the coordinate scale of the longitudinal axis is determined;
According to the chart data, the coordinate scale of the vertical pivot is determined;
According to the coordinate scale of the horizontal axis, the coordinate scale of the coordinate scale of the longitudinal axis and the vertical pivot, the figure is determined
The extensograph parameter of table.
10. device according to claim 8 or claim 9, which is characterized in that the generation module is used for:
According to the graphic parameter, color rendering is carried out to line, the face figure of the chart;
Animation effect is added on the chart after rendering;
According to the extensograph parameter of the chart, the chart is shown on the screen according to the animation effect.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810507911.1A CN108845978A (en) | 2018-05-24 | 2018-05-24 | A kind of generation method and device of chart |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810507911.1A CN108845978A (en) | 2018-05-24 | 2018-05-24 | A kind of generation method and device of chart |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108845978A true CN108845978A (en) | 2018-11-20 |
Family
ID=64213384
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810507911.1A Pending CN108845978A (en) | 2018-05-24 | 2018-05-24 | A kind of generation method and device of chart |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108845978A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101448121A (en) * | 2007-11-26 | 2009-06-03 | 新奥特(北京)视频技术有限公司 | Dynamic generation method of diagram video |
CN103034502A (en) * | 2012-12-26 | 2013-04-10 | 江苏西电南自智能电力设备有限公司 | Method for embedding dynamic real-time monitoring chart in scalable vector graphics (SVG) interface |
CN103135904A (en) * | 2011-12-05 | 2013-06-05 | 英顺源(上海)科技有限公司 | Chart dynamic display system and display method thereof |
CN105303506A (en) * | 2014-06-19 | 2016-02-03 | Tcl集团股份有限公司 | Data parallel processing method and system based on HTML5 |
CN106339411A (en) * | 2016-08-11 | 2017-01-18 | 广东芬尼克兹节能设备有限公司 | Processing method and device of monitoring data |
-
2018
- 2018-05-24 CN CN201810507911.1A patent/CN108845978A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101448121A (en) * | 2007-11-26 | 2009-06-03 | 新奥特(北京)视频技术有限公司 | Dynamic generation method of diagram video |
CN103135904A (en) * | 2011-12-05 | 2013-06-05 | 英顺源(上海)科技有限公司 | Chart dynamic display system and display method thereof |
CN103034502A (en) * | 2012-12-26 | 2013-04-10 | 江苏西电南自智能电力设备有限公司 | Method for embedding dynamic real-time monitoring chart in scalable vector graphics (SVG) interface |
CN105303506A (en) * | 2014-06-19 | 2016-02-03 | Tcl集团股份有限公司 | Data parallel processing method and system based on HTML5 |
CN106339411A (en) * | 2016-08-11 | 2017-01-18 | 广东芬尼克兹节能设备有限公司 | Processing method and device of monitoring data |
Non-Patent Citations (1)
Title |
---|
黄声享: "GPS几何监测系统的三维可视化设计与初步实现", 《测绘工程》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111815755B (en) | Method and device for determining blocked area of virtual object and terminal equipment | |
CN103412871A (en) | Method and device for generating visualized view | |
Brabec et al. | Shadow volumes on programmable graphics hardware | |
US20150262416A1 (en) | Importance sampling of sparse voxel octrees | |
CN106296779A (en) | A kind of threedimensional model rendering indication method and system | |
US8533615B1 (en) | Systems and methods for order-independent rendering of graphical objects using operating system resources | |
CN109754464A (en) | Method and apparatus for generating information | |
CN114881841A (en) | Image generation method and device | |
US10580198B2 (en) | System and method for optimized sparse volume rendering | |
CN109377552A (en) | Image occlusion test method, apparatus calculates equipment and storage medium | |
CN108845978A (en) | A kind of generation method and device of chart | |
CN105590241A (en) | Self-adaptive electronic bill implementation method and system | |
CN113010582A (en) | Data processing method and device, computer readable medium and electronic equipment | |
CN115423919B (en) | Image rendering method, device, equipment and storage medium | |
CN109656647A (en) | Chart Picture Generation Method, device, equipment and computer readable storage medium | |
CN110334027A (en) | Game picture test method and device | |
CN113379884B (en) | Map rendering method, map rendering device, electronic device, storage medium and vehicle | |
CN109408566A (en) | A kind of intelligence chart recommended method and device | |
CN112433651B (en) | Region identification method, device, storage medium and device | |
CN112884124A (en) | Neural network training method and device, and image processing method and device | |
CN107766436A (en) | A kind of address correlation data processing method, user terminal and server | |
CN115601524A (en) | Crushing model generation method and device, electronic equipment and storage medium | |
CN104679538B (en) | A kind of method and client executing operation using person's handwriting | |
CN113936097A (en) | Volume cloud rendering method and device and storage medium | |
CN110413519A (en) | Template processing method and processing device |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181120 |