I am creating a Dashboard showing results by user in a 3D UltraBarChart. The call to stored procedure brings back 9 rows of data. Those nine rows become the bars in chart. Of the 9 results 7 are 1 person and 2 are the other. I would like for the 7 of first person be all the same color and the other two a different color.
Attached is picture of barchart as it currently is displaying.
Trying to make all Paul lets say Red and Erin Green
Thanks for any help. Most appreciated.
Tp,
Hello Tom,
I have been investigating into a way to achieve your requirement in this case, and I would recommend utilizing the UltraChart.ColorModel.CustomPalette property of the chart to achieve this. This property takes a Color[] and the indices of the colors in that array will be assigned to the bar representing the data item at that index in your underlying data source. For example, if the Color at index 2 is green, then the bar representing your data item at index 2 in your data source will be painted green.
Knowing this, in order to make all Paul bars red and all Erin bars green, you will need to loop through your data source and construct a Color[] with the same length as your data source, assigning each index based on the value of the name for the data item.
Please let me know if you have any other questions or concerns on this matter.