0

I want to make the colored axis line clickable.I want the colored section to be clickable and hoverable. In my case: enter image description here

Expected changes: The colored section to be clickable and hoverable.

option = {
  tooltip: {
    formatter: '{a} <br/>{b} : {c}%'
  },
  series: [
    {
      name: 'Pressure',
      type: 'gauge',
      // progress: {
      //   show: true
      // },
      axisLine: {
      lineStyle: {
        opacity: 0.5,
        onclick: function (event) {
          console.log(event);
        },
        color: [
          [0, '#00f'],
          [0.25, '#0ff'],
          [0.5, '#0f0'],
          [0.75, '#ff0'],
          [1, '#f00']
        ]
      }
    },
      detail: {
        valueAnimation: true,
        formatter: '{value}'
      },
      data: [
        {
          value: 50,
          name: 'SCORE'
        }
      ]
    }
  ]
};

myChart.on('click', function(params) {
 
  console.log('Params',params);
});
Prakash Khadka
  • 153
  • 2
  • 7

0 Answers0