Hi David,
There were some issues in the date time calendar which were fixed in recent editions of the control - what is the version you're currently testing with?
Regarding how to exclude days on a per day basis - for this purpose you need to use the NDateTimeRangeRule - the following example shows how to do that dynamically when you click on a bar:
private void Form1_Load(object sender, EventArgs e)
{
NCartesianChart chart = (NCartesianChart)nChartControl1.Charts[0];
chart.BoundsMode = BoundsMode.Stretch;
NBarSeries bar = new NBarSeries();
bar.UseXValues = true;
Random rand = new Random();
DateTime now = DateTime.Now;
for (int i = 0; i < 10; i++)
{
bar.Values.Add(rand.Next(100));
bar.XValues.Add(now);
now += new TimeSpan(1, 0, 0, 0);
}
chart.Series.Add(bar);
nChartControl1.MouseDown += new MouseEventHandler(nChartControl1_MouseDown);
NDateTimeScaleConfigurator dtScale = new NDateTimeScaleConfigurator();
dtScale.MajorTickMode = MajorTickMode.CustomStep;
dtScale.CustomStep = new Nevron.NDateTimeSpan(1, NDateTimeUnit.Day);
chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator = dtScale;
dtScale.EnableCalendar = true;
}
void nChartControl1_MouseDown(object sender, MouseEventArgs e)
{
NHitTestResult result = nChartControl1.HitTest(e.X, e.Y);
if (result.ChartElement == ChartElement.DataPoint)
{
NBarSeries bar = (NBarSeries)result.Series;
DateTime dt = DateTime.FromOADate((double)bar.XValues[result.DataPointIndex]);
NDateTimeRangeRule rule = new NDateTimeRangeRule(new NDateTimeRange(dt, dt + new TimeSpan(1, 0, 0, 0)), false);
bar.RemoveDataPointAt(result.DataPointIndex);
NDateTimeScaleConfigurator dtScale = result.Chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator as NDateTimeScaleConfigurator;
dtScale.Calendar.Rules.Add(rule);
nChartControl1.Refresh();
}
}
Hope this helps - let us know if you meet any problems...
Best Regards,
Nevron Support Team