Page MenuHomePhabricator

Make CLI script accept chart definition and data in the right format
Closed, ResolvedPublic3 Estimated Story Points

Assigned To
Authored By
aude
Jul 28 2024, 8:53 PM
Referenced Files
Restricted File
Jul 29 2024, 11:47 PM
F56775336: Screenshot 2024-07-29 at 7.34.38 PM.png
Jul 29 2024, 11:36 PM
Subscribers

Description

Acceptance Criteria:

Have the cli script accept two inputs, as defined in T368350:

  • chart definition json
  • chart data

and output the chart as svg.

  • Accepts a chart type, parameters and data using the syntax decided in T368350.
  • Renders chart as SVG and output to a file.
  • Renders legend on the chart, if legend is specified in the chart definition

Event Timeline

aude moved this task from Backlog to Sprint 2 on the Charts board.
aude edited projects, added: Charts (Sprint 2); removed: Charts.
aude moved this task from Incoming to Doing on the Charts (Sprint 2) board.

Change #1057417 had a related patch set uploaded (by Aude; author: Aude):

[mediawiki/extensions/Chart@master] Render chart in cli based on chart definition and data

https://gerrit.wikimedia.org/r/1057417

the patch doesn't yet handle these options in the chart definition:

"interpolate": "basis",
"showSymbols": true,
"colors": [ "#9999FF", "#EA6D6A", "#F4A460", "#87CEFA", "#3CB371", "#FF00FF" ],

Test wiki created on Patch demo by Roan Kattouw (WMF) using patch(es) linked to this task:
https://patchdemo.wmcloud.org/wikis/51f34dffd2/w

Catrope renamed this task from Render parser function chart definition and data in cli script to Make CLI script accept chart definition and data in the right format.Jul 29 2024, 4:32 PM
LGoto triaged this task as High priority.Jul 29 2024, 5:52 PM
LGoto set the point value for this task to 3.
LGoto edited projects, added: Charts (Sprint 3); removed: Charts (Sprint 2).
LGoto moved this task from Incoming to Doing on the Charts (Sprint 3) board.
aude updated the task description. (Show Details)

So far, here is what the script can render :

{F56775647}

Change #1057417 merged by jenkins-bot:

[mediawiki/extensions/Chart@master] Render chart in cli based on chart definition and data

https://gerrit.wikimedia.org/r/1057417

Test wiki created on Patch demo by Pietrasagh using patch(es) linked to this task:
https://patchdemo.wmcloud.org/wikis/8e226cc4fd/w

Test wiki on Patch demo by Pietrasagh using patch(es) linked to this task was deleted:

https://patchdemo.wmcloud.org/wikis/8e226cc4fd/w/

The only remaining part of the chart definition to support is the interpolation option.

I have created a task for this: https://phabricator.wikimedia.org/T371935

Test wiki on Patch demo by Roan Kattouw (WMF) using patch(es) linked to this task was deleted:

https://patchdemo-legacy.wmcloud.org/wikis/51f34dffd2/w/