0

我正在使用 Highcharts v3.0.1。该图表有多个系列,包括样条和堆积柱。由于某种原因,堆叠柱形图的颜色在 IE8 中是隐藏/透明的,并且在所有其他浏览器中都可以正常工作。IE8IE8

法郎 在此处输入图像描述

选项变量定义为

optionsChart= {
        chart: {
            renderTo: 'divChart',
            zoomType: 'xy',
            reflow: false,
            resetZoomButton: {
                position: {
                    align: 'left', // by default right
                    x: 0,
                    y: -30
                }
            }
        },
        title: {
            text: 'WindBOOST'
        },
        credits: {
            enabled: false
        },
        subtitle: {
            text: ''
        },
        xAxis: {
            categories:  UPGRADES.WB_WIND_SPEED,
            tickInterval: 4,
            title: {
                enabled: true,
                text: 'Wind Speed (m/s)'
            }
        },
        yAxis: [{ // Primary yAxis
            labels: {
                formatter: function() {
                    return Highcharts.numberFormat(this.value, 0) +'';
                },
                style: {
                    color: '#89A54E'
                }
            },
            title: {
                text: 'Power (KW)',
                style: {
                    color: '#89A54E'
                }
            },
            min:0
        }, { // Secondary yAxis
            gridLineWidth: 0,
            title: {
                text: 'Site Level Production (MWh)',
                style: {
                    color: '#4572A7'
                }
            },
            labels: {
                formatter: function() {
                    return this.value +'';
                },
                style: {
                    color: '#4572A7'
                }
            },
            min:0,
            opposite: true
        }],
        tooltip: {
            enabled: false
        },
        plotOptions: {
             column: {
                 stacking: 'normal'
             },
            series: {
                marker: {
                    fillColor: 'none',
                    lineColor: null
                }
            }
        },
        legend: {
            itemHiddenStyle: {
                color: '#666060',
                fontSize: '10px'
            }
        },
        series: [{
            name: 'Site Power Curve',
            color: '#E04023',
            type: 'spline',
            data: []
        }, {
            name: 'WindBOOST',
            color: '#89A54E',
            type: 'spline',
            data: []
        },{
            color: '#910000',
            name: 'Stacked',
            type: 'column',
            yAxis: 1,
            data: []
        },{
            name: 'IEC TCII',
            color: '#4572A7',
            type: 'column',
            yAxis: 1,
            data: []
        }]
};

然后动态填充数据值

 optionsChart.series[1].name = "WindBOOST Power Curve";
     optionsChart.series[2].name = "WindBOOST";
     optionsChart.series[3].name = "Baseline";


     optionsChart.series[3].data = UPGRADES.WEIBULL_BASELINE;
     optionsChart.series[2].data = UPGRADES.WEIBULL_UPGRADED;

     optionsChart.chart.renderTo ="divChartWindBOOST";

    chartComparison = new Highcharts.Chart(optionsChart);
    chartComparison.setTitle({text: "WindBOOST"});

任何想法?

4

0 回答 0