Module:Graph/doc

{{#if:{{{1|}}}|| {{Module rating |protected}} {{Lua sidebar}}

Module with helper functions for the Graph extension to display graphs and maps. From de:Modul:Graph.

Creates a JSON object for  to display a political map with colored highlights. In the article namespace the template should be used instead. See its page for use cases.

Maps can be found at Special:Prefixindex/Template:Graph:Map/Inner/ (for example Worldmap2c-json with country borders) and new maps should also be saved under Module:Graph/.

Parameters: }}{{#if:{{{1|}}}||
 * formatjson: format JSON object for better legibility

Creates a JSON object for  to display charts. In the article namespace the template Template:Graph:Chart should be used instead. See its page for use cases.

Parameters: }}{{#if:{{{1|}}}||
 * formatjson: format JSON object for better legibility

Template wrappers
The functions  and   are wrappers to pass all parameters of the calling template to the respective   and   functions. }}

Note: In the editor preview the graph extension creates a canvas element with vector graphics. However, when saving the page a PNG raster graphics is generated instead.