Highcharts error #12 问题解决办法

1.问题描述

  • 当highcharts需要绘制的点超过1000个点的时候会提示以下错误:
Highcharts error #12: www.highcharts.com/errors/12
  •  

表扬一下highcharts的错误描述,直接官方有链接解释噢。 
打开页面之后,官方对错误的解释和描述是这样的:

Highcharts Error #12

Highcharts expects point configuration to be numbers or arrays in turbo mode

This error occurs if the series.data option contains object configurations and the number of points exceeds the turboThreshold. It can be fixed by either setting the turboThreshold option to a higher value, or changing your point configurations to numbers or arrays. See turboThreshold.
  •  

翻译一下

Highcharts 错误12
Highcharts 期望 点 的设置是数字或者数组,在加速模式中。

这个错误的产生一般是序列的数据选项中包含的对象也就是点的个数超过了turboThreshold(加速临界值)造成的。可以通过两种办法来修复,一是将turboThreshold(加速临界值)设置大一点的数字,或者是把点的数据格式改为数字或者数据。请参照turboThreshold选项。

解决方法:把turboThreshold设置大一点

            plotOptions: {
                series: {
                    stacking: '',
                    turboThreshold:200000,//添加这一句,如果设置为0,则取消此项检查
                    point: {
                        events: {
                        }
                    }
                },
                spline: {
                    lineWidth: 2,
                    marker: {
                        enabled: false,
                        states: {
                            hover: {
                                enabled: true,
                                radius: 2.5
                            }
                        }
                    },
                    shadow: false
                }
            },

 

转载于:https://my.oschina.net/u/2391658/blog/1522905

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值