Page MenuHomePhabricator

Stack chart functions in a more physical way

Authored by epriestley on May 8 2019, 7:54 PM.



Ref T13279. See that task for some discussion.

The accumulations of some of the datasets may be negative (e.g., if more tasks are moved out of a project than into it) which can lead to negative area in the stacked chart.

Introduce min(...) and max(...) to separate a function into points above or below some line, then mangle the areas to pick the negative and positive regions apart so they at least have a plausible physical interpretation and none of the areas are negative.

This is presumably not a final version, I'm just trying to produce a chart that isn't a sequence of overlapping regions with negative areas that is "technically" correct but not really possible to interpret.

Test Plan

Diff Detail

rP Phabricator
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.May 8 2019, 7:54 PM
epriestley requested review of this revision.May 8 2019, 7:56 PM
epriestley added inline comments.May 8 2019, 7:56 PM

I'm defining functions in top-to-bottom order everywhere else now, but we need to sum them in bottom-to-top order, so I'm flipping things around and then back again to make sure everything ends up in agreement.

amckinley accepted this revision.May 21 2019, 10:56 PM
This revision is now accepted and ready to land.May 21 2019, 10:56 PM