小编J. *_*e43的帖子

Highcharts | 制作多个y轴刻度

我试图使这个图表有多个Y轴,所有Y轴都有不同的值和刻度间隔.像信号强度一样,在0%-100%的范围内,温度0F-100F和主电源是0V到25V,但似乎无法弄明白.这是我的jFiddle:http: //jsfiddle.net/0k5k8ygz/

码:

function createChart() {

    Highcharts.stockChart('container', {

        rangeSelector: {
            selected: 4
        },

        yAxis: [{ // Primary yAxis 
            labels: {
                format: '{value}°F',
                style: {
                    color: Highcharts.getOptions().colors[2]
                }
            },
            title: {
                text: 'Temperature',
                style: {
                    color: Highcharts.getOptions().colors[2]
                }
            },
            opposite: true

        }, { // Secondary yAxis
            gridLineWidth: 0,
            title: {
                text: 'Main Power',
                style: {
                    color: Highcharts.getOptions().colors[0]
                }
            },
            labels: {
                format: '{value} volts',
                style: {
                    color: Highcharts.getOptions().colors[0]
                }
            }

        }, { // Tertiary yAxis
            gridLineWidth: 0,
            title: { …
Run Code Online (Sandbox Code Playgroud)

highcharts

4
推荐指数
1
解决办法
3442
查看次数

标签 统计

highcharts ×1