Page MenuHomePhabricator

Stack chart functions in a more physical way
ClosedPublic

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

Details

Summary

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

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

Event Timeline

epriestley created this revision.Wed, May 8, 7:54 PM
epriestley requested review of this revision.Wed, May 8, 7:56 PM
epriestley added inline comments.Wed, May 8, 7:56 PM
src/applications/fact/chart/PhabricatorChartStackedAreaDataset.php
12

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.Tue, May 21, 10:56 PM
This revision is now accepted and ready to land.Tue, May 21, 10:56 PM