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 (70 views, 15.00 KB)
Nevron Support
Posted 13 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: 2 days ago @ 1:54 AM
Posts: 3,054, Visits: 4,009

Hi Inhyuk,

Take a look at the All Examples\xes\Scaling\Date Time Work Calendar - it allows you to skip dates from the axis.



Best Regards,
Nevron Support Team



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~
I already check it.
But I want to remove 3.Jan.2011 not Sunday.

thanks~

Nevron Support
Posted 13 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: 2 days ago @ 1:54 AM
Posts: 3,054, Visits: 4,009

Hi Inhyuk,

You simply have to add a different set of rules - in this case you can use the NDateTimeRangeRule which enables to you to mark a range of days as non working (skipped). Check out the following topic:

http://helpdotnetvision.nevron.com/UsersGuide_Axes_Scale_Work_Calendar.html

It discusses the different types of date/time rules in more detail.



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic