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.
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.
But in this solution element "d" has same color as "d", z - as "c" and in legend we have "Bar series 1" and "Bar series 2", not "a", "b", "c", "d", "z".
Hello bmirzai ,
Currently our bar series support single color per series, so if you want all of your bars to be displayed in different color you can define as many series as the background colors that you want. Then you can just assign null values for the bars that you don’t want to be shown.
Otherwise if you doesn’t want to change your datasource you can also check the custom approach shown in the following forum thread:
http://community.infragistics.com/forums/p/48210/256989.aspx#
If you have any additional questions on this matter please feel free to ask.