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
3220
xamDataChart: How to make sure, that CustomMarker is completely in view
posted

Hello,

I have a custom MarkerTemplate and YAxis MaximumValue is set to "auto" (double.NaN), since the values of the YAxis can vary.

How to make sure, that my marker is always completely shown in the chart area?

<ig:ColumnSeries.MarkerTemplate>
                        <DataTemplate>
                            <StackPanel>
                                <Border CornerRadius="5" Background="{Binding ActualItemBrush}"
                                        BorderBrush="{Binding Series.ActualMarkerOutline}" BorderThickness="0.5">
                                    <TextBlock Margin="2"                                                   
                                                   Foreground="White"
                                                   FontSize="12"
                                                   HorizontalAlignment="Center">
                                                <Run Text="Ø="/><Run Text="{Binding Item.Info}"/>
                                    </TextBlock>
                                </Border>
                            </StackPanel>
                        </DataTemplate>
                    </ig:ColumnSeries.MarkerTemplate>

Parents
No Data
Reply
  • 29065
    Offline posted

    I recommend that you use the XamDataChart.PlotAreaMargin Thickness property. This property will allow you to place some padding between all four sides of the edges and the actual area where the points are plotted. Let me know if you have any questions.

Children
No Data