HomePhabricator

Separate chart functions into a class tree

Description

Separate chart functions into a class tree

Summary:
Depends on D20440. Ref T13279. Create a class to represent a chartable function: something we can get some data points out of.

Then, make the chart chart two functions.

For now, the only supported function is "fact(key)", which pulls data from the Facts ETL pipeline, identified by "key", and takes no other arguments.

In future changes, I plan to support things like "fact(tasks.open.project, PHID-PROJ-xyz)", "constant(1000)" (e.g. to draw a goal line), "sum(fact(...), fact(...))" (to combine data from several projects), and so on.

The UI may not expose this level of power for a while (or maybe ever) but until we get close enough to the UI that these features are a ton of extra work I'm going to try to keep things fairly flexible/modular.

Test Plan:

Screen Shot 2019-04-17 at 5.16.45 AM.png (906×1 px, 197 KB)

Reviewers: amckinley

Reviewed By: amckinley

Subscribers: yelirekim

Maniphest Tasks: T13279

Differential Revision: https://secure.phabricator.com/D20441

Details

Provenance
epriestleyAuthored on Apr 17 2019, 12:15 PM
epriestleyPushed on Apr 18 2019, 8:05 PM
Reviewer
amckinley
Differential Revision
D20441: Separate chart functions into a class tree
Parents
rP45b3c23148d0: Fetch chart data via async request and redraw charts when the window is resized
Branches
Unknown
Tags
Unknown
Tasks
T13279: Build Charting for Facts
Build Status
Buildable 22668
Build 31064: Run Core Tests