Home Forums WinForms controls Xceed Chart for WinForms Axis scale in reverse

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #18872 |

    Hello,

    I have done a Chart with axis X, Y and Z.

    The problem is with the Axis X. I want to put the scale in reverse.
    I mean, now the scale it goes from left (0) to right (maximum x), and I would like to draw from right (0) to left (maximum x).

    0 5 10 15 20 25 –> Now

    25 20 15 10 5 0 –> Wanted

    My code is:

    //X Axis
    m_Chart.Axis(StandardAxis.PrimaryX).ScaleMode = AxisScaleMode.Numeric;
    m_Chart.Axis(StandardAxis.PrimaryX).NumericScale.AutoLabels = true;
    m_Chart.Axis(StandardAxis.PrimaryX).Labels.Add(“”);
    m_Chart.Axis(StandardAxis.PrimaryX).NumericScale.AutoMax = false;
    m_Chart.Axis(StandardAxis.PrimaryX).NumericScale.AutoMin = false;
    m_Chart.Axis(StandardAxis.PrimaryX).NumericScale.Max = 25;
    m_Chart.Axis(StandardAxis.PrimaryX).NumericScale.Min = 0;
    m_Chart.Axis(StandardAxis.PrimaryX).NumericScale.MajorTickMode = MajorTickModeNumeric.CustomStep;
    m_Chart.Axis(StandardAxis.PrimaryX).NumericScale.CustomStep = 5;

    Is it possible to do it?

    Thank you!

    Imported from legacy forums. Posted by Juan (had 2371 views)

    Xceed Support
    Member
    Post count: 5658

    You can use the <a href=”http://doc.xceedsoft.com/products/XceedChart/Axis_Ruler.html”>Inverted</a&gt; property on the Ruler.

    e.g.,
    m_Chart.Axis( StandardAxis.PrimaryX ).Ruler.Inverted = true;

    Imported from legacy forums. Posted by CharlesB (had 3261 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.