Profile Picture

Is it possible to remove date of not exist data from X axis?

Posted By inhyuk son 13 Years Ago

Is it possible to remove date of not exist data from X axis?

Author
Message
inhyuk son
Posted 13 Years Ago
View Quick Profile
Junior Member

Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 21, Visits: 1
Hi~ Nevron.

I want to remove some date from X axis.
Because I don't have a data of the date.
Is it possible?
Many thanks~


//sample source is here.
NCartesianChart m_Chart = (NCartesianChart)nChartControl1.Charts[0];
m_Chart.BoundsMode = BoundsMode.Stretch;

NDateTimeScaleConfigurator dateTimeScale = new NDateTimeScaleConfigurator();
dateTimeScale.AutoDateTimeUnits = new NDateTimeUnit[] { NDateTimeUnit.Day };
m_Chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator = dateTimeScale;

NLineSeries line = (NLineSeries)m_Chart.Series.Add(SeriesType.Line);
line.UseXValues = true;

line.XValues.Add(new DateTime(2011, 1,1));
line.Values.Add(100);

line.XValues.Add(new DateTime(2011, 1, 2));
line.Values.Add(110);

//there is not data of 3.Jan.2011. I want to remove 3.Jan.2011 from the axis.

line.XValues.Add(new DateTime(2011, 1, 4));
line.Values.Add(120);

line.XValues.Add(new DateTime(2011, 1, 5));
line.Values.Add(100);

nChartControl1.Refresh();

Attachments
chartdate.PNG (71 views, 15.00 KB)



Similar Topics


Reading This Topic