Flexchart secondary Y axis title orientation

Posted by: cwilson on 23 August 2022, 10:18 pm EST

    • Post Options:
    • Link

    Posted 23 August 2022, 10:18 pm EST

    Maybe I’m blind, but I cannot see how to rotate the Y-Axis title when it has been positioned to the right. The default title is read from the left and I want to flip it to read from the right (like the left Y axis).

    Chris

  • Posted 24 August 2022, 7:48 am EST

    Hi Chris,

    Thanks for reaching out to us with your query.

    JFYI, AxisTitle renders according to their position. We can’t rotate the AxisTitle in FlexChart.

    However, we can do a workaround by handling Rendering event of FlexChart. Where we can draw a rotated string on a particular position.(see code snippet)

    
    private void FlexChart1_Rendering(object sender, RenderEventArgs e)
    {
                e.Engine.SetStroke(Brushes.Black);
                e.Engine.SetFont(new Font("Segoe UI", 9));
                var x = flexChart1.PlotRect.Width + flexChart1.PlotRect.X +50;
                var y = (flexChart1.PlotRect.Height / 2) + 50;
                e.Engine.DrawStringRotated(RightAxisTitle, new C1.Chart._Point(x, y), new C1.Chart._Point(x, y), 90);
    }
    
    

    Please refer the attached sample for the same: AxisTitleRotation.zip

    Best Regards,

    Nitin

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels