简体   繁体   English

HighChart HighStock错误:的负值无效<rect>

[英]HighChart HighStock Error: Invalid negative value for <rect>

I'm getting the following errors when I load my view and HighChart chart. 加载视图和HighChart图表时出现以下错误。

在此处输入图片说明

I narrowed it down to the use of the Navigator (timeline focus bar), I'm using it in my chart: 我将其范围缩小为使用导航器(时间轴焦点栏),在图表中使用了它:

在此处输入图片说明

Here is what it looks like, inside of my chartConfig.options if I disable the navigator I won't get those errors, however this is a feature I want to use. 这是我的chartConfig.options内部的外观,如果我禁用了导航器,我将不会得到那些错误,但这是我要使用的功能。

navigator : {
    enabled: true,
    adaptToUpdatedData: true,
    // enabled: false,
    // adaptToUpdatedData: false,
    series : {
        data : vm.navigatorData
    }
},

Now for the default data, this is how I create my Array, I don't have data to fill in the chart yet, until the user takes an action: 现在,对于默认数据,这就是我创建数组的方式,在用户执行操作之前,我还没有数据可以填写图表:

vm.navigatorData = [];
var count = 0;
// creates a chart with 97 x points all with 0 y value:
_.times(97, function() {
    dayHolder.push({
        'x': count++,
        'y': 0
    });
});

I think this is because vm.navigatorData is empty. 我认为这是因为vm.navigatorData为空。 You should fill this with data before initializing the chart. 在初始化图表之前,您应该使用数据填充此数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM