Click here to Skip to main content
15,890,185 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hi,

I need to create chart which can be created by Jquery or C# code(Jquery preferred). A chart must be bar chart.

Eg. Country (US, Aus, Ger)

1] Firstly on page load : Bar for country should appear. (There is only 1 stack bar for country)
2]On Click of any country : Respective States should appear. (Now, There are 2 stack bars country & State )
3] On Click of any State : Respective District should appear. (Now, There are 3 stack bars including district bar )
4] On Click of any District : Respective City should appear. (Now, There are 4 stack bars including city bar )

All bar's should be in same chart and it will change graph on click of respective value.

I have used JQPlot, High chart and able to capture onclick event. A point where i am stuck is unable to show all bars in same chart.

Please refer any link or any suggestion.
Posted
Comments
Prasad Khandekar 9-Jun-14 2:27am    
It will be very nice if you also post the code snippet.
Bajirao_ 9-Jun-14 2:59am    
I have used code like http://www.jqplot.com/tests/bar-charts.php And

$('#chart3').bind('jqplotDataClick',
function (ev, seriesIndex, pointIndex, data) {
$('#info3').html('series: '+seriesIndex+', point: '+pointIndex+', data: '+data);
}
);

Allow me to capture onclick. but i need to render graph like http://www.forbes.com/sites/tomkonrad/2014/04/29/better-than-dollars-per-watt/
Bajirao_ 10-Jun-14 9:41am    
Oh Dear,

I made it.... I used http://workshop.rs/jqbargraph/
And then written custom code for it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900