Hello, I am evaluating your product and would like to know if there is a way to use superscript or subscript characters in the titles on the chart. We use chemical terminology that we would like to represent. For example we would represent Phosphorus as PO4-P and the 4 would be a subscript character.
- Michael Hevey asked 9 years ago
- You must login to post comments
Hi Michael,
It is possible to template the Axis Title to put any WPF Control in there, so if you can create a simple control or group of WPF controls that represent your title with superscript, then you can place it in an axis title.
To find out how, please see Styling Axis Labels, Axis Titles, Rotating Axis Labels
How to Template the Axis Title
To insert a custom Control into the Axis Title, you can use this code
<Style x:Key="BottomAxisTitleStyle" TargetType="s:AxisTitle">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<StackPanel>
<TextBlock Margin="0,3,0,0" FontSize="9" Text="Showing time on"/>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="XAxis"/>
<TextBlock Margin="0,0,0,3" FontSize="9" Text="(daily Timeframe)"/>
</StackPanel>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
<s:DateTimeAxis TitleStyle="{StaticResource BottomAxisTitleStyle}" />
Hope this helps!
Best regards,
Andrew
- Andrew Burnett-Thompson answered 9 years ago
-
Much appreciated! Nice, I was hoping for this flexibility. Thank you.
- You must login to post comments
Please login first to submit.