i try to display highchart. in my app i have dropdown and calendar when i select value from dropdown and dates from calendar then chart will be display i try this code
var strArray = [['DDSB',39],['DPSB',9],['DSB',26],['MV',35],['PSB',52]];
$(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) {
alert('1');
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "WebForm1.aspx/GetVo",
data: JSON.stringify(obj),
dataType: "json",
async: true,
cache: false,
success: function (result) {
alert('2');
alert(result.d);
alert('3');
// start
strArray = result.d;
var myarray = strArray;
DreawChart(myarray);
alert('4');
},
error: function (result) {
alert("Error");
}
});
}
function DreawChart(result) {
$('#container').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: result
}]
});
}
i use webmethod and in this webmethod return data is
[['DDSB',39],['DPSB',9],['DSB',26],['MV',35],['PSB',52]]
WHEN i select value from dropdown and dates from calenda then this data is display in alert box but chart not display any help please