Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
4
Reply
high chart according to date
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
scropio gurl
8 years ago
216
1
Reply
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]]
Post
Reset
Cancel
Answers (
4
)
Next Recommended Forum
how to get Parent and Child value
problem to hen i edit #jsgrid date format changed