还应该存在一个名称过滤器(文本框),它将根据输入值过滤城市,并且应该显示在图表上,而不是找不到出路。
var temp = [{"name":"bangalore","temprature":25},{"name":"chennai","temprature":45},{"name":"mumbai","temprature":40},{"name":"goa","temprature":35},{"name":"madurai","temprature":38}];
var label= [];
var value= [];
var value1 = [];
var array = eval( temp );
for( var i = 0; i < array.length; i++ ) {
label.push(array[i].name);
value.push(array[i].temprature);
}
value1.push(value);
var myApp = angular.module('myApp',['chart.js']);
myApp.controller('myController',function($http,$scope){
$scope.labels = label;
$scope.data = value1;
$scope.idSelectedVote = 1;
我要求在绘制的图表中突出显示第一个节点,但不能在Angular js图表中找到输出。