BarChart - Modify Axis via JS

2 posts, 0 answers
  1. Sharepoint
    Sharepoint avatar
    1 posts
    Member since:
    Oct 2013

    Posted 24 Oct 2013 Link to this post

    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?

  2. Marin Bratanov
    Marin Bratanov avatar
    5706 posts

    Posted 28 Oct 2013 Link to this post


    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: 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.

    Marin Bratanov
    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.
Back to Top