Home Forums WinForms controls Xceed Chart for WinForms How to assign custom axis data point labels

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

    Hi,

    Given an X axis with values 1-7, I would like to label those points with day of week. Any help appreciated.

     Thanks,

    Sam

    Imported from legacy forums. Posted by Sam (had 1194 views)

    User (Old forums)
    Member
    Post count: 23064

    I figured it out.

    Suppress auto labels:

    cpuChart.Axis(

    StandardAxis.Depth).NumericScale.AutoLabels = false;

    Create day of week labels

    AxisLabel

    sunAxisLabel = cpuChart.Axis(StandardAxis.Depth).CustomLabels.Add();

    sunAxisLabel.Value = 0;

    sunAxisLabel.Text =

    “Sun”;

    sunAxisLabel.Offset = dayLabelOffset1;

    sunAxisLabel.Angle = dayLabelAngle1;

    sunAxisLabel.TextProps.Backplane.Visible =

    true;

    AxisLabel monAxisLabel = cpuChart.Axis(StandardAxis.Depth).CustomLabels.Add();

    monAxisLabel.Value = 1;

    monAxisLabel.Text =

    “Mon”;

    monAxisLabel.Offset = dayLabelOffset2;

    monAxisLabel.Angle = dayLabelAngle2;

    monAxisLabel.TextProps.Backplane.Visible =

    true;

    etc.

     

    Sam

    Imported from legacy forums. Posted by Sam (had 1395 views)

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