Angularjs highchart没有在IE和SAFARI中显示

时间:2017-07-03 14:21:24

标签: javascript angularjs highcharts safari

highchart不会在IE和SAFARI中显示。我尝试从官方高级论坛的解决方案,但没有任何帮助(删除“,”在json结束,或调整页面加载等...) 我有多个不同的高级图表,但这里只有一个用于解释。我调用config函数取决于图表数据。我的应用程序有许多不同的部分,并且很难使工作的plunker。 Thnx

这是我的代码

function getBaseChartConfig(graphName) {
            Highcharts.setOptions({
                global: {
                    useUTC: false
                }
            });
            var config =
                    {
                        xAxis: {
                            ordinal: false
                        },
                        yAxis: {
                        },
                        options: {
                            chart: {
                                zoomType: 'x',
                                backgroundColor: 'rgba(255, 255, 255, 1)',
                                polar: true,
                                type: 'line',
                                borderRadius: 5

                            },
                            legend: {
                                enabled: true
                            },
                            rangeSelector: {
                                //za postavit rucni upis date range-a
                                enabled: false,
                                inputStyle: {
                                    color: 'black'
                                }
                            },
                            navigator: {
                                enabled: true
                            }
                        },
                        series: [],
                        title: {
                            text: graphName
                        },
                        useHighStocks: true
                    };
            return config;
        };
$scope.data.push(solar_voltage);
            $scope.data.push(battery_voltage);
            $scope.data.push(solar_current);
            $scope.data.push(hybridCurrent);
            $scope.chartConfig1 = getChartConfigWithYaxisPlotLines('Production');
            $scope.chartConfig1.series.push({
                id: 1,
                name: "Solar voltage",
                data: $scope.data[0],
                tooltip: {
                    valueDecimals: 2
                }
            }, {
                id: 2,
                name: "Battery voltage",
                data: $scope.data[1],
                tooltip: {
                    valueDecimals: 2
                }
            }, {
                id: 3,
                name: "Solar current",
                data: $scope.data[2],
                tooltip: {
                    valueDecimals: 2
                }
            }, {
                id: 4,
                name: "Hybrid current",
                data: $scope.data[3],
                tooltip: {
                    valueDecimals: 2
                }
            }
            );
 function getChartConfigWithYaxisPlotLines(graphName) {
            var baseChartConfig = getBaseChartConfig(graphName);
            baseChartConfig.yAxis.plotLines = [{
                    color: '#FF0000',
                    width: 1,
                    value: 11.50,
                    label: {text: '11.50'}
                }];
            return baseChartConfig;
        }

这是图像在safari或IE中的外观 enter image description here

这里是CHROME和FIREFOX enter image description here

这是我来自api的json enter image description here

0 个答案:

没有答案