Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
65
Alignment of Marker in ColumnSeries
posted

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.

Parents
No Data
Reply
  • 34510
    Verified Answer
    Offline posted

    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.

Children