Home > Sivlerlight 3 > Interacting with charts-2

Interacting with charts-2

A few months back I posted a sample on one way we can interact with charts.
Here is another way. you can try the sample here.
1. we can drag the left and right thumbs to adjust the width of the chart we want to zoom in
2. we can click in the shaded region between the thumbs and drag it to reposition it somewhere else on the chart. the details are shown in the chart below

chart2

Note: this is just a POC and not all details are taken care of

you can download the code here

About these ads
Categories: Sivlerlight 3
  1. Mike Greenway
    August 21, 2009 at 7:28 pm

    Hi
    When I click this here, here below
    >>Here is another way. you can try the >>sample “here”.
    I get a blank screen.

    • lee
      August 21, 2009 at 7:33 pm

      It used to work. now it is not, I am not sure what is wrong
      you can try downloading the sample

  2. Gordon Lindsay
    October 13, 2009 at 10:36 pm

    Hi, Great article!
    Have you got any performance tips for graphs with a large amount of data points i.e. in your example if you increase the number of random points to 500 or 1000 the zoom box dragging/resizing becomes really slow. As far as I can tell there is a large performance hit when redrawing the transparent OverlayGrid over the top of the series underneath.
    Thanks for any help,
    cheers!

  3. Gordon Lindsay
    October 13, 2009 at 11:24 pm

    UPDATE ON MY LAST POST:
    I had a play with the example and found performance for a large number of points can be dramatically increased by:
    1. removing the Background=”Transparent” property on the Canvas (which still displays correctly)
    2. simplifying the background so that there is less to draw underneath the zoom box (remove linear gradients in plot area)
    3. remove animations, which doesn’t look as good but is more responsive
    4. clean up the code:
    - only assign the ParentGrid and panel properties once
    - remove the RenderChart() on the DragDelta events (which will still gets run from MouseLeftButtonUp)
    - maybe use a timer (that can be reset) instead of a background worker so that draws aren’t queued for quick multiple changes

    • lee
      October 13, 2009 at 11:40 pm

      Hi,
      Thanks for the tips, how many random points were you testing with these changes ?

      Thanks

  4. Bill B
    October 18, 2009 at 3:03 pm

    I’m having the same problem another user posted. I click on the sample link and it appears to load but all I get is a blank screen. I tried with Internet Explorer 8 and Google Chrome 3.0. Both gave the same results.

    Any ideas?

    Thank you.

    • lee
      October 18, 2009 at 8:32 pm

      Hi,
      Did you try downloading the app and running?

  1. May 29, 2009 at 8:57 pm
  2. June 1, 2009 at 4:45 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: