Profile Picture

Label alignment on chart

Posted By Greg Hupp 9 Years Ago
Author
Message
Greg Hupp
Question Posted 9 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: Forum Members
Last Active: 9 Years Ago
Posts: 0, Visits: 4

I am trying to create a linear plot as shown below.  However, I would like to align the X-axis labels(value labels) with the tick marks instead of between the marks (for clarity).  Can someone provide some guidance for doing this?  Probably not a hard problem, just can't find the correct settings.

Nevron Support
This post has been flagged as an answer
Posted 9 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
Hi Gregg,

The problem in this case is that you're using an ordinal (categorical) scale which by default displays the labels between the tick marks. To fix this you have two options:

1. Switch to numeric scale:
NCartesianChart chart = (NCartesianChart)nChartControl1.Charts[0];
chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator = new NLinearScaleConfigurator();

2. Display the ticks aligned to the labels on the ordinal scale:
NCartesianChart chart = (NCartesianChart)nChartControl1.Charts[0];
((NOrdinalScaleConfigurator)chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator).DisplayDataPointsBetweenTicks = false;

Hope this helps - let us know if you meet any problems or have any questions.

Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic