[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GT] Re: Re: Re: Interactive SVG GT chart



Thmoas,

Yes, it already does so (only when loading more data though).  the
demo gives you the view from 1998 to 2009 with 300 bars loaded, and if
you scroll to somewhere early 2009, you will see the bars reloaded
(slowly) with a vertical rescale.

gtchart.js has the zone objects taking care of the scaling and
translation, so i believe if you just hack the resize function (which
sets ymax/ymin) and call it every time when scrolling (or at the end
of continuous scroll, for usability) and apply them with
this.blanket.attr(), it should do what you want.

One thing to note that, if you are already familiar with the GT
graphical objects, the zones in gtchart.js does the scaling and
translation transparently, so your objects (curve, rect) just need to
use the y-value (price, or whatever calculated values) as-is, which is
a lot more pleasant to work with.

Jon, would you like to hack on this instead of fighting with buysellarrows? ;)

2009/11/17 Thomas Weigert <weigert
AT
mst.edu>:
> Chia Liang,
>
> pretty cool.... this would be a great addition to GT. Sure beats the
> charts I render statically from the png created by graphics.pl, once you
> add scales etc. Can svg dynamically resize the vertical scales as you
> render which would be nice when scrolling as the market changes (make
> vertical scale cover the lowest and highest bar in view)?
>
> Th.
>
> Chia-liang Kao wrote:
>> In case you are curious about this new chart thingy, i setup a demo at
>> http://home.clkao.org:3997/d/TX/day
>>
>>
>>
>