Label alignment on chart


Author
Message
Greg Hupp
Greg Hupp
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
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
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
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


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search