SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

0 votes
2k views

Hi,

I have a chart where the Axis Title is truncated because the title is too long. Is there a way to wrap or put an ellipsis in the Axis Title? The height of my chart should be fix, so I have to do something about the title instead.

Thanks,
Ira

1 vote
7k views

Hi

I want to override the default AxisLabelTemplate for a DateTimeAxis beyond the normal circumstances.
Setting the AxisLabelTemplate to a StaticResource is easy enough, but all I have inside the Template is the CursorFormattedDataValue and I want to be able to send in something more then a simple string.

<ControlTemplate x:Key="RolloverModifierAxisLabelTemplateDefault">
    <Border Background="LightGray" 
            Opacity="0.80" 
            BorderThickness="0"
            CornerRadius="5"
            Padding="2"
            Visibility="{Binding IsXAxis, Converter={StaticResource BoolToVisibilityConverter}}">
        <TextBlock Text="{Binding CursorFormattedDataValue}" />
    </Border>
</ControlTemplate>

Extending the LabelProviderBase gives me the opportunity to override the FormatCursorLabel method, but it only returns a string and not an object and therefore I can not pass my own data structure to be used inside the AxisLabelTemplate.

How can we solve this issue? Is there a workaround, or is this something you need to implement?

Showing 2 results
This template supports the sidebar's widgets. Add one or use Full Width layout.