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

Answered
1
0

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.

  • You must to post comments
Best Answer
0
0

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

  • Michael Hevey
    Much appreciated! Nice, I was hoping for this flexibility. Thank you.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.