One of HighCharts use: basic configuration

Import the highcharts.js file on the page that needs to use the chart, but before that, you need to import the jq file, and the version must be higher than version 1.6.4 (you can see it on the demo page of the official website, and many other js libraries are also supported)

<script src="Scripts/jquery-1.10.2.min.js"></script>
<script src="Scripts/highcharts.js"></script>
series object, you can place multiple property objects, each property Objects are enclosed with {} and separated by ",". Multiple properties can be set:

series: [{object1},{object2},{...}]

Each object can have multiple properties. The most commonly used attributes of series are
attribute name description type
data data used to draw images Array
name control series display name String
type chart type, type are plotOption String

where data, name, type these attributes you can use ajax or other methods incoming. This can be very convenient for dynamic statistics. For example, if you want to query statistics based on conditions, this will be very convenient. If you need to have multiple types of statistics on one graph, there will be some small problems, such as the one above. The pie chart blocks some of the nodes of the line chart.
Below we take the Line diagram as an example, and then introduce the use of some other methods.

The method description states that
remove() is used to remove the series at the specified position, the remove() example  
hide() is used to hide the specified series, and the hide() example Show() is the same
select() is used to select a series, select() example needs to set the showCheckbox property of the series (True/Flase)
setData() is used to reset the value of the series, the setData() example parameter object is the same as data, the most important
update () is used to update various properties of the series, the example parameter of update() is an object that needs to be updated

Official website: http://www.highcharts.com/demo

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326774493&siteId=291194637