highcharts 平移系列位置更改

h7appiyu  于 2022-11-10  发布在  Highcharts
关注(0)|答案(1)|浏览(192)

status
当您移动图表时,底部的“oper“系列出现,“oper”Y轴设置为TOP:90%和高度:10%。移动图表时,平移值设置为初始值并移动。请帮助了解如何在移动图表时不向上移动OPER系列的任何人。

Highcharts.chart( chartKind+'Chart', {
        chart: {
            panning: {
                enabled: true,
                type: 'xy'
            },
            zoomType: 'xy',
            pinchType :'xy',

        },

        xAxis: {
            type: 'datetime',
            minTickInterval : 60 * 10000,
            width: "95%",
            offset: 10,

        },

         yAxis: [{
                height: '90%',
                labels : {
                    format: '{value:,.0f}'
                },
            },

            { 
                zoomEnabled: false,
                categories : ["OFF","ON"],
                top: '90%',
                height: '10%',
                title : { 
                    offset: -10,
                    align: 'high',
                    text : "Oper",
                },
                opposite: true
            },
        ],
    });
but5z9lq

but5z9lq1#

如何移动y轴标题停留在底部的图表,我如何复制这一点?

Highcharts.chart('container', {
  chart: {
    panning: {
      enabled: true,
      type: 'xy'
    },
    zoomType: 'xy',
    pinchType: 'xy',
  },
  xAxis: {
    type: 'datetime',
    minTickInterval: 60 * 10000,
    width: "95%",
    offset: 10,

  },
  yAxis: [{
      height: '90%',
      labels: {
        format: '{value:,.0f}'
      },
    },
    {
      zoomEnabled: false,
      categories: ["OFF", "ON"],
      top: '90%',
      height: '10%',
      title: {
        offset: -10,
        align: 'high',
        text: "Oper",
      },
      opposite: true
    },
  ],
  series: [{
    data: [4, 3, 5, 6, 2, 3],
    yAxis: 1,
  }, {
    data: [4, 3, 5, 6, 2, 3].reverse()
  }]
});

相关问题