[英]Highcharts-ng not updating to reflect underlying data
I've run into an issue with the newest (1.0) release of Highcharts-ng : the chart no longer updates to reflect the underlying data. 我遇到了最新(1.0)版本的Highcharts-ng的问题 :图表不再更新以反映基础数据。
Here's a Plunker demonstrating how it SHOULD work (highcharts-ng v0.0.13) 这是一个说明它应该如何工作的Plunker(highcharts-ng v0.0.13)
And here's a Plunker demonstrating what happens in the 1.0 release (nothing) 这是一个Plunker,展示了1.0版本中发生的一切(什么都没有)
I've looked through the Highcharts-ng docs and haven't been able to find anything about the chart not updating anymore. 我已经查看了Highcharts-ng文档,但没有找到关于图表的任何信息,这些信息不再更新。 Does anyone have any input on how to get around this?
有人对如何解决这个问题有任何意见吗?
Demo app controller: 演示应用程序控制器:
angular.module("app", ['highcharts-ng'])
.controller("AppController", function($scope, $http) {
$scope.title = "Click 'add a point' to see chart update";
// Chart configuration object.
$scope.chartConfig = {
chart: {
type: 'column'
},
series: [{
data: [10, 15, 12, 8, 7],
id: 'series1'
}],
title: {
text: 'Hello'
},
xAxis: {
}
};
$scope.addPoint = function(){
$scope.chartConfig.series[0].data.push(Math.random());
}
})
Your plunkr uses Highcharts 4.2.4 which does not support chart.update()
method yet. 您的plunkr使用Highcharts 4.2.4,该
chart.update()
尚不支持chart.update()
方法。 Highcharts-ng 1.x requires Highcharts 5+. Highcharts-ng 1.x需要Highcharts 5+。
<script data-require="highcharts@*" src="https://code.highcharts.com/5/highcharts.js"></script>
example: https://plnkr.co/edit/7rXbYUqoFpeRUnYmQaA9?p=preview 示例: https : //plnkr.co/edit/7rXbYUqoFpeRUnYmQaA9?p = preview
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.