User (Legacy) Posted July 17, 2006 Report Share Posted July 17, 2006 Hello, the X-axis of my chart is of type DateTime (including the time part). I'd like to have a scrollbar for this Axis, so I set onlineChart.AxisX.AutoScroll = true; The question is: How great must PixelsPerUnit be? In the explanation for this property the calculation is done using the width of the chart (my chart is 570 pixels wide), the number of pages ('2' for example) and the Maximum. But what is the Maximum of a DateTime X-axis? The X-value of the first point of the first series is Double firstX = onlineChart.Data.X[0,0] = 38911,5832638889 which accords to 13.07.2006 13:59:54. The X-value of the last point is of the first series is Double lastX = onlineChart.Data.X[0, onlineChart.Data.Points - 1] = 38911,6042708333 which accords to 13.07.2006 14:30:09 I tried to calculate PixelsPerUnit as PPU = 570 / lastX / 2 and as PPU = 570 / (lastX - firstX) / 2 but I never get a scrollbar.... Kind regards, MusiMeli Link to comment Share on other sites More sharing options...
This topic is now archived and is closed to further replies.