Page MenuHomePhabricator

Stack chart functions in a more physical way
ClosedPublic

Authored by epriestley on May 8 2019, 7:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 25, 6:06 AM
Unknown Object (File)
Sat, Mar 23, 12:43 AM
Unknown Object (File)
Sat, Mar 23, 12:43 AM
Unknown Object (File)
Sat, Mar 23, 12:42 AM
Unknown Object (File)
Sat, Mar 23, 12:42 AM
Unknown Object (File)
Fri, Mar 22, 5:03 PM
Unknown Object (File)
Tue, Mar 5, 10:32 AM
Unknown Object (File)
Feb 20 2024, 8:25 PM
Subscribers

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

Screen Shot 2019-05-08 at 12.44.16 PM.png (1×1 px, 248 KB)

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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.

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