The images below graphandline.png and 2graphandline.png show the bar chart before and after the second series is added. You will notice that the first graph shows a point after 10/24. When a second series is added, that 10/24 point moves to the left of the 10/23 mark on the x axis. The third chart 3graphandline.png shows the graphs after manually setting the range and steps. As you can see, the x points are sitting between days. This graph is databound with the following code
chartResults.DataManager.ValuesXColumn = "iDate"
chartResults.DataGroupColumn = "sType"
chartResults.PlotArea.XAxis.Appearance.ValueFormat = Styles.ChartValueFormat.ShortDate
chartResults.DataSource = dt
The snippet below is a sample of data being added to the data table. It converts the date to an object, as suggested in the online documentation.
fValue = rdr("sValue").ToString
Dim dDate As DateTime = rdr("dStartDateTime")
Dim oDate As Date = New Date(dDate.Year, dDate.Month, dDate.Day)
Dim oRow As DataRow = dt.NewRow
oRow("fValue") = fValue
oRow("iDate") = oDate.ToOADate()
oRow("sDate") = rdr("dStartDateTime").ToString
oRow("sType") = sDrug
dt.Rows.Add(oRow)
Is there something I am missing, or doing wrong. The goal is to have the x points from series 1 remain on the correct x point when another series is added. Any advice, or suggestions are appreciated.
Many thanks in advance!