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
Sachin Singh
7
55.8k
81.9k
ChartJs with server side data
Dec 8 2020 4:25 AM
hii all
i have below json data from web api
[{
"DepartmentName"
:
"HR"
,
"Performance"
:[30,40],
"Month"
:[
"Jan"
,
"feb"
]},{
"DepartmentName"
:
"Dev"
,
"Performance"
:[60,80],
"Month"
:[
"Jan"
,
"feb"
]}]
I need to show a bar chart.
Each department's paerformance each month as shown in below figure
i am stuck on generating different series
$(function(){
$.ajax({
type:
"POST"
,
url:
"/ChartJS/ThreeChart"
,
contentType:
"application/json; charset=utf-8"
,
dataType:
"json"
,
success: function (chData) {
var ctx = document.getElementById(
'myChart'
).getContext(
'2d'
);
var myChart =
new
Chart(ctx, {
type:
'bar'
,
data: [{
label:
"??"
,
data: chData[1], ??
}]
});
}
})
})
kindly , suggest me a robust solution.
Reply
Answers (
1
)
PDF XFA FILL FORM
winscp SFTP without sshHosKey