angularjs,HighCharts(Aw,Snap!)崩溃

时间:2018-08-01 15:27:21

标签: javascript angularjs highcharts google-chrome-devtools highstock

当我尝试单击高图表图例时,它显示错误Aw,插​​入chrome并在Firefox中显示图需要花费很多时间

在附加的图像中看到错误,并且显示了高图的图例:

highcharts

1 个答案:

答案 0 :(得分:0)

请更新您的Google Chrome。 这段代码最适合您:

$(function () {
        var data = {
          "xCategories": ["Oct 13","Nov 13","Dec 13","Jan 14"],
          "ySeries": [
            {
              "name": "Product1",
              "data": [11023.06902288,1059.48907912,1269.79964983,1620.3101287],
              "type": "column"
            },
            {
              "name": "Total volume",
              "data": [2185819284,2101885633.7272727,2553791958.4090905,3229867446],
              "type": "spline",
              "yAxis": 1
            }
          ],
        };

    $('#container').highcharts({
            chart: {
                animation: false,
                type: 'column'
            },
            title: {text: null},
            xAxis: {
                title: {text: 'month'},
                categories : data.xCategories
            },
            yAxis: [{
                title: {text: 'Monthly spend ($)'}
            },{
                title: {text: 'volume'}, opposite: true
            }],
            tooltip: {
                shared: true,valueDecimals: 2,valuePrefix: '$'
            },
            plotOptions: {
                column: {stacking: 'normal'},
                spline: {
                    tooltip: {valuePrefix: '', valueSuffix: ' units.', valueDecimals: 0}
                },
                series : {animation: false}
            },
            series: data.ySeries
        });
});
<script
  src="https://code.jquery.com/jquery-2.2.4.min.js"
  integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44="
  crossorigin="anonymous"></script>
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>

<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>