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


Author
Message
inhyuk son
inhyuk son
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
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 (86 views, 15.00 KB)
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