![](/img/trans.png)
[英]JqxChart Giving error Error: Invalid negative value for <rect> attribute height=“-1”
[英]HighChart HighStock Error: Invalid negative value for <rect>
加載視圖和HighChart圖表時出現以下錯誤。
我將其范圍縮小為使用導航器(時間軸焦點欄),在圖表中使用了它:
這是我的chartConfig.options內部的外觀,如果我禁用了導航器,我將不會得到那些錯誤,但這是我要使用的功能。
navigator : {
enabled: true,
adaptToUpdatedData: true,
// enabled: false,
// adaptToUpdatedData: false,
series : {
data : vm.navigatorData
}
},
現在,對於默認數據,這就是我創建數組的方式,在用戶執行操作之前,我還沒有數據可以填寫圖表:
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
});
});
我認為這是因為vm.navigatorData為空。 在初始化圖表之前,您應該使用數據填充此數據。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.