score:1
Accepted answer
You need to parse the json object into a suitable data format.
See the docs for accepted data formats: https://api.highcharts.com/highcharts/series.line.data
Notice, that y
value should be a number.
The example config:
const json = '[{"minimum": 71, "maximum": 74, "meanAverage": 72, "dateTime": "2018-03-28T13:46:00"}, {"minimum": 57,"maximum": 87, "meanAverage": 71, "dateTime": "2018-03-28T18:00:01"}]',
parsed = JSON.parse(json);
const minimum = [];
parsed.forEach(data => {
minimum.push([new Date(data.dateTime).getTime(), data.minimum])
})
const maximum = [];
parsed.forEach(data => {
maximum.push([new Date(data.dateTime).getTime(), data.maximum])
})
const meanAverage = [];
parsed.forEach(data => {
meanAverage.push([new Date(data.dateTime).getTime(), data.meanAverage])
})
Then you can use your data arrays as you expected:
series: [{
data: minimum
},
{
data: maximum
},
{
data: meanAverage
}
]
Source: stackoverflow.com
Related Query
- How to use Highcharts React to create chart with multiple lines for same XAxis?
- Highcharts - In area chart how to use gradient color for multiple series?
- Highcharts chart with 'datetime' xAxis - use categories on drilldown
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- Multiple pie-charts in the same chart with HighCharts
- How to create a HighCharts chart in react
- How can I make milestone lines with a GANTT chart using the highcharts library?
- How to set column width for columnRange chart with multiple series
- How to create a solid gauge chart with Highcharts in angular 6?
- Highcharts for multiple plot lines each with a different color and show tooltip?
- how to render multiple line charts - highcharts on same page using highcharts react wrapper - highcharts-react-offical
- How can I create a specific Json output for use with Highcharts?
- Highcharts : using same div to load a chart multiple times with different series data
- How to have multiple highcharts with different series data in vuejs without repeating code
- Rendering Highcharts Chart in Multiple divs with same ID
- how do you create custom buttons with highcharts that each data buttons calls anather php script for its data
- Highcharts - How to combine unique legend for multi-series pie chart which perform same action for both series? (like onclick: show/hide)
- Create Histogram with bellcurbe with in the same chart Highcharts
- Why does highcharts sankey chart sometimes combine multiple nodes with same node name but different Id into one and hide the lines?
- Line and column combo chart with multiple columns for each category, how to position line marker for each category on a specific column?
- Highcharts - use same chart on multiple places
- Parsing JSON for use with Highcharts using jquery .parseJSON or JSON.parse: how to remove quotes from function calls for formatters?
- How to create a legend for bar colors in a Highcharts bar chart
- How to create combo chart with Highcharts
- HighCharts how to use different plotOptions per yAxis in a multiple axis chart
- how can i create threshold chart with highcharts
- use multiple json calls for drawing multiple lines on highcharts php
- How to create a multi y-axis chart with drill down in Highcharts
- how do you create a link on highcharts to open up pop up window with another chart
- How to Create a Stacked Column Chart with Dynamic Series in Highcharts
More Query from same tag
- Angular 4 cannot used data from http post response to highchart
- fix height of column in stacked percentage column highcharts
- Highstock chart rangeSelector minute and day doesn't work
- cannot use strings in data in highcharts on doughnut charts
- Scrollbar creating overlaping chart div
- change value and run function on click
- Highcharts - How to set a gradient theme for each type of graph globally?
- Highcharts - how to remove "Open in Highcharts Cloud" from the export menu
- How do you change plotBackGroundColor dynamically if value exceeds a maxium value in Highcharts?
- Overlaping date labels on xaxis in Highstock
- how to split by hour in highcharts while using x-axis type date range
- Updating Highchart Series Data with Formatted AJAX Return
- Javascript HighCharts Math Operations in ToolTip
- problem with highcharts series option
- Formatting the year in highcharts
- Is it possible to create a multi level (stacked) donut chart with variable diameter on the last stack
- HighCharts: show alla y axis on tooltip
- Highcharts small size div not showing minorTickInterval
- Highcharts - Solid Gauge - Inconsistent Styling and Improper Values
- Disable a complete bar in highcharts when clicking on its label
- Highcharts Gantt - how to make the horizontal rows / lanes taller?
- Javascript Highcharts cannot get the name of the click column in the onclick event
- How to create highlight area under curve in high chart?
- Highcharts add a Mean line to BoxPlot chart
- How to add blank spaces in highcharts subtitle option
- Angular multi select chart
- Pass data to Stacked Column Chart (Highcharts Framework)
- How to make json object for this type in c#?
- Add new series to category highcharts
- web page is hanging while loading from DB and large data not showing on charts in asp.net mvc5