When reviewing the Data:Chart.json format with @aude (as part of T375240) we noticed that currently we allow editors to override various rendering behaviours which make it more difficult to render charts consistently across platforms. For example, an editor can control the rotation of X-axis labels in such a way that they overlap the Y axis label.
We think it would be better to remove these fields for now, and revisit them later on.
We'd move the fields from the JSON to the Charts renderer service for now with sensible defaults.
The fields to remove from the schema in addition to width and height would be:
- Remove interpolate
- Remove colors
- Remove x.format
- Remove x.angle
- Remove x.grid
- Remove y.angle
- Remove linewidth
- Remove showValues
- Remove showSymbols
- Remove innerRadius
- Remove showLegend - all charts should have legends by default.
- The only required fields would be
- "license"
- "version"
- "type"
- "source"
Additional notes
{ "properties": { "interpolate": { "$comment": "Taken from vega-lite", "enum": [ "linear", "linear-closed", "step", "step-before", "step-after", "basis", "basis-open", "basis-closed", "cardinal", "cardinal-open", "cardinal-closed", "bundle", "monotone" ] }, "colors": { "items": { "$comment": "could regex + enum this", "type": "string" } }, "x": { "properties": { "format": { "$comment": "Does this need to be localized?", "type": "string" }, "angle": { "type": "number" }, "grid": { "type": "boolean" } } }, "y": { "properties": { "angle": { "type": "number" } } }, "linewidth": { "type": "number" }, "showValues": { "type": "object", "properties": { "format": { "type": "string" }, "fontcolor": { "type": "string" }, "fontsize": { "type": "number" }, "offset": { "type": "number" }, "angle": { "type": "number" } } }, "showSymbols": { "type": "boolean" }, "innerRadius": { "type": "number" } } }
Sign off step
- Document on https://www.mediawiki.org/wiki/Extension:Chart