Ok, so I have my chart, working pretty well and plotting what I need. It’s using .net charts, the ones that are available in visual studio by default.
for (int i = 0; i < x.Length; i++)
{
series1.Points.AddXY(d[i], g[i]);
}
I need it to interpret these dates correctly. At the moment it is plotting each at a set distance regardless of the actual time-scale.
E.g. If I have 5 data points, 4 on the 1st Jan, and one on the 5th of Jan, it will plot them at an equal distance when there should be a larger gap between the 1st Jan and 2nd of Jan. Hope that makes sense. Please ignore the awful grid-lines.
Does anyone know how to do this? Thanks
Edit:
chart1.ChartAreas[0].AxisX.IntervalType = DateTimeIntervalType.Days; is used as well.
Have you tried to set the IntervalType inside the asp:Chart tag ?
See here for more information:
http://msdn.microsoft.com/en-us/library/bb934284.aspx
I came across the XValueType property, maybe that would work as opposed to the XAxis one?
See here for more information:
http://msdn.microsoft.com/en-us/library/system.web.ui.datavisualization.charting.series.xvaluetype.aspx