Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Setting "fillGraph" results in considerable slowdown for complex charts #346
From da...@google.com on March 29, 2012 15:16:22
This is particularly evident when setting "animatedZooms".
Original issue: http://code.google.com/p/dygraphs/issues/detail?id=308
I added a "Fill" checkbox to the
Looking more deeply at
Here's how you might expect a filled graph to be drawn (from the bottom left point):
You start on the axis, draw the chart line across the top, then drop down to the axis and close.
Now here's how dygraphs draws it (I've dropped the fill for clarity):
For each pair of next/prev points, dygraphs moves to the left x-value on the x-axis. Then it draws a line to the right point on the x-axis. Then it draws a line up to the chart line. Then it draws a line back to the previous point on the chart. On the next iteration through, it moves to the next point on the x-axis.
This is crazy. It involves far more lines than is necessary and it thwarts attempts to drop unnecessary