You can use NChartValueAxisMark to display ticks with irregular step. For example, if you need to have ticks with values 0.42, 0.43, 1.5, 2.7 on the X-Axis, you can do the following:
double[] values = { 0.42, 1.33, 1.75, 2.7 };
for (int i = 0; i < 4; ++i)
{
NChartValueAxisMark m = new NChartValueAxisMark();
m.Value = values[i];
m.Tick.Visible = true;
m_view.Chart.CartesianSystem.XAxis.AddMark(m);
}
You can set up the ticks drawn for each mark through tick property of the mark.
You can also switch off the regular ticks of the value axis to let marks be the only ticks displayed:
m_view.Chart.CartesianSystem.XAxis.MajorTicks.Visible = false;
m_view.Chart.CartesianSystem.XAxis.MinorTicks.Visible = false;
m_view.Chart.CartesianSystem.XAxis.LabelsVisible = false;
Comments
No comments yet.
Please log in to place a comment.