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

0
0

Dear SciChart Team,

I am trying to rotate the Tick Labels of the X-Axis.
Currently I am using “RotateTransform” in combination with “LayoutTransform” with a negative angle. The labels already rotate, but they rotate around the center of width and size of the label.
What I want to achieve is that the rotated label ends on the Tick line of the X-Axis like in Screenshot from an Excel Diagram which is attached to this post.
Is there any build in Property I can use to “right align” the labels which I haven’t found yet?

Best Regards,
Nick

Version
6.4.0.13629
Images
  • You must to post comments
0
0

Hello Nick Müller,

I believe that you have to set anchor point property according to your needs. You can try something like this:

<Style x:Key="AxisLabelStyle" TargetType="s:DefaultTickLabel">
        <Setter Property="RenderTransform">
            <Setter.Value>
                <RotateTransform Angle="-45"/>
            </Setter.Value>
        </Setter>
        <Setter Property="LayoutTransform">
            <Setter.Value>
                <RotateTransform Angle="90"/>
            </Setter.Value>
        </Setter>
        <Setter Property="HorizontalAnchorPoint" Value="Right"/>
    </Style>
  • Nick Müller
    Hello Nazariy Pelyushkevych, Thank you for your response. I have a strange behavior when using the “HorizontalAnchorPoint” with Value=”Right”. It flips the Axis Labels into reversed order. So if the Labels where “1 2 3 4” it flips them to “4 3 2 1”. I have no idea why it should do that. Do you have any Idea about this?
  • Andrew Burnett-Thompson
    Hi Nick, we’ve noticed some strange behaviour too and labels getting flipped in position. Going to investigate this and get back to you. Best regards, Andrew
  • Nick Müller
    Hi Andrew, thanks for investigating this.
  • You must to post comments
0
0

Hello Nick Müller,

I’ve found the cause of flipping axis when horizontal anchor is changed, and this is definitely a bug and we’re working on fixing this. But it might take quite big amount of time as this bug is quite deeply placed.

As for your problem, it seems that it’s not possible to achieve using current version of SciChart(even after fixing that anchorPoint). So you can log your inquiry as a feature request in our FR system here: https://www.scichart.com/feedback-policy/

Also I can suggest you to play with the properties like CenterX\CenterY properties in your transforms.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.