Extension:Graph

The Graph extension allows a  tag or entire page to describe data visualization in a JSON format that renders a Vega-based graph.

Demo

 * This sample transcludes the   graph, but it could have also been embedded directly with the  . The example is from Vega editor example.
 * see /Demo subpage for other samples and approaches

Limitations
Due to the security restrictions,  doesn't allow referencing data outside of the Wikimedia cluster (all Wikimedia wikis are OK). The expressions that were disabled before are now supported.

LocalSettings.php
To allow  in wiki markup:

To store graph definitions as standalone pages in their own namespace, configure JsonConfig.

Graphoid Service
The Graphoid service is a node.js service that converts a graph definition into a PNG image using Vega library. The service URLs contain the domain of the page (mediawiki.org), service version (v1), the title of the page with the graph (PageTitle), revision ID of the page (12345, but could be 0 for current), and a hash ID of the graph itself (also used in HTML page to identify graph definition), for example: http://localhost:19000/mediawiki.org/v1/PageTitle/12345/a64b022a8fa5b7fc5e40a2c95cd0a114b2ae1174.png http://graphoid.wikimedia.org/mediawiki.org/v1/png/Extension:Graph/0/be66c7016b9de3188ef6a585950f10dc83239837.png You configure the Graph extension to use the Graphoid service with The service can be further configured with additional settings in the config file.