'Highcharts multiple yAxis not working on servlet api data

I am fetching data from servlet in my angular application in json format which contains 3 elements. I want to plot the 3rd element of the servlet response object as another axis because of the low values of the data.

Data format:

see data format here

Here is what I've tried:

    yAxis: [
      {
      title: {
        text: 'No. of Requests'
      }
    },{
      title: {
        text: ''
      }
    },
    {
      opposite: true,
      title: {
        text: 'Success Rate'
      }
    }
  ],
    series: {
             [data.SuccessByMsgType.series[0],
              data.SuccessByMsgType.series[1],
              data.SuccessByMsgType.series[2]],
            }

Also, tried passing data as

series: data.SuccessByMsgType.series

Tried, linkedTo as:

yAxis: [
  {
  title: { text: 'No. of Requests' }
  },{
  title: { text: '' }
  },{
  opposite: true,
  linkedTo: 0,
  title: { text: 'Success Rate' }
  }
]

Tried passing yAxis key value pair to data, in the method where I get the data from api, like:

for all 3:

data.SuccessByMsgType.series[0]["yAxis"] = 0
data.SuccessByMsgType.series[1]["yAxis"] = 0
data.SuccessByMsgType.series[2]["yAxis"] = 1

for just 1:

data.SuccessByMsgType.series[2]["yAxis"] = 1

Also tried changing plot type to 'line'

data.SuccessByMsgType.series[2]["type"] = "line"

But that is also not working. The chart is still rendering the 3rd data array with the first two. Its does not form a custom yAxis as it is supposed to (from 0-100 hopefully) for 3rd data set.

I am new to highcharts and angular, can anyone please help? What can be going wrong here?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source