Bar chart with each column(bar) having specific style?

Micro Charts for WPF Forum

Posted 11 years ago by David
Version: 12.2.0573


I was wondering if there is a way to construct a bar chart series such that I can specify how to draw each column(bar) with a provided color palette of my own?   We are currently evaluating ways to utilize your provided control and this bar series seems very promising.  The only problem I see right now is there are only 3 styles available to render individual bar in the series.  The high, the low and the rest.  I would like to explore if it is somehow possible for me to provide a color palette such that each individual column/bar can be such rendered.

Essetially we are trying to construct a histogram with individual bars all rendered using different color.  If this is not the correct control to do things like that, is there any other control I should be looking at?



Comments (1)

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA

Hi David,

I was looking at our style selector code and while it does allow you to completely customize the styles used, it's more for a "state (normal, high, low, etc.) within the series" and not data point specific.  So there isn't a way built-in to do that.

That being said, I think you could get it working via a workaround.  If you put one bar in each series, the style selector then would cycle through the palette colors for each bar (since every bar was in its own series).

So say you had four bars.  Your series values would need to be like this (note how each column only has one series with a non-zero value):

  • Series 1:  4,0,0,0
  • Series 2:  0,10,0,0
  • Series 3:  0,0,8,0
  • Series 4:  0,0,0,7

You can see an example of multiple bar series in the Bar Chart Type sample, down in the Gallery area with label "Two series with semi-transparent bar fills."  I would probably make the baseline visible too.  I haven't tried this workaround but think it would get your desired results.

Actipro Software Support

The latest build of this product (v24.1.2) was released 27 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.