Page 1 of 1

Tee.Scroller exclude certain series

Posted: Fri May 31, 2013 12:18 pm
by 17662183
Hi,
First of all, I'm finding Tee.Chart to be a very nice to use; I've been evaluating it since yesterday. I've been a long time user of the VCL product, but the Javascript version is so much easier to use. Bravo!

I have a suggestion regarding Tee.Scroller: it would be nice to be able to flag certain series as being hidden in the scroller. In a Chart with 3 or 4 series, especially if some of them are Line series with pointers and/or markers visible, the Scroller reprepresentation of the chart isn't so nice to look at. If I could "switch off" all but one or two series from appearing in the scroller, it would look a lot tidier/clearer. I think this could be achieved by adding a property to the Series object such as "hideInScroller", and when the Scroller code paints the series, it skips over any that have that flag set to "true".

Cheers,
Kai

Re: Tee.Scroller exclude certain series

Posted: Fri May 31, 2013 3:01 pm
by yeray
Hi Kai,

I'm not sure if it will be as easy as this, but I've added it to the wish list to be further studied for inclusion in next releases (TF77016586).

Re: Tee.Scroller exclude certain series

Posted: Fri May 31, 2013 5:06 pm
by 17662183
Hi Yeray,
I've actually implemented it locally (I'm impatient!), and it's working fine... so here's what I did. I cannot quote exact line numbers or even variable names, because I've of course only got the "compressed" mini-fied javascript files....

In teechart.js, in the code for Tee.Series = function (a,d), I added:

this.hideInScroller = !1;

... and in teechart-extras.js, in g.onDrawThumb, where the series are added to the Scroller chart, I modified it to read:

a.series.each(function(a) {
!a.hideInScroller && a.visible && a.useAxes && a.draw()
});

So, by setting mySeries.hideInScroller = true, that series is now excluded from the Scroller view.

Re: Tee.Scroller exclude certain series

Posted: Mon Jun 03, 2013 2:39 pm
by yeray
Hi Eden,

This won't recalculate the axes range in the scroller chart according to the series shown in it, but it's certainly a nice starting point.
Thanks for sharing!