Highcharts multiple data on single point in series
-
27-10-2019 - |
Pergunta
I need to provide multiple data points on a single point inside a series. In easy way, on single x axis point, i need to show two y axis points. But when i provide multiple data points, in a series, it show the last on in the graph.
This fiddle has the basic implementation of the scenario. Notice that first series has 4 points and second does have 3. But in graph only 3 are shown.
Solução
Check this example I made, it has two series that both have an x value with multiple points. Example on jsfiddle.
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container'
},
series: [{
data: [[6, 540], [7, 540], [7, 1620], [8, 1620]]
},{
data: [[6, 340], [7, 340], [7, 620], [8, 620]]
}]
});
Highcharts will render both values for x=7, connecting them with a line.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow