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


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

you can download the code here


9 thoughts on “Interacting with charts-2

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

  3. 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,

    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

  5. 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.

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s