Page MenuHomePhabricator

It should be possible to render a chart with axis labels
Closed, ResolvedPublic1 Estimated Story Points

Description

Background

It is currently not possible to render a chart with a title as in this example:
https://echarts.apache.org/examples/en/editor.html?c=data-transform-filter

User story

As an editor I want to create a line chart which is clearly labelled axis labels.

Requirements

  • The axis labels should be localizable
  • The axis labels live inside the chart definition
  • The labels are enabled by default.

BDD

  • For QA engineer to fill out

Test Steps

  • For QA engineer to fill out

Design

  • Add mockups and design requirements

Acceptance criteria

  • Add acceptance criteria

Communication criteria - does this need an announcement or discussion?

  • Add communication criteria

Rollback plan

  • What is the rollback plan in production for this task if something goes wrong?

This task was created by Version 1.2.0 of the Web team task template using phabulous

Details

Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
Render x-axis name and increase margin for y-axis namerepos/mediawiki/services/chart-renderer!25audeT375576main
Customize query in GitLab

Event Timeline

Should the chart definition have a title property? The chart definition is more of a "template" that can be combined with various sets of tabular data so the title could be more specific to the invocation of the parser function, thus a parser function option.

And we does it make sense to require a title? If the chart is in context of a template, the title might be a separate part of the template.

e.g. https://en.wikipedia.org/wiki/Template:Climate_chart (in this case, the legend is also separate)

Jdlrobson renamed this task from It should be possible to render a chart with a title and axis labels. to It should be possible to render a chart with axis labels..Sep 25 2024, 3:33 PM
Jdlrobson updated the task description. (Show Details)

Should the chart definition have a title property? The chart definition is more of a "template" that can be combined with various sets of tabular data so the title could be more specific to the invocation of the parser function, thus a parser function option.

And we does it make sense to require a title? If the chart is in context of a template, the title might be a separate part of the template.

e.g. https://en.wikipedia.org/wiki/Template:Climate_chart (in this case, the legend is also separate)

Descoped titles - https://phabricator.wikimedia.org/T373349

Axis should be defined in the chart definition to avoid data being misrepresented e.g. with different units

Reedy renamed this task from It should be possible to render a chart with axis labels. to It should be possible to render a chart with axis labels.Sep 25 2024, 3:36 PM
Reedy added a project: I18n.

Just a technicality, the labels are for the grid values along the axis (e.g. 1950, 1953 ...)

The "name" is the label for the axis (as a whole), such as "Income".

The y-axis name is there but there is not enough margin and it is cut off, making it not visible. This would have the same fix as T375585.

Rendering the x-axis name is an easy fix.

Jdlrobson added a subscriber: CCiufo-WMF.

@CCiufo-WMF this wasn't planned work, but was done. How do we handle unplanned work in the sprint? Should we retroactively estimate this?

@CCiufo-WMF this wasn't planned work, but was done. How do we handle unplanned work in the sprint? Should we retroactively estimate this?

Retroactive estimation (which would really be actual points spent) is fine with me.

Jdlrobson triaged this task as Medium priority.Oct 9 2024, 11:35 PM
Jdlrobson set the point value for this task to 1.