简体   繁体   中英

HighChart HighStock Error: Invalid negative value for <rect>

I'm getting the following errors when I load my view and HighChart chart.

在此处输入图片说明

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.

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. You should fill this with data before initializing the chart.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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