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
scropio gurl
NA
147
99.3k
high chart according to date
Jun 28 2016 3:19 AM
HI ALL
i try to display pie chart according to date .. when i select value from drop-down and dates from calendar first i try to display data in alert box..
so data is successfully in alert box now i want data in pie chart i try this but chart not display
<script type=
"text/javascript"
>
var
strArray =
"[['sfdsdfLi', 9],['Kiwsdfi', 3],['Mixesdfd nuts', 1],['Oranges', 6],['Grapes (bunch)', 1]]"
;
$(
function
() {
$(
'[id*=search_data]'
).on(
'click'
,
function
() {
var
from = $(
'[id*=fromdate]'
).val();
var
to = $(
'[id*=todate]'
).val();
var
reg = $(
'[id*=regiondrop] option:selected'
)[0].value;
var
obj = {};
obj.fdate = from;
obj.tdate = to;
obj.region = reg;
GetData(obj);
return
false
;
});
});
function
GetData(obj) {
$.ajax({
type:
"POST"
,
contentType:
"application/json; charset=utf-8"
,
url:
"WebForm1.aspx/GetVo"
,
data: JSON.stringify(obj),
dataType:
"json"
,
success:
function
(result) {
alert(result.d);
alert(
'u'
);
//start
strArray = result.d;
var
myarray = eval(strArray);
drawchar(myarray)
$(
'#containerr'
).highcharts({
chart: {
type:
'pie'
,
options3d: {
enabled:
true
,
alpha: 45
}
},
title: {
text:
'Contents of Highsoft\'s weekly fruit delivery'
},
subtitle: {
text:
'3D donut in Highcharts'
},
plotOptions: {
pie: {
innerSize: 100,
depth: 45
}
},
series: [{
name:
'Delivered amount'
,
data: myarray
}]
});
},
error:
function
(Result) {
alert(
"Error"
);
}
});
}
</script>
return data is
[[
'DPSB'
,1],[
'mv'
,11],[
'PSB'
,8]]
Reply
Answers (
4
)
how to get Parent and Child value
problem to hen i edit #jsgrid date format changed