Search code examples
datehighchartsgoogle-maps-markersaxisjstockchart

show multiple trends and different axis for stockChart


The chart trying to create as shown below enter image description here

the working fiddle is as shown below 
     https://jsfiddle.net/BlackLabel/xy6ftpn5/

how to stack the multiple markers on the same date as in the picture. Tried to add multiple series in series parameter

also need trying to figure out how to show multiple y-axis separately for different chart like line marker and bar chart

any pointers will help


Solution

  • You just need to define the yAxis property as an array with multiple objects and then assign each series to the proper yAxis. For example:

    yAxis: [{
      ...
    }, {
      ...
    }, {
      ...
    }],
    
    series: [{
      ...,
      yAxis: 0
    }, {
      ...,
      yAxis: 1
    }, {
      ...,
      yAxis: 1
    }, {
      ...,
      yAxis: 2
    }]
    

    Live demo: https://jsfiddle.net/BlackLabel/oqbzcm7y/

    API Reference: https://api.highcharts.com/highcharts/series.line.yAxis

    Docs: https://www.highcharts.com/docs/chart-concepts/axes