pingjiang / protochart

Automatically exported from code.google.com/p/protochart
0 stars 0 forks source link

context.translate without matching context.restore #30

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a basic line chart with grid: {borderWidth:0} and a set of
zig-zagging data points (I used [[1, 56], [2, 8], [3, 99], [4, 52]].)
2. Observe that the last visible "point" (which should be 52) is not
actually at the correct y-position.

What is the expected output? What do you see instead?
The last point should be very close to the point 52 - instead, it looks
much closer to 57. The effect is more dramatic the more points you add in
the middle of the series.

What version of the product are you using? On what operating system?
0.5 beta, using Firefox 3.5 on OS X

Please provide any additional information below.
This is caused by the borderWidth:0, which skips over the conditional at
line 1193. Because of this, the "this.context.translate" at line 1113
misses its corresponding "this.context.restore()," at line 1199 (but should
be after the enclosing brace.

Original issue reported on code.google.com by christineyen on 7 Jul 2009 at 10:24