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
Junaid Syed
NA
485
130.6k
How can i append series data into highcharts in jquery
May 9 2018 12:48 AM
Hi iam trying to append the dynamic data to highchart in series.And iam using column chart my code in jquery is some thing like this
<div id=
"container"
style=
"min-width: 310px; height: 400px; margin: 0 auto"
></div>
function
GetEmpDetails() {
$.ajax({
type:
"POST"
,
url:
"../Home/GetData"
,
data: JSON.stringify({ abc: abc }),
contentType:
"application/json; charset=utf-8"
,
dataType:
"json"
,
success:
function
(result) {
console.log(result);
for
(x
in
result) {
var
dataobject =
new
Object();
dataobject.salary = result[x].SALARY;
dataobject.name = result[x].NAME;
obj.push(dataobject);
}
visitorData(obj);
}
});
}
function
visitorData(obj) {
Highcharts.chart(
'container'
, {
chart: {
type:
'column'
},
title: {
text:
'Salary per Month'
},
subtitle: {
text:
''
},
xAxis: {
type:
'category'
,
categories: obj.NAME
},
yAxis: {
title: {
text:
'Total Work Done'
}
},
legend: {
enabled:
false
},
plotOptions: {
series: {
borderWidth: 0,
dataLabels: {
enabled:
true
,
format:
'{point.y:.1f}%'
}
}
},
tooltip: {
headerFormat:
'<span style="font-size:11px">{series.name}</span><br>'
,
pointFormat:
'<span style="color:{point.color}">{point.name}</span>: <b>{point.y:.2f}%</b> of total<br/>'
},
"series"
: [
{
"name"
:
"Browsers"
,
"colorByPoint"
:
true
,
"data"
: [
{
"name"
: obj.names,
"y"
: obj.salaries,
}
]
}
]
})
}
if you see in above example in ajax call iam getting the dynamic data in RESULT in sucess message.Finally iam filtering the data and getting the 2 columns for X axis and Y axis data is getting perfectly but iam sturct at how to append in series in data.Iam getting the data in console in
visitorData
() like this
Please help me...Thank you in advance
Reply
Answers (
1
)
object doesn't Support this Property 'readAsBinaryString' ie
Asp.Net Core 2.0 and JQuery - Issue (Browser Close) Event