I have data that I need to add a point for each day. I have my code working well enough to label my x axis as mar feb apr etc. Where I'm stuck is on how I add all of the data points.
I have the stored in a datatable with three fields, label (the month), position (an int of its position i.e. 0 is jan, 1 is feb etc), and value (the daily value)
Here's the code I have so far on trying to add the points but it doesn't seem to be working. I'm fairly new with these charts, so please bear with me.
'a holder for the current month
'a holder for the count
count = -1
reader = cmd.ExecuteReader()
'if the currentMonth is new, then we add it to the data table for a range
(currentMonth = (Format(reader(
currentMonth = Format(reader(
count = count + 1
rangeTable.Rows.Add(currentMonth, count, reader(
'Dim tempSeries As New ChartSeries
'add the range
chart.PlotArea.XAxis.AddRange(0, count, 1)
)).TextBlock.Text = i(
A sample of what my data table would look like is something like this
Label Position Value
january 0 10
january 0 20
january 0 30
february 1 10
february 1 20
Essentially, I need to add all of the points in each month, but they are in succession by day. So I pull all of the days for jan, feb, and so on. Any ideas on how to go about this?