2
我使用angularjs与highcharts数据点,我想显示的数据点,而悬停所有标签,就像在这里:angularjs和highcharts,标签未显示,除非我悬停在
根据该文件,如下图选项应该工作
plotOptions: {
line: {
dataLabels: {
enabled: true
},
enableMouseTracking: false
}
},
但随着NG-highcharts,我只是得到这个,
任何想法为什么?
附带源代码
HTML
<div ng-app="myapp" ng-controller="main" style="margin-top: 60px; ">
<highchart id="chart1" config="chartConfig">
</highchart>
</div>
JS:
var app = angular.module('myapp', ['highcharts-ng']);
app.controller('main', ['$scope', '$http', function($scope, $http) {
$scope.chartConfig = {
chart: {
type: 'line'
},
title: {
text: 'Test'
},
xAxis: {
categories: [1, 2, 3, 4, 5]
},
yAxis: {
title: {
text: 'Price'
}
},
plotOptions: {
line: {
dataLabels: {
enabled: true
},
enableMouseTracking: false
}
},
series: [{
name: 'Field1',
data: [100, 105, 108, 111, 130]
}, {
name: 'Field2',
data: [210, 215, 218, 231, 240]
}]
};
}]);
这似乎为我工作:http://codepen.io/DeividasK/pen/NpKZjN?editors=1010 –