Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
120
Bar series with different number of bars in group
posted

I want create Chart with Bar Series, but  with differrent number of bars in group and different bars titles (ex: first group bars: "a" with value 6, "b" - 4, "c" -2; second group bars: "d" - 1, "z" - 8) and all this in one chart. Can you tell me, how implement this, because standart solution for Bar Series not support behavior like this.

Attach image for example.

 

Parents
No Data
Reply
  • 17559
    Verified Answer
    posted

    Hello bmirzai,

    I have been looking into your scenario and I created a small sample for based on your requirements.

    By default our bar series expect a similar data for all of the columns so they will map the data from the first and the second series to the  y axes based on its order in the collection, not by its labels. Based on this if you have a data with Label =”a” in both of your series and it is on different place in both collection, the XamDataChart will not rendered the bars for “a” from both collection in the same group.

    Therefore if you want to have bar series with different number of bars in group you can just add some null values to the corresponding data. For additional reference on this approach please check the attached sample. 

    If you have any further questions on this matter, feel free to ask.

    DifferentBarCount.zip
Children