Jump to content

Extension:Chart

From mediawiki.org
MediaWiki extensions manual
Chart
Release status: unstable
Implementation Tag
Description Renders charts
Author(s) TODO
Compatibility policy Master maintains backward compatibility.
MediaWiki >= 1.43.0
Database changes No
License GNU General Public License 3.0 or later
Download
README
Quarterly downloads 6 (Ranked 135th)
Translate the Chart extension if it is available at translatewiki.net
Issues Open tasks · Report a bug

The Chart extension is a project to replace the Graph extension. Its development has not begun yet. See Extension:Chart/Project for more details on the development process.

Installation

[edit]
  • Download and move the extracted Chart folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Chart
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'Chart' );
    
  • Run npm install
  • Run npm run build
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Creating your first chart

[edit]

Currently, the extension is in development and limited in its capabilities and can only render a specific chart!

Setting up .tab support

[edit]

Firstly, make sure your wiki is setup to support Help:Tabular Data. Instructions are provided in the README.

Configuring with Shellbox

[edit]

Charts requires access to the `node` command. If this has not been setup you will need to modify the $PATH of your server.

MAMP: For MAMP users, this may mean modifying /Applications/MAMP/Library/bin/envvars

Rendering the chart

[edit]

Examples can be found in the sample folder in the git repository.

The following graph uses the pages Data:1993 Canadian federal election.chart and Data:1993 Canadian federal election.tab. Make sure those pages exist!

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