danvk/dygraphs — pull request #145 by dpwatrous (2012-04-18 16:58:50+00:00)
Title: Stacked step plot fix

Hello!

Here's a fix for issue 206: http://code.google.com/p/dygraphs/issues/detail?id=206

Stacked, filled step plots would fill down to wrong point, causing triangular edges with no fills on every set except for the first.

This change stores both the top and bottom Y values of the vertical line on the set below the one being drawn, so the fill can be drawn to the bottom point, resulting in a square fill.

I also switched the 'baseline' variable to be initialized as an object literal instead of an array literal. This doesn't make any functional difference, but it was being treated as an object with arbitrary properties, not an array.

- Dave