As a long-time customer of the VCL product, I'm very excited about using TChart for HTML5.
I'm having some trouble using setMinMax() when the data type of the x-axis values is Date. I was implementing the Scroller tool when I ran into this. I have an array of Date objects retX[]. This array is assigned to the data.x property of the two series which I'm plotting. Simply charting the entire data set works fine. If I try this:
cht.axes.bottom.setMinMax(retX[retX.length-13], retX[retX.length-1])
where cht = new Tee.Chart("canvasID"), then in date.format.js I get an uncaught exception on line 38 and the chart fails to redraw. If, when I create the chart, I use integer values for in retX[], all works as expected.
As another point of reference: if I don't use setMinMax and implement the Scroller tool then, as expected, the selection range in the scroller starts at full range. I can size the selection in the scroller, but I cannot scroll it. When I try to scroll the selection area left or right it snaps to the far left of the scroller canvas and will no longer move.
Any help would be greatly appreciated.
Thanks,
Rob Cooke
setMinMax and dates
Re: setMinMax and dates
Hi Rob,
Excuse us for the delayed reply.
We've made a variation of the scroller example working with dates. We'll upload it to the server asap.
Excuse us for the delayed reply.
We've made a variation of the scroller example working with dates. We'll upload it to the server asap.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: setMinMax and dates
Thank you, I'll check it out. I also purchased a commercial license so I could trace the code myself.
Re: setMinMax and dates
I just checked out the demo. You'll notice that when you try to move the range around in the scroller canvas that the behavior I describe still happens. The range snaps to the far left and then you can't move it anymore. I tried this in Chrome, IE9 and Firefox with the same results. I haven't had time to trace through it myself, yet.
Re: setMinMax and dates
I think I've got it fixed, although I haven't yet gone back to test with other data types in the x-axis. Still, the logic is sound.
In teechart-extra.js, line 315 change
to
In teechart-extra.js, line 315 change
Code: Select all
v=(pp+this.delta-this.bounds.x)*ra/s;
Code: Select all
v=this.min + (pp+this.delta-this.bounds.x)*ra/s;
Re: setMinMax and dates
Hi Rob,
Yes, we've also fixed it in a quite similar way. I'll send you the actual teechart-extra.js file to the mail account you have registered in this forum.
Yes, we've also fixed it in a quite similar way. I'll send you the actual teechart-extra.js file to the mail account you have registered in this forum.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |