【问题标题】:angularjs, HighCharts (Aw, Snap!) crashangularjs, HighCharts (Aw, Snap!) 崩溃
【发布时间】:2019-01-09 06:02:00
【问题描述】:

当我尝试点击 highchart 图表图例时,它显示错误 Aw,在 chrome 中对齐,在 Firefox 中显示图表需要很长时间

在附加的图像中可以看到错误和highcharts的图例:

【问题讨论】:

  • 如果您使用 --enable-logging --v=1 标志启动 Chrome,您可以尝试查看崩溃日志,您可以从 Chrome 的用户数据目录中找到更多信息
  • 您能告诉我 Highcharts 的哪个版本,以及您运行的是哪个操作系统吗?另外,请提供浏览器版本和图表配置。

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


【解决方案1】:

请更新您的谷歌浏览器。 此代码最适合您:

$(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>

【讨论】:

    猜你喜欢
    • 2013-12-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-08-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多