Extension:Chart/Project/fr

Entre 2015 et 2023, les éditeurs pouvaient utiliser l'extension Graph pour visualiser des données des projets Wikidata. Des centaines de milliers d'articles de Wikipédia utilisaient ces graphiques afin d'enrichir le contenu textuel des wikis. En 2023, l'extension a été désactivée pour des raisons de sécurité. Cette désactivation a laissé les éditeurs frustré que les lecteurs ne puissent plus voir les graphiques, malgré le temps et l'énergie investis.

La Fondation Wikimedia a discuté de l'avenir des graphiques avec des membres de la communauté, et ce projet est le résultat de ces discussions. Nous construisons un nouvel outil sécurisé, que nous appelons Chart, comme successeur de l'extension Graph. Il gérera la majorité des utilisations simples de visualisation des données sur les articles de Wikipédia. Le nouvel outil sera conçu de manière à faciliter l'ajout de plus de cas d'utilisation à l'avenir si la Fondation ou les développeurs communautaires le souhaitent. Nous saurons que nous avons réussi quand les contributeurs convertiront des graphes anciens en utilisant le nouvel outil.

Dans le Plan Annuel 2024-2025, le projet Charts est décrit comme résultat clé du Wiki Experiences 3.3.

Plan de déploiement

L'extension sera déployée sur les wikis progressivement. Elle est déjà disponible sur une liste restreinte de wikis pilotes. L'accent sera mis sur les autres Wikipédias. Le déploiement commencera avec la plupart des Wikipédias, puis passera à celles qui étaient des utilisateurs lourds de Graph, et se terminera avec certaines des plus grandes. Ces dates sont sujettes à changement à mesure que nous suivons les problèmes et surveillons les performances du système pendant le déploiement.

Phase Wiki Dates Statut
Pilot
  • Wikipédia en hébreu [he]
  • Wikipédia en italien [it]
  • Wikipédia en suédois [sv]
  • MediaWiki
4 Dec 2024 Yes Fait
Phase 1 All Wikipedias except those listed in Phases 2 & 3 6–8 May 2025 Yes Fait
Phase 2
  • Wikipédia en russe [ru]
  • Wikipédia en tchétchène [ce]
  • Wikipédia en tatar [tt]
  • Wikipédia en ukrainien [uk]
  • Wikipédia en arménien [hy]
  • Wikipédia en basque [eu]
13–15 May 2025 Yes Fait
Phase 3
  • Wikipédia en anglais [en]
  • Wikipédia en français [fr]
  • Wikipédia en espagnol [es]
  • Wikipédia en allemand [de]
20–22 May 2025 Yes Fait
Phase 4 All other non-Wikipedia wikis hosted by WMF 27–29 May 2025 Yes Fait

Stratégie

  • Audience. We are guided by the needs of Wikipedia readers. We will focus on the most common uses of data visualization for enhancing encyclopedic content. This means that uses outside of articles, such as for PageViews, are not a priority now. However, although the primary focus will be on Wikipedia articles, charts will not be limited to pages in the main namespace and will be available on non-Wikipedia wikis.
  • Ease of use. We want to make it easy for any editor to be able to create a chart intuitively. Previously, it was fairly difficult to add and edit graphs. Editors needed to be comfortable interacting with Vega, the underlying software powering graphs. This is why editors created most graphs using templates that contained pre-defined Vega code. Templates are more user-friendly, but cannot be easily reused across wikis. This time, different types of charts will be defined by the tool and will be available across all wikis. Editors will be able to add charts using a familiar wikitext format and will not need technical knowledge about the software underneath. These changes will reduce the need to rely on templates. They will also make it possible to upgrade the underlying library without disrupting existing charts.
  • Architecture. Charts will be rendered (turned from code into visual content) on the Wikimedia Foundation servers using an open-source data visualization library, generated from data pulled from defined sources. More specifically:
    • Le rendu des graphiques sur nos serveurs permettront de charger rapidement les pages. Il évite également les problèmes de sécurité que nous avons rencontrés avec l'extension Graph. Il permettra également d'afficher des graphiques sur les applications mobiles, dans les exportations et dans d'autres scénarios de réutilisation/hors ligne.
    • Pour la visualisation des données, des graphiques seront générés à l'aide d'une bibliothèque open source. Cette bibliothèque doit répondre à nos exigences comme le support pour différentes langues, un certain niveau d'interactivité, la personnalisation des couleurs, et plus encore.
    • At first, there will be a single data source for charts: pages in the Data namespace on Wikimedia Commons. This will make it easy to reuse data between charts, avoiding the clutter of having the data inlined in wikitext. We will also design the system to support adding more data sources in the future.
  • Support des contributeurs. Ce projet ne réussira que si les éditeurs convertissent les anciens graphiques dans le nouveau style et commencent à créer de nouveaux graphiques. Nous trouverons des moyens d'aider les contributeurs à convertir les graphiques existants par des processus automatisés et manuels. Nous chercherons également des moyens de préserver les graphiques existants qui ne seront pas convertis au nouveau modèle. Cela peut signifier les remplacer par des images statiques ou transférer leur cas d'utilisation à d'autres outils.

Actualités

juin 2025 : le déploiement sur tous les wikis est terminé et les transormations en Lua sont disponibles

L’extension Chart est maintenant disponible sur tous les wikis Wikimedia ! Merci à toutes les personnes qui l’ont testé activement et qui ont suggéré des améliorations. Nous vous encourageons à continuer à nous faire part de vos idées ou des problèmes que vous rencontrez sur la page de discussion ou à phab:tag/charts.

Filtrage/transformation des données

Il est maintenant possible d’utiliser les modules Lua pour filtrer et transformer les données tabulaires pour une utilisation dans les graphiques. Cela peut être utilisé pour des choses comme la sélection d’un sous-ensemble de lignes ou de colonnes à partir des données source, la conversion entre les unités, le traitement statistique et de nombreuses autres transformations utiles. Plus d’informations sur l’utilisation des transformations sont disponibles sur Extension:Chart/Transforms.

Et ensuite ?

Alors que nous entrons dans le dernier mois du projet, notre priorité absolue sera de résoudre les bogues prioritaires découverts maintenant que les graphiques sont largement disponibles. Comme le groupe de travail travaillant sur le projet est temporaire, nous allons également nous concentrer sur la transmission de la propriété de l’extension à l’équipe qui sera responsable de sa maintenance à l’avenir. Dans la prochaine mise à jour, nous fournirons plus de détails sur ce à quoi s’attendre pour le développement futur et sur la façon dont vous pouvez contribuer.

Équipe

Questions fréquentes

What is the timeline of the project?

The Chart extension is now available on all Wikimedia wikis. This project is part of the FY24-25 annual plan and will conclude at the end of June 2025.

Which library will be used to render charts?

The Chart extension currently uses the Apache eCharts library. However, if there are unresolvable issues with eCharts, there is the possibility of switching to Vega (the library previously used for the Graphs extension). There is also the possibility of using eCharts for most chart types, but using a different library for certain specific chart types if it turns out to be much better than eCharts.

For details on why eCharts was chosen, and why Vega is considered the only reasonable alternative, see T368336#9971574.

What types of charts will be supported?

There will initially be a limited set of supported chart types: line, area, bar, and pie charts. The latest documentation is available on Extension:Chart page.

Where will chart definitions be stored? 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. Charts will be treated as a standalone content type, rather than just as 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, without needing to interact with complex templates.

One weakness of requiring that the data come from Commons tabular data is that data sourcing flows such as from MediaWiki APIs or Wikidata Query Service are not handled. While those sources are not the focus for this project, this project aims to design the extension in a way that they can be supported in the future.

How can volunteers add more chart types?

Once the initial infrastructure exists to create charts, technical volunteers will be welcome to contribute more chart types. In the meantime, you are encouraged to tell the developers what you think – which types of charts are most important to add next.

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, Chart extension developers 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.

How to produce the charts efficiently?

There are several conceivable methods to semi-automatically produce and edit the charts and their tabular data:

  • The script graphDataImport can be used in the web browser to extract data from existing graph wikicode, and convert it to a .tab page, and a .chart definition page.
  • Generative AI can be prompted to extract data from existing graph wikicode and tables, and convert it to .tab and .chart pages and generate new wikicode, according to given specifications. It can also provide translation of titles, and be utilized to extend and update the .tab page with new data.
  • The gadget TabularImportExport can convert Excel and .csv files to and from the .tab pages. You can activate it via your Commons preferences.
  • The JSON "edit as table" user interface (part of the Jsonconfig extension) is available from the .tab edit page.
  • Some bots potentially can periodically import statistics from the web, or from existing Wikipedia graphs, to .tab or .chart pages, upon request. Such bots include GraphBot (which can import existing {{Graph:chart }} wikicode in English Wikipedia), DPLA bot and SLiuBot.

What templates and modules are available?

It should be possible to use extension:chart without a multitude of local templates and modules. However, here are some templates and modules that are related to this extension:

Participer

Category:WMF Projects/fr