I use the MSChart control for creating candlestick chart (namespace System.Windows.Forms.DataVisualization.Charting). I added two points in friday and two points in monday. Total four points.
In result, I see four candlesticks and many blank points therebetween. How to remove it?
Thanks.
var area = chart1.ChartAreas.Add("area1");
area.AxisX.LabelStyle.Format = "yyyy.MM.dd HH:mm";
var series = new Series("prices", 4);
series.ChartArea = "area1";
series.ChartType = SeriesChartType.Candlestick;
series.XValueType = ChartValueType.DateTime;
series["OpenCloseStyle"] = "Triangle";
series["ShowOpenClose"] = "Both";
series["PointWidth"] = "0.6";
series["PriceUpColor"] = "Green";
series["PriceDownColor"] = "Red";
series.Points.AddXY(new DateTime(2016, 4, 25, 12, 0, 0), 2, 0.5, 0.7, 1.8);
series.Points.AddXY(new DateTime(2016, 4, 25, 11, 0, 0), 2, 0.5, 0.7, 1.8);
series.Points.AddXY(new DateTime(2016, 4, 22, 12, 0, 0), 2, 0.5, 0.7, 1.8);
series.Points.AddXY(new DateTime(2016, 4, 22, 11, 0, 0), 2, 0.5, 0.7, 1.8);
this.chart1.Series.Add(series);