]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Fix flipped stepped line in filler plugin (#4697)
authorAkihiko Kusanagi <nagi@nagi-p.com>
Fri, 25 Aug 2017 22:42:52 +0000 (07:42 +0900)
committerSimon Brunel <simonbrunel@users.noreply.github.com>
Sat, 26 Aug 2017 05:42:46 +0000 (07:42 +0200)
src/helpers/helpers.canvas.js

index 54414f694c7a3c871c853b15470263c969fe2ee4..1429a31e6e06de9f2c54907496f7e1b13fd45f44 100644 (file)
@@ -165,7 +165,7 @@ var exports = module.exports = {
 
        lineTo: function(ctx, previous, target, flip) {
                if (target.steppedLine) {
-                       if (target.steppedLine === 'after') {
+                       if ((target.steppedLine === 'after' && !flip) || (target.steppedLine !== 'after' && flip)) {
                                ctx.lineTo(previous.x, target.y);
                        } else {
                                ctx.lineTo(target.x, previous.y);