Highcharts在另一张图表中固定

时间:2015-03-06 08:57:01

标签: javascript highcharts

我在柱形图上添加solidgauge类型的图表时遇到问题。 highcharts网站上的组合部分演示包含行+列+饼图类型的示例,但将类型更改为“solidgauge”会出错。 有人可以提供一个例子或解释如何做到这一点? 或者可能无法完成?

代码:

var weeks = [1,2,3,4],
    plan_2g = [5,6,3,4],
    install_2g = [5,6,4,3],
    plan_3g = [5,4,3,2],
    install_3g = [4,3,2,1]

$('#container').highcharts({

            chart: {
                type: 'column',
                zoomType: 'y'
            },

            title: {
                text: 'Main title'
            },

            xAxis: {
                categories: weeks
            },

            yAxis: {
                allowDecimals: false,
                min: 0,
                title: {
                    text: 'RBS-s'
                }
            },

            tooltip: {
                shared:true
            },
            plotOptions : {
                column: {
                    grouping: false,
                    shadow: false,
                    borderWidth: 0
                }
            },

            series: [{
                name: '2G Plan',
                data: plan_2g,
                color: 'rgb(124, 181, 236)',

                pointPadding: 0.3,
                pointPlacement: -0.3
            }, {
                name: '2G Install',
                data: install_2g,
                color: 'rgb(82, 119, 154)',

                pointPadding: 0.4,
                pointPlacement: -0.3
            }, {
                name: '3G Plan',
                data: plan_3g,
                color: 'rgb(134, 216, 115)',

                pointPadding: 0.3,
                pointPlacement: 0
            }, {
                name: '3G Install',
                data: install_3g,
                color: 'rgb(95, 154, 82)',

                pointPadding: 0.4,
                pointPlacement: 0
            }
            ],
            exporting: {
                sourceWidth: 1000,
                sourceHeight: 400,
                scale: 1,
                chartOptions: {
                    subtitle: null
                }
        }
        });

的jsfiddle     http://jsfiddle.net/5vomwh1j/

非常感谢!

0 个答案:

没有答案