TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mahesh Verma
276
6.4k
1.1m
Angular2 chart updating issue
Apr 27 2018 6:32 AM
Currently, I am using the ng2 chart in my application, but I am unable to bind chart data dynamically.
My code is :
public
barChartOptions:any = {
scaleShowVerticalLines:
false
,
responsive:
true
};
public
barChartLabels:string[] = [
'Feb'
,
'Mar'
,
'Apr'
];
public
barChartType:string =
'bar'
;
public
barChartLegend:
boolean
=
true
;
public
barChartData = [
{data: [5,7,9], label:
'Activity'
},
];
Want to change "data" property inside the barChartData, like this :
const
data0 = [ 8,8,9 ];
this
.barChartData[0].data=data0;
Above lines i wrote inside ngOnInit().
I also go through these links :
https://stackoverflow.com/questions/39078061/dynamically-updated-ng2-charts
https://alligator.io/angular/chartjs-ng2-charts/
https://github.com/valor-software/ng2-charts/issues/859
But didn't get any solution, could you please help me out.
Reply
Answers (
1
)
one Of my developer has developed an application in angular
what is Matcher in Angular 2/4/5 Routing