Databinding htmlchart vs radchart

2 posts, 0 answers
  1. Tonie Venter
    Tonie Venter avatar
    14 posts
    Member since:
    Jan 2006

    Posted 19 Feb 2014 Link to this post

    I am trying to migrate from radchart to the new htmlchart, however there seems to be a major difference in  how the databinding works in the htmlchart. With Radchart I am currently building a graph using a datasource like this:
    Vendor    Subcategory   Value
    xxx          Sub1               100
    yyy          Sub1                200
    zzz          Sub1                150
    xxx          Sub2               100
    yyy          Sub2                200
    zzz          Sub2                150

    I use this code to bind to the datasource

    this.RadChartEvalSubcategory.DataGroupColumn = "Subcategory";
    this.RadChartEvalSubcategory.PlotArea.XAxis.DataLabelsColumn = "Vendor";
    this.RadChartEvalSubcategory.Legend.Appearance.GroupNameFormat = "#VALUE";
    this.RadChartEvalSubcategory.DataSource = GetEvaluationSubCategoryScores();

    The chart is generated with the Vendors on the x-axis, a bar (Series) for each SubCategory and the values on the y-axis. Works perfectly.

    I am now trying to do the same in htmlchart, and it does not seem to be possible to implement in the same way. Cannot find any examples or information on how to do such a simple binding task as was possible before. Would be disappointing if this is not supported anymore.

    Is there any way to do the databinding in the same way as it was possible in RadChart?

  2. Danail Vasilev
    Danail Vasilev avatar
    1502 posts

    Posted 20 Feb 2014 Link to this post

    Hi Tonie,

    I am sorry to say that the mentioned grouping functionality is not available in the RadHtmlChart. What I can suggest is that you manually do the grouping of the data source fields and then pass the new data source to the chart.

    You can find such an example with a DataTable data source in this forum thread.

    Danail Vasilev
    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 UI for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top