HomePhabricator

Store charts earlier and build them out a little later

Description

Store charts earlier and build them out a little later

Summary:
Ref T13279. Currently, we store a fairly low-level description of functions and datasets in a chart. This will create problems with (for example) translating function labels.

If you view a chart someone links you, it should say "El Charto" if you speak Spanish, not "The Chart" if the original viewer speaks English.

To support this, store a slightly higher level version of the chart: the chart engine key, plus configuration parameters. This is very similar to how SearchEngine works.

For example, the burndown chart now stores a list of project PHIDs, instead of a list of [accumulate [sum [fact task.open <project-phid>]]] functions.

(This leaves some serialization code with no callsites, but we may eventually have a "CustomChartEngine" which stores raw functions, so I'm leaving it for now.)

As a result, function labels provided by the chart engine are now translatable.

(Note that the actual chart is meaningless since the underlying facts can't be stacked like they're being stacked, as some are negative in some areas of their accumulation.)

Test Plan:

Screen Shot 2019-05-08 at 9.29.14 AM.png (959×1 px, 203 KB)

Reviewers: amckinley

Reviewed By: amckinley

Subscribers: yelirekim

Maniphest Tasks: T13279

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

Details

Provenance
epriestleyAuthored on May 8 2019, 4:29 PM
epriestleyPushed on May 22 2019, 12:39 PM
Reviewer
amckinley
Differential Revision
D20504: Store charts earlier and build them out a little later
Parents
rP493a6b72c1c0: Automatically select the range for charts in a general way
Branches
Unknown
Tags
Unknown
Tasks
T13279: Build Charting for Facts
Build Status
Buildable 22880
Build 31386: Run Core Tests