LineChart
A simple line chart to illustrate your data wrapped with the options to customize the color, y-axis and x-axis, title, grids, and more.
Based off of React Highcharts and A10Charts, so all React Highcharts customizations/attributes are usable here.
Props
Name
Type
Default Value
Required
Description
data
Highcharts Data
{}
no
Data for the line chart. Refer to data structure below for formatting the data.
color
string
'green'
no
Set the color of the chart.
xAxis
string
""
no
Units to add to xAxis ticks. Empty strings will result in no units, just values on tick marks.
yAxis
string
""
no
Units to add to yAxis ticks. Empty strings will result in no units, just values on tick marks.
Usage Example
Notes Regarding UI JSON
In UI JSON, the attribute chartConfig can have all of the attributes listed on highcharts documentation.
The axis unit's are also separately configured outside of chartConfig, under this.props.yAxis and this.props.xAxis, instead of this.props.chartConfig.yAxis.
Data Structure
Data Structure Example
Default Chart Configurations
The default chart configurations are as follows:
Thus, a chart with no given configurations will default to a chart with the configurations above. You will need to add your own configurations in the UI JSON in order to overwrite or add any chart configurations.
Last updated
Was this helpful?