我如何在高位图表中显示不同的绘图线值

时间:2018-10-03 10:46:37

标签: javascript

chart: {
  type: 'column',
  events: {
    drilldown() {
      this.yAxis[0].removePlotLine('y-axis-plot-line-0');
    },
    drillup() {
      this.yAxis[0].addPlotLine('y-axis-plot-line-0');
    },
  },
},
export: {
  enable: true,
},
title: {
  text: titleText,
},
credits: {
  enabled: false,
},
xAxis: [
  {
    type: 'category',
    categories: [],
    labels: {
      style: {
        fontWeight: 'bold',
        fontSize: '13px',
      },
    },
    title: {
      enabled: true,
    },
  },
],
yAxis: [{
  // categories: [],
  // type: 'category',
  labels: {
    style: {
      fontWeight: 'bold',
      fontSize: '13px',
    },
  },
   plotLines : [{
            value: response.data.monthly_avg,
            color: 'green',
            dashStyle: 'shortdash',
            width: 1.4,
            label: {
              text: 'plottext',
            },
          }];
  title: {
    text: yAxistitle,
    enabled: true,
  },
}],
colorAxis: {
  minColor: '#FFFFFF',
  maxColor: '#FFFFFF',
},
legend: {
  align: 'right',
  layout: 'vertical',
  margin: 0,
  verticalAlign: 'top',
  y: 25,
  symbolHeight: 280,
  enabled: false,
},
tooltip: {
  // headerFormat: '<span style="font-size:11px">{series.name}</span><br>',
  pointFormat: ' ₹.<b>{point.y:,.2f}</b><br/>',
},
series: [
  {
    borderWidth: 1,
    data: [],
    dataLabels: {
      enabled: true,
      color: '#000000',
    },
  },
],
drilldown: {
  series: [],
},
plotOptions: {
  series: {
    cursor: 'pointer',
    point: {
      events: {
      },
    },
    borderWidth: 0,
    dataLabels: {
      enabled: true,
      format: ' ₹. {point.y:,.2f}',
    },
  },
}

此绘图线值反映在主要和次要部分绘图上。 我已经尝试过此代码,但是我不知道如何设置不同的绘图值。 但是我正在使用另一个组件从vuejs中的数据库中获取数据。

这是完整的代码,屏幕截图位于下面的链接中。...

以下是屏幕截图:https://i.stack.imgur.com/oVmXL.png

0 个答案:

没有答案