Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27355

Adding dates to a chart axis?

$
0
0
Hi,

I am trying to show the user on chart how many left clicks they have made each day.
The Y values are showing fine but when I add a date to the X axis it does not show properly.

My code
Code:

tempdate = startdate
                    i = 0
                    While tempdate < currentdate
                        If ds.Tables("Specific").Rows(i).Item(0) <> tempdate Then ' Account for days where KeyCount was not active
                            Chart1.Series("Something Specific?").Points.AddXY(tempdate, 0)
                        Else
                            Chart1.Series("Something Specific?").Points.AddXY(tempdate, ds.Tables("Specific").Rows(i).Item(1))
                            i += 1
                        End If
                        da.Dispose()
                        ds.Dispose()
                        tempdate = tempdate.AddDays(1)
                    End While



Instead of showing the dates on the x axis they come out like this
Name:  chart.png
Views: 2
Size:  37.1 KB

Judging from this http://www.syncfusion.com/support/kb...20Chart%20Axes I should be using
Code:

ChartControl1.PrimaryXAxis.ValueType = ChartValueType.DateTime
but I can't find a .PrimaryXAxis
Attached Images
 

Viewing all articles
Browse latest Browse all 27355

Trending Articles