Jump to content

Extension:Chart/Project/FAQ

From mediawiki.org

What is the timeline of the project?

We want to have charts ready to use by editors by the end of September 2024. The project will run until the end of calendar year 2024 (half of the fiscal year 2024–2025).

Which library will be used to render charts?

We have decided to use Apache eCharts. However, if we experience issues with eCharts and think Vega (the library previously used for Graphs) might be better, we might switch to it later. We might also build most charts in eCharts but use a different library for certain specific chart types if it turns out to be much better than eCharts.

For details on why we chose these two libraries and prioritized eCharts, go to T368336#9971574.

What types of charts will be supported?

There will initially be a limited set of supported chart types. We will start with line charts. Their parameters should be reusable for other related chart types too, like area, bar, and pie charts. After line charts, we will move on to map-based visualizations.

For the exact list of line chart parameters, see T368478#9978405.

Where will we store chart definitions? Where do I go if I want to edit a particular chart?

Chart definitions will live on their own .chart pages on Commons, under the Data: namespace. We want to treat charts as a standalone content type, rather than just a part of an article. It will be easy to reuse the same chart across wikis, and beyond Wikimedia platforms by making them available as links. Editors who want to embed charts in an article will be able to do so with a short piece of wikitext, similar to including an image from Commons, all without needing to interact with complex templates.

We have heard comments that requiring the data come from Commons tabular data may not address some common data sourcing flows, like from MediaWiki APIs or Wikidata Query Service. While those sources are not the focus for this project, we want to ensure the extension is designed in a way that they can be supported in the future.

Example chart definition (from Commons) 
// Data:1993 Canadian federal elections.chart

{
   "version": 1,
   "type": "line",
   "width": 350,
   "height": 200,
   "xAxis": {
       "title": "",
       "type": "date"
   },
   "yAxis": {
       "title": {
           "en": "%support",
           "fr": "%soutien"
       }
   },
   "legend": {
       "en": "Party",
       "fr": "Parti"
   },
   "interpolate": "basis",
   "showSymbols": true,
   "source": "1993 Canadian federal election.tab"
}

Example invocation (in an article page):

{{#chart:format=1993 Canadian federal election.chart}}

How can volunteers add more chart types?

Once we set up the initial infrastructure to create charts, we will welcome technical volunteers to contribute more chart types. In the meantime, we encourage you to tell us what you think – which types of charts are most important to start with.

What will happen with the existing graphs?

For now, the existing graphs will remain in their current state. Some wikis have chosen to hide graphs entirely while others render a message explaining that graphs are disabled. Once it's possible to create charts that can replace graph uses, we will work with volunteers to start converting them so that readers can start to see them again.

It is unlikely that all graphs will be able to be converted to charts. For graphs that cannot be converted, it may be more beneficial to either: find an alternative tool to recreate the graph, convert the graph to a static image, or remove the graph altogether.