Latest web development tutorials

Highcharts configuration options are described in detail

Highcharts configuration options provide a lot of parameters, you can easily customized to meet user requirements charts in this section to find out more Highcharts configuration options for use:


Configuration parameters (attributes + Event)

  1. chart.events.addSeries: Add the number of columns to the chart.

  2. chart.events.click: Click on an event the entire chart plot area occurred.

  3. chart.events.load: Chart load event.

  4. chart.events.redraw: chart redraw event, click on the legend shows and can trigger hidden drawing.

  5. chart.events.selection: When the chart curve selectable zoom, select the chart when operation can trigger the event.

  6. chart.height: height chart drawn.

  7. chart.inverted: chart x, y-axis on the exchange.

  8. chart.polar: whether the polar chart.

  9. chart.reflow: when the window size changes, the width of the chart adaptive window size changes.

  10. chart.renderTo: loading the chart, is a DOM object on the page.

  11. chart.showAxes: blank chart, whether to display axes.

  12. chart.type: chart type, default line, there are bar / column / pie ......

  13. chart.width: the width of the plot area of ​​the chart, the default is adaptive.

  14. chart.zoomType: amplification type data in the chart of the report, you can zoom in to the X-axis or Y-axis zoom, you can zoom in XY axes simultaneously.

  15. colors: Most columns in the chart, the number of columns between each color. Is an array, generally do not move.

  16. credits .enabled: whether to allow the display of copyright information.

  17. credits.href: link copyrighted.

  18. credits.text: copyright information display text.

  19. exporting .buttons.exportButton.enabled: whether to allow the display Export button.

  20. exporting.buttons.exportButton.menuItems: Export button menu option.

  21. exporting.buttons.exportButton.onclick: Export button is clicked event, not internal menu.

  22. exporting.buttons.printButton.enabled: whether to allow the Print button.

  23. exporting.buttons.printButton.onclick: print button click event.

  24. exporting.enabled: Print and Export buttons are allowed.

  25. exporting.filename: is the file name of the export file.

  26. exporting.type: Default export picture file formats.

  27. exporting.url: SVG conversion chart and export processing interface address.

  28. exporing.width: default export picture width.

  29. labels: labels can be loaded into any position of the chart, there are items, style.

  30. lang: language parameter configuration, and configuration related to the Export button menu, name and other configuration time.

  31. legend.enabled: whether to allow Legend.

  32. navigation.buttonOptions.enabled: chart navigation buttons whether all that can be clicked.

  33. plotOptions .area.allowPointSelect: whether to allow the click data points.

  34. plotOptions.area.color: Drawing color.

  35. plotOptions.area.dataLabels.enabled: whether to allow the data labels.

  36. plotOptions.area.enableMouseTracking: whether to allow the data in the chart, mouse tracking bubble data point is displayed.

  37. plotOptions.area.events.checkboxClick: data in the chart legend checkbox click event.

  38. plotOptions.area.events.click: data charts, data points click event.

  39. plotOptions.area.events.hide: data chart, a data sequence of events when hidden.

  40. plotOptions.area.events.show: data chart, a data sequence of events when displayed.

  41. plotOptions.area.events.legendItemClick: data chart, the legend of the event item is clicked, the direct assignment false, it is not clickable.

  42. plotOptions.area.events.mouseOut: mouse data points out of the event.

  43. plotOptions.area.events.mouseOver: mouse data points after the event.

  44. plotOptions.area.marker.enabled: whether to display the chart drawing point tag.

  45. plotOptions.area.marker.states.hover.enabled: whether to allow tag rollover state.

  46. plotOptions.area.marker.states.select.enabled: whether to allow tag selection status.

  47. plotOptions.area.point.events.click: chart every single point click event.

  48. plotOptions.area.point.events.mouseOut

  49. plotOptions.area.point.events..mouseOver

  50. plotOptions.area.point.events.remove: Event deleted chart points are used.

  51. plotOptions.area.point.events.select: Select the chart midpoint event.

  52. plotOptions.area.point.events.unselect: Event chart midpoint when deselected.

  53. plotOptions.area.point.events.update: update event occurs when the data in the chart.

  54. plotOptions.area.visible: When loading the default data series is displayed or hidden.

  55. plotOptions.area.zIndex: In the case of multiple sequences, adjust the stacking order of each sequence.

  56. Above point.events same also applies to the other area of ​​class diagrams (arearange, areaspline, areasplinerange), other histogram (bar, column) and all charts.

  57. plotOptions.area.showInLegend: whether to show in the legend.

  58. plotOptions.area.stacking: is the value of the stack, the stack or as a percentage.

  59. plotOptions.area.states.hover.enabled: whether to allow the state to put the mouse.

  60. plotOptions.area.stickyTracking: sticky mouse tracking data points.

  61. plotOptions.arearange, plotOptions.areaspline, plotOptions.areasplinerange similar to the plotOptions.area

  62. plotOptions.bar.groupPadding: For bar charts packet interval between each packet.

  63. plotOptions.bar.grouping: whether to group the data.

  64. plotOptions.bar.minPointLength :: Defines the point value is zero, the point of the minimum length for

  65. plotOptions.bar.showInLegend: whether to show in the legend.

  66. plotOptions.bar.stacking: is the value of the stack, the stack or as a percentage (normal / percent).

  67. plotOptions.column, plotOptions.columnrange similar to the plotOptions.bar

  68. plotOptions.line related configuration is similar plotOptions.area configuration.

  69. plotOptions.pie.ignoreHiddenPoint: In the pie chart, a particular sequence by Legend click to hide, the entire pie chart is 100% re-assignment, or hidden only on the basis of the original, showing a gap.

  70. plotOptions.pie.innerSize: When drawing a pie chart, pie chart center to reserve much blank.

  71. plotOptions.pie.slicedOffset: allowPointSelect use in conjunction with, when the point is clicked, the corresponding sector peel, this configuration parameter that is spaced at a distance.

  72. Other common configuration parameters plotOptions.pie resemblance to plotOptions.area, plotOptions.scatter, plotOptions.series, plotOptions.spline related configuration similar plotOptions.area configuration.

  73. series: an array.

  74. series.data.color: one color data.

  75. series.data.dataLabels: one sequence data label data.

  76. series.data.events similar to the configuration of plotOptions.area.point.events.

  77. series.data.marker similar to the configuration of plotOptions.area.marker.

  78. series.data.name: name of the configuration data points.

  79. series.data.sliced: Configure the pie chart, the distance separating the sector size.

  80. series.data.x: x value of the point.

  81. series.data.y: y value of the point.

  82. series.name: name of the data sequence.

  83. series.stack: stacked group index.

  84. series.type: data sequence display type.

  85. series.xAxis, series.yAxis: when using multiple axes, specifies which axis corresponds to a number of columns.

  86. subtitle: Configuring the subtitle of the chart.

  87. title: the title of the chart configuration.

  88. tooltip: Configure bubble prompt data in the chart.

  89. tooltip.valueDecimals: Allow decimal places.

  90. tooltip.percentageDecimals: Allow percentage of decimal places.

  91. xAxis, yAxis axis configuration settings

  92. allowDecimals: whether to allow the axis decimals.

  93. categories: an array of classification axes.

  94. plotLines: Draw the main line.

  95. tickColor: color scale.

  96. tickInterval: step value scale.

  97. labels.rotation: scale labels degree of rotation

Chart: chart area option

Chart chart area chart area option is used to set the properties.

parameter description Defaults
backgroundColor Setting chart area background color #FFFFFF
borderWidth Set the chart border width 0
borderRadius Setting the border, rounded angles 5
renderTo Chart placing containers, generally placed in a DIV html, get the DIV id attribute value null
defaultSeriesType The default chart type line, spline, area, areaspline, column, bar, pie, scatter 0
width Chart width, according to the chart container default width adaptive null
height Height chart, the default chart container according to highly adaptive null
margin And other elements in the chart pitch array, such as [0,0,0,0] [Null]
plotBackgroundColor Background color main chart area background color, the X and Y axes of the enclosed area null
plotBorderColor The color of the border region borders the main graph, the X and Y axes of the enclosed area null
plotBorderWidth Width of the main chart area border 0
shadow Shadow is set, you need to set the background color backgroundColor. false
reflow Whether using the chart area from the height and width, if not set width and height, the size will be adaptive. true
zoomType Drag the mouse to zoom, zoom along the x or y axis, can be set to: 'x', 'y', 'xy' ''
events Event callback support addSeries method, click the method, load method, selection method of the callback function.

Color: Color Options

Color options for setting color chart color scheme.

parameter description Defaults
color For color display, an array of charts, line / bar / pie chart so on. array

Highcharts already provides several default color scheme, when you want to display color graphics more than kind, more graphics will automatically start from the first color scheme selection. Custom color scheme approach:

Highcharts.setOptions({
    colors: ['#058DC7', '#50B432', '#ED561B', '#DDDF00', '#24CBE5', '#64E572', '#FF9655',
'#FFF263', '#6AF9C4']
});

Title: Title Options

Title caption option is used to set the relevant properties of the chart title.

parameter description Defaults
text The title text. Chart title
align Horizontal alignment. center
verticalAlign Vertical alignment. top
margin Between the main title and subtitle or chart pitch range. 15
floating Whether floating, if true, the title may be offset from the main chart area, with x, y attribute. false
style Set CSS styles. {Color: '# 3E576F',
fontSize: '16px'}

Subtitle: subtitle options

Property Options subtitle provide substantially the same title with the title, the title can refer to the above options, it is worth mentioning that the subtitle text option defaults to '', that is empty, so the subtitle is not displayed by default.


xAxis: X axis option

X axis option is used to set the chart X-axis related properties.

parameter description Defaults
categories Set the X axis category names, arrays, for example: categories: [ 'Apples', 'Bananas', 'Oranges'] []
title X Axis name, support text, enabled, align, rotation, style and other attributes
labels Set the X axis of each category name style style, format formatter, the angle of rotation and the like. array
max X-axis maximum value (categories is empty), if it is null, then the maximum value will automatically match the X-axis data to a maximum. null
min X axis minimum (categories is empty), if it is null, then the minimum value will automatically match the X-axis data to a minimum. array
gridLineColor Grid (vertical) Color # C0C0C0
gridLineWidth Grid (vertical bar) width 1
lineColor Baseline color # C0D0E0
lineWidth Base line width 0

yAxis: Y axis option

Y-axis option is consistent with the above-mentioned xAxis options, please refer to the table in the parameter settings are no longer listed separately.


Series: Data Column Options

Data Columns option is used to set the chart to show data related properties.

parameter description Defaults
data Displayed in the chart data column, which can be an array or JSON formatted data. Such as: data: [0, 5, 3, 5], or
data: [{name: 'Point 1', y: 0}, {name: 'Point 2', y: 5}]
''
name Displays the name of the data column. ''
type Column data types, support area, areaspline, bar, column, line, pie, scatter or spline line

plotOptions: data point options

plotOptions used to set the chart data points related properties. plotOptions According to various chart types, their properties set slightly different, now commonly used options listed.

parameter description Defaults
enabled Data is displayed directly on the data points false
allowPointSelect Whether to allow the use of the mouse to select the data points false
formatter Callback function, data display format formatter: function () {return this.y;}

Tooltip: balloon data points

Tooltip information for setting the prompt box when the mouse slide data point is displayed.

parameter description Defaults
enabled Whether to display the prompt box true
backgroundColor Set the background color balloon rgba (255, 255, 255, .85)
borderColor Balloon border color, default data column automatically match the color auto
borderRadius Balloon round angle 5
shadow Whether to display the prompt box shadows true
style Setting balloon content styles, such as font color, etc. color: '# 333'
formatter Callback function to format the output of balloon display. Back support content such as html tags: <b>, <strong>, <i>, <em>, <br/>, <span> 2

Legend: Legend Option

legend legend is used to set the properties.

parameter description Defaults
layout Display format, vertical vertical and horizontal level of support horizontal
align Alignment. center
backgroundColor Legend background color. null
borderColor Legend border color. # 909090
borderRadius Legend border angle 5
enabled Whether to display the legend true
floating I can float, with x, y properties. false
shadow Whether to display shadows false
style The content of the legend style ''

For more detailed information, refer to the official website of the English documentation highcharts: http://api.highcharts.com/highcharts