Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Can't zoom in FastLine chart

38 views
Skip to first unread message

kevinp

unread,
Nov 13, 2009, 9:20:02 AM11/13/09
to
I'm trying to use the new MS Chart control for .NET Framework 3.5.

I changed the ChartType to FastLine and added 27 Series with
XValueType of TIME. YValueType is AUTO.

I tried adding the following lines in the Form_Load sub:

Chart1.ChartAreas("ChartArea1").CursorX.IsUserEnabled = True
Chart1.ChartAreas("ChartArea1").CursorX.IsUserSelectionEnabled = True
Chart1.ChartAreas("ChartArea1").AxisX.ScaleView.Zoomable = True
Chart1.ChartAreas("ChartArea1").AxisX.ScrollBar.IsPositionedInside =
True

I can't get the chart to zoom. Nothing happens when I click and drag
the cursor across the chart. It works fine in the MS WinForms
examples.

What am I doing wrong?

kevinp

unread,
Nov 13, 2009, 10:07:35 AM11/13/09
to
I figured out that I had to add this line AFTER setting the points for
each series:

Chart1.ChartAreas("ChartArea1").CursorX.Interval = 0


My next problem is that I want the user to be able to mouse over one
of the lines on the chart and have the tooltip text show which series
the line belongs to.

Can anyone help me with that?


On Fri, 13 Nov 2009 09:20:02 -0500, kevinp <kev...@nospam.cfl.rr.com>
wrote:

kevinp

unread,
Nov 13, 2009, 2:25:31 PM11/13/09
to
OK, I figured out how to add tooltips. I have only one problem left
and I should probably wait to ask because I'll probably figure it out
on my own...but...

I'm only scrolling on the X axis and it is not scrolling properly. I
can't click on the scrollbar and drag it one way or another--the
scrollbar won't move. And if I use the buttons on the ends of the
scrollbar, it just moves all the way to each end.

Here's what I have:

Chart1.ChartAreas("ChartArea1").CursorX.Interval = 0

Chart1.ChartAreas("ChartArea1").AxisX.ScaleView.MinSize = 2
Chart1.ChartAreas("ChartArea1").AxisX.ScaleView.MinSizeType =
DateTimeIntervalType.Milliseconds
Chart1.ChartAreas("ChartArea1").AxisX.ScaleView.SmallScrollSize = 1
Chart1.ChartAreas("ChartArea1").AxisX.ScaleView.SmallScrollMinSize = 1

Instead of the Milliseconds, I've tried seconds. I've also tried this
line:

Chart1.ChartAreas("ChartArea1").AxisX.Interval = 1


On Fri, 13 Nov 2009 10:07:35 -0500, kevinp <kev...@nospam.cfl.rr.com>

0 new messages