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

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.


I want to align my left YAaxis labels to right and fixed label width. I use Spectrogram view and want to align the left edges of those charts. (I’m using version 4.0.2)

This is my style definition:

 <Style x:Key="LeftAxisLabelStyle" TargetType="s:DefaultTickLabel">
    <Setter Property="HorizontalAnchorPoint" Value="Right"/>
    <Setter Property="Width" Value="20"/>

but unfortunately it doesn’t work.

  • You must to post comments
Best Answer

Hi Andrew,

Unfortunately your solution does not solve my problem. But I have found my own one. Here you are:

<Style x:Key="LeftAxisLabelStyle" TargetType="s:DefaultTickLabel">
    <Setter Property="ContentTemplate">
                    <TextBlock Width="40" TextAlignment="Right" Text="{Binding Text}"/>

Best regards,

  • Andrew
    Hi Marek, thank you for sharing that answer, it will surely help other people too! Best regards, Andrew
  • You must to post comments

Hi Marek,

Thank you for your question! The default axis layout doesn’t allow to right-align its internals. But, it is possible to right-align the entire axis instead.

You can achieve the desired result providing a panel with a desired Width as LeftAxesPanelTemplate and setting HorizontalAlignment on the axis:

     <ItemsPanelTemplate x:Key="LeftAxesPanel">
         <!-- Set the desired width on the panel -->
         <Grid Width="100"/>

     <!-- Use the panel as a container for left-aligned axes -->
     <s:SciChartSurface LeftAxesPanelTemplate="{StaticResource LeftAxesPanel}">

            <s:NumericAxis Id="LeftAxis" AxisAlignment="Left"  />


Please let me know if this helps.

Best regards,

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.