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)
Fri, Dec 13, 4:52 AM
Unknown Object (File)
Fri, Dec 13, 4:52 AM
Unknown Object (File)
Fri, Dec 13, 4:52 AM
Unknown Object (File)
Fri, Dec 13, 4:52 AM
Unknown Object (File)
Mon, Dec 9, 2:59 AM
Unknown Object (File)
Fri, Dec 6, 9:39 AM
Unknown Object (File)
Thu, Dec 5, 8:49 AM
Unknown Object (File)
Tue, Dec 3, 10:22 AM
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
Branch
chart28
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 22772
Build 31231: Run Core Tests
Build 31230: arc lint + arc unit

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