Jump to content

Extension:Chart/Project

From mediawiki.org

Between 2015 and 2023, editors could use the Graph extension to visualize data across Wikimedia projects. Hundreds of thousands of Wikipedia articles contained these graphs as a way to enrich the text-heavy content of the wikis. In 2023, the extension was disabled for security reasons. This left editors frustrated that readers were unable to view graphs that they have invested time and energy into creating.

The Wikimedia Foundation discussed the future of graphs with community members, and this project is the outcome of those discussions. We are building a new secure tool, which we are calling Chart, as a successor to the Graph extension. It will handle the majority of simple data visualization uses on Wikipedia articles. The new tool will be built in a way that will make it easy to add support for more use cases in the future if the Foundation or community developers choose to do so. We will know we’ve achieved success when editors are converting old graphs using the new tool.

In the 2024–2025 Annual Plan, the Charts project is documented as the key result Wiki Experiences 3.3.

Strategy[edit]

  • 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:
    • Rendering charts on our servers will allow for pages to be loaded quickly. It also avoids the security issues that we faced with the graph extension. It will also enable charts to appear on the mobile apps, in exports, and in other reuse/offline scenarios.
    • For data visualization, charts will be generated using an open-source library. This library must meet our requirements like support for different languages, some level of interactivity, color customization, and more.
    • 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.
  • Editor support. This project will only succeed if editors convert existing graph code to charts and start creating new charts. We will find ways to support editors with converting existing graphs through automated and manual processes. We will also look for ways to preserve existing graphs that are unlikely to be converted to charts. This may mean replacing them with static images or transitioning their use case to other tools.

Updates[edit]

: Start of the project[edit]

We are happy to announce that the project officially started on July 1. In the first half of the month, we'll decide how charts will be used and how the underlying service will be architected.

Most importantly, we'll be selecting the data visualization library (T368336). We have included options suggested by volunteers and staff. Vega, previously used for graphs, is one of them. Additional suggestions are welcome, however there are many options out there, and we won't be able to test them all. If you have ideas on what criteria we should consider when evaluating these libraries, write on our talk page!

We will also be shortlisting the priority types of charts. Then, we will pick one to start with (T368478). As part of this, we will analyze existing graph usage and factor in comments from volunteers. This list will change as we learn more about what types of charts are most important for encyclopedic content and what's possible with the library we end up choosing.

Relatedly, we're also exploring what the syntax could look like for defining a chart in wikitext, or if it will even be defined in wikitext at all (T368350). This won't be a final decision, and we want to get a prototype of the service up soon. In addition to thinking about how easy the syntax is to understand and use, we are also thinking about how easy it will be to convert from existing graph definitions.

Once we make these early decisions, we'll set up the infrastructure required to create the first chart type. The plan is to make it available as a prototype so volunteers can start experimenting with it. In the meantime, we welcome questions and comments on the talk page or on Phabricator.

We are also encouraging you to register for Wikimania. We will give a presentation about the project there. Hopefully, we'll build enough to have interesting news to share. Registration is needed for both in-person and remote participation.

Last but not least, we are wondering what tool to use to stay in touch with community members who were involved in discussions about Graph. Would you like to receive notifications about new project updates, or do you prefer a mass message on your talk page? Let us know if you have a strong preference. Thanks!

People[edit]

FAQ[edit]

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?

A data visualization library has not yet been selected (see T368336).

What types of charts will be supported?

There will initially be a limited set of supported chart types. We haven't determined which chart types we will include (see T368478).

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.

Get involved[edit]