繁体   English   中英

高线图放大折线图无法正常工作

[英]highcharts zooming over line charts not working properly

看看下面的小提琴: http : //jsfiddle.net/fmarino/q9c31a1g/3/

    $(function () {
    $('#container').highcharts({
      chart: {
            zoomType: 'x'        
      },
      credits: {
            enabled: false
        },        title: {
            text: 'Production per orbit'
        },
        xAxis: {
            crosshair: true,            
            title: {
                text: 'Orbits'
            }        },
        yAxis: {
            min: 0,
            title: {
                text: 'Volume'
            }
        },
        legend: {
            align: 'right',
            x: -30,
            verticalAlign: 'top',
            y: 25,
            floating: true,
            backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || 'white',
            borderColor: '#CCC',
            borderWidth: 1,
            shadow: false        },        tooltip: {
            headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
            pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
                '<td style="padding:0"><b>{point.y}</b></td></tr>',
            footerFormat: '</table>',
            shared: true,
            useHTML: true
        },
        plotOptions: {
            bar: {
                dataLabels: {
                    enabled: true
                }
            },
            column: {
               dataLabels: {
                    enabled: true

                },                
                pointPadding: 0.2,
                borderWidth: 0
            }
        },
       exporting: {
            sourceWidth: 1400,
            sourceHeight: 400,
            // scale: 2 (default)
            chartOptions: {
                subtitle: null
            }
        },        series: [ {
        name: 'Total Size',  
        data: [...]
    });
});

然后尝试放大左侧的部分。 对我来说(firefox)仅在缩放后显示l2大小。 难道我做错了什么? 在此类图表上实施缩放的正确方法是什么?

谢谢

正如Halvor建议的那样,我的数据未排序。 实际上,它的顺序相反,缺少一点。

以升序模式对数据进行排序解决了该问题。

谢谢。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM