Quantcast

Charting events

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Charting events

Les Szklanny
Please take a look at this Google financial chart.

http://www.google.com/finance?q=wag

The interesting part of this chart is that the chart is updated as I move mouse across the chart area.

Also, please notice that a marker moves across the chart line and some financial numbers are updated above the chart.

Is it possible to do something like this using Dojo charting events?

I checked the chart.connectToPlot() method, but its callback is not called as I move the mouse.

_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
[hidden email]
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Charting events

Eugene Lazutkin
This functionality is missing from the API, yet it is relatively easy to
implement:

1) Render a chart.
2) Get absolute chart coordinates, e.g., using chart.getCoords()
3) Get a plot you want to follow using chart.plots[pname]
4) Get plot scalers using plot._hScaler and plot._vScaler.
5) Get transformation functions using
scaler.scaler.getTransformerFromModel(scaler)
6) Connect to "mouse move" on the chart node, make mouse coordinates
relative using #2, run them through function from #5 => you have two
coordinates in model coordinates.

Now you can show them, or snap to the input values, or whatever you want.

Eugene Lazutkin
Dojo Toolkit, Committer
http://lazutkin.com/


On 11/25/2009 08:34 AM, Les Szklanny wrote:

> Please take a look at this Google financial chart.
>
> http://www.google.com/finance?q=wag
>
> The interesting part of this chart is that the chart is updated as I
> move mouse across the chart area.
>
> Also, please notice that a marker moves across the chart line and some
> financial numbers are updated above the chart.
>
> Is it possible to do something like this using Dojo charting events?
>
> I checked the chart.connectToPlot() method, but its callback is not
> called as I move the mouse.
>
>
>
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://docs.dojocampus.org
> [hidden email]
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
[hidden email]
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Charting events

mixersoft
In reply to this post by Les Szklanny
Les Szklanny wrote
Please take a look at this Google financial chart. http://www.google.com/finance?q=wag
Also a dojox charting newbie intersted in replicating some features from the Google finance chart. I'm building a Timeline chart and need to:
  1. zoom in/out by time intervals and also
  2. move forward/backward in time.
Google does this through the double-sided slider and the linked "summary chart" on the bottom. Can someone outline the best way to build this, or something equivalent, using dojo? m.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Charting events

Eugene Lazutkin-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You can use sliders to zoom and move around. Sliders should affect
either setAxisWindow() or setWindow() of Chart2D. Or you can use their
input to massage the incoming data and just call updateSeries().

Eugene Lazutkin
Dojo Toolkit, Committer
http://lazutkin.com/

On 03/08/2010 07:35 PM, mixersoft wrote:

>     Les Szklanny wrote:
>     Please take a look at this Google financial chart.
>     http://www.google.com/finance?q=wag
>
> Also a dojox charting newbie intersted in replicating some features from
> the Google finance chart. I'm building a Timeline chart and need to:
>
>    1. zoom in/out by time intervals and also
>    2. move forward/backward in time.
>
> Google does this through the double-sided slider and the linked "summary
> chart" on the bottom. Can someone outline the best way to build this, or
> something equivalent, using dojo? m.
> ------------------------------------------------------------------------
> View this message in context: Re: Charting events
> <http://n3.nabble.com/Charting-events-tp40659p436677.html>
> Sent from the Dojo Toolkit mailing list archive
> <http://n3.nabble.com/Dojo-Toolkit-f33424.html> at Nabble.com.
>
>
>
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://docs.dojocampus.org
> [hidden email]
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuXC1YACgkQY214tZwSfCsjegCfaaugLnQsJ3Z1UuE5wP29P5fV
YD8AoKz1XXJhSosRJ/ZrcWp57RI2WDrM
=KaBV
-----END PGP SIGNATURE-----
_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
[hidden email]
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Charting events

mixersoft
Eugene Lazutkin-2 wrote
You can use sliders to zoom and move around. Sliders should affect either setAxisWindow() or setWindow() of Chart2D. Or you can use their input to massage the incoming data and just call updateSeries().
Thanks. I see how that might work. Followup questions:
  1. Is there a double-sided slider widget? have you heard of one?
  2. how about linking the "summary" chart that shows data which lies outside the immediate window. this makes the chart easier to use. Would you just have 2 charts and link them to the same sliders? Would that a good UI, or would it be too sluggish?
m.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Charting events

postoffice
1. http://archive.dojotoolkit.org/nightly/dojotoolkit/dojox/form/tests/test_RangeSlider.html

Not so hot on charts, sorry.

Tom

On 10 March 2010 03:23, mixersoft <[hidden email]> wrote:

> Eugene Lazutkin-2 wrote:
> You can use sliders to zoom and move around. Sliders should affect either
> setAxisWindow() or setWindow() of Chart2D. Or you can use their input to
> massage the incoming data and just call updateSeries().
>
> Thanks. I see how that might work. Followup questions:
>
> Is there a double-sided slider widget? have you heard of one?
> how about linking the "summary" chart that shows data which lies outside the
> immediate window. this makes the chart easier to use. Would you just have 2
> charts and link them to the same sliders? Would that a good UI, or would it
> be too sluggish?
>
> m.
> ________________________________
> View this message in context: Re: Charting events
> Sent from the Dojo Toolkit mailing list archive at Nabble.com.
>
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://docs.dojocampus.org
> [hidden email]
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>
>



--
www.twistyfish.co.uk
_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
[hidden email]
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Tom Elliott / mrtom / postoffice
Loading...