Hello,
How can I change the position of Marker on Column series?
I've created DataTemplate for MarkerTemplate in YAXis
<DataTemplate x:Key="MarkerTemplate"> <TextBlock Margin="5,0,0,5" Text="{Binding Item.YAxisData}" Foreground="Black" FontSize="10" > <TextBlock.RenderTransform> <RotateTransform Angle="-90"/> </TextBlock.RenderTransform> </TextBlock></DataTemplate>
The problem is, when I set a marker as a vertical text, it's not aligned with the column and the tick under it.
When it's horizontal it's fine. Also, it would be great if the solution you provide works well with the zoom as well.
Hello Rob,
TranslateTransform works as expected, but for some reason setting the margins didn't.
Thank you!
Best regards,
Darko
Hi Darko,
How are you trying to align the text to the column? Currently the marker is rendered at the top of each column. What your template will do is rotate the text 90 degrees upwards by the top left corner of the text. Do you have a picture of what the final result should look like?
Generally you can move the marker by adjusting the Margin or by using a TranslateTransform.