Customising BarSeries to display the value within the bar

Charts for WPF Forum

Posted 3 years ago by Colin H
Version: 20.1.1

I have some BarSeries charts, and am using the LabelVisibility to show the bar's Y 'value'. I'd prefer though to display the Y value within the bar. (Hope that makes sense - I can't spot a way to paste an example image into this post)

Is this possible, and if so, any pointers/tips to how to customise it....? 

Comments (1)

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

Hi Colin,

You could probably do this by customizing the BarSeries.BarTemplate. 

If you open our BarStyles QuickStart and add this to the BarSeriesStyle's Setters, you should be able to see the value in the bar:

<Setter Property="BarTemplate">
				<Rectangle Fill="Yellow" />
				<TextBlock Text="{Binding YValue}" VerticalAlignment="Center" HorizontalAlignment="Center" />

[Modified 3 years ago]

Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.