Change Axis Header Orientation

I have an SfChart that displays 2 step line series in separate chart rows. Neither Y axis displays any axis labels, but they both have an axis header naming the data. I would like to change the headers so that they display horizontally instead of vertically. Is this possible


3 Replies

DD Devakumar Dhanapoosanam Syncfusion Team June 24, 2022 02:53 PM UTC

Hi Michelle Barnett,


We can customize the axis label Header orientation by adding TextBlock as the Header content and rotate it as per in below code example.


<chart:SfChart.SecondaryAxis>

    <chart:NumericalAxis ShowGridLines="False" TickLineSize="0"

                         Minimum="0" Maximum="20" LabelExtent="20">

        <chart:NumericalAxis.Header>

            <TextBlock Text="Value1" RenderTransformOrigin="0.5,0.5">

                <TextBlock.RenderTransform>

                    <RotateTransform Angle="90" />

                </TextBlock.RenderTransform>

            </TextBlock>

        </chart:NumericalAxis.Header>

       

    </chart:NumericalAxis>

</chart:SfChart.SecondaryAxis>


A picture containing diagram

Description automatically generated

https://help.syncfusion.com/wpf/charts/axis#header


Please find the sample from the attachment below and let us know if you need any further assistance.


Regards,

Devakumar D


Attachment: SF_175837_cd5583dc.zip


MB Michelle Barnett June 29, 2022 01:03 PM UTC

Thanks, that does exactly what I need



DD Devakumar Dhanapoosanam Syncfusion Team June 30, 2022 06:08 AM UTC

Hi Michelle Barnett,


Thanks for your update.


Please let us know if you need any further assistance.


Regards,

Devakumar D


Loader.
Up arrow icon