This is a migrated thread and some comments may be shown as answers.

BarChart - Modify Axis via JS

1 Answer 22 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Sharepoint
Top achievements
Rank 1
Sharepoint asked on 24 Oct 2013, 03:32 PM
I have three different datasets.  The user is going to be toggling between the three datasets.  The three datasets are different data, and when they are swapped out, the labels need to be changed client side.  In the future, more data sets could be added with different column names, so I need a way for this process to be dynamic.

How can this be done?

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 28 Oct 2013, 12:54 PM
Hi,

If you are going to change the DataSource of the chart you can change other settings (e.g. the DataLabelsField of the x-axis) at the same time. This approach is used to achieve the drilldown in this demo, and I believe it is quite close to what you are looking for: http://demos.telerik.com/aspnet-ajax/htmlchart/examples/drilldownchart/defaultcs.aspx. It shows how you can configure settings for the chart based on the datasource fields. Once the chart has correct settings it will render properly on the client without additional JS code.


Regards,
Marin Bratanov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Chart (HTML5)
Asked by
Sharepoint
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or