I created a chart with CandlesSticks, with an XValue of Time with values between "15:30" to "22:00".
Now I want to add and extra series to the chart, a line , based on serveral datapoints.
But when I adding the datapoint to the chart, it creates the line but it's not matching the X-axis values of the time of the candlesticks.
What am I doing wrong?
chart with line chart not maching x-values
//HERE THE CODE OF THE CHART
chart1.ChartAreas["ChartArea1"].AxisX.MajorGrid.LineWidth = 0;
chart1.ChartAreas["ChartArea1"].AxisY.MajorGrid.LineWidth = 0;
chart1.ChartAreas["ChartArea1"].AxisY.Maximum = yAsMax;
chart1.ChartAreas["ChartArea1"].AxisY.Minimum = yAsMin;
chart1.ChartAreas["ChartArea1"].AxisX.LabelAutoFitStyle = LabelAutoFitStyles.WordWrap;
chart1.ChartAreas["ChartArea1"].AxisX.IsLabelAutoFit = true;
chart1.ChartAreas["ChartArea1"].AxisX.LabelStyle.Enabled = true;
chart1.Series["Series1"].XValueType = ChartValueType.Date;
chart1.Series["Series1"].CustomProperties = "PriceDownColor=Red,PriceUpColor=Blue";
chart1.Series["Series1"]["ShowOpenClose"] = "Both";
//bind candles to chart..
chart1.Series["Series1"].XValueMember = "TimeStamp";
chart1.Series["Series1"].YValueMembers = "High,Low,Open,Close";
chart1.DataSource = ListOfCandles;
chart1.DataBind();
/////////////HERE THE CODE OF THE LINE (FOR EXAMPLE)
chart1.ChartAreas[0].AxisY.Interval = 1;
//Based on date: 6-Jun (06-06)
chart1.Series["SwingPointLine"].Points.AddXY("06-06", 145.87);
chart1.Series["SwingPointLine"].Points.AddXY("11-06", 152.79);
chart1.Series["SwingPointLine"].Points.AddXY("21-06", 143.40);
//etc
//OR based on index
chart1.Series["SwingPointLine"].Points.AddXY(1, 145.87);
chart1.Series["SwingPointLine"].Points.AddXY(5, 152.79);
chart1.Series["SwingPointLine"].Points.AddXY(11, 143.40);
//etc
chart1.Series["SwingPointLine"].ChartType = SeriesChartType.Line;
chart1.Series["SwingPointLine"].BorderWidth = 2;
chart1.Series["SwingPointLine"].Color = Color.Orange;