setMinMax and dates
Posted: Mon Jul 02, 2012 8:22 pm
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
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