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
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 28 Oct 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top