- Home
- Forum
- ASP.NET MVC
- Need help on displaying multiple charts in the same view
Need help on displaying multiple charts in the same view
We have analyzed your query. You can achieve this by workaround. We have created JSON data source and it has some data reports of the 2010,2011,2012,2013. Please find the following code snippets and screenshot to illustrate this.
Code Snippet [MVC]:
· Create parent chart and Setting an event PointRegionClick. Which is used to get the point values of the parent chart as follows.
· Create child chart dynamically when an PointRegionClick=”Onclick” event triggered as follows.
· Get the dataSource based on the selection segment of the parent chart.
Screen Shot:
· After run the sample you can get the following parent chart.
· If you click the first segment the four child charts render by using different data sources as bellow.
· If you want to change another dataSource you can click Back button to change other set of data below screenshot shows that
We have made a sample for this. Please find the below sample link to download the sample.
Sample Link:
http://www.syncfusion.com/downloads/support/forum/119634/ze/WebApplication1-1699598923
Please let us know if you have any concern.
Thanks,
Vinothkumar Arumugam.
We have analyzed this. You can easily customize multiple charts by using Chart Drilldown type. Please find the below code snippet and explanations to achieve your requirements.
Code Snippet [MVC Classic]:
· You can create one main view and two partial views as follows. One partial view for loading parent after click on back button another two for child charts.
Main view : ChartFeatures.cshtml
Partial views: 1.ChartPartialView.cshtml
2. ChildChart.cshtml
· You can load multiple child charts by using ajax post back method. Which it is achieved by client side event “ClientSideOnMouseClick”.
Event declaration as follows.
· Create multiple child chart model as below.
· Define the function in _Layout.cshtml page
1. Call multiple chart when click on point region
2.Call main view after clicking on back button.
Below screenshots illustrate this.
· Run the sample you can get following result
· The child charts render by different sources as below.
· Click on “Back” button you can get Parent view as follows.
We have prepared a sample for this. You can download it from below location
Sample Location:
http://www.syncfusion.com/downloads/support/directtrac/141614/ze/ChartDrillDownMVC-1222133300
Please let us know if you have any concern.
Thanks,
Vinothkumar Arumugam.
- 3 Replies
- 2 Participants
-
SH Sharada
- Jul 16, 2015 10:35 AM UTC
- Jul 20, 2015 12:46 PM UTC