Help:Extension/CreateGraph

From Metabolomics.JP
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
 
{{Extension
 
{{Extension
 
|author=K, Suwa
 
|author=K, Suwa
|version=0.1
+
|version=0.2
 
|type=Parser function, XML markup
 
|type=Parser function, XML markup
 
}}
 
}}
Line 62: Line 62:
 
<table border="1" cellpadding="3" cellspacing="1">
 
<table border="1" cellpadding="3" cellspacing="1">
 
  <tr><td>version</td><td>source</td><td>md5</td></tr>
 
  <tr><td>version</td><td>source</td><td>md5</td></tr>
  <tr><td>0.1(September 17,2008)</td><td>{{#ifexistfile:/data/src/CreateGraph/graph.phps}}</td><td><pre style="border: 0px; background-color: white; padding: 0em; line-height: 0em">f43944b3a54577a793edf379ba0ff2a9</pre></td></tr>
+
<tr><td>0.2(March 1,2011)</td><td>{{#ifexistfile:/data/src/CreateGraph/graph.phps}}</td><td><pre style="border: 0px; background-color: white; padding: 0em; line-height: 0em">c6b8d0d7b8172395998a291258646242</pre></td></tr>
 +
  <tr><td>0.1(September 17,2008)</td><td>{{#ifexistfile:/data/src/CreateGraph/previous/graph-0.1.phps}}</td><td><pre style="border: 0px; background-color: white; padding: 0em; line-height: 0em">f43944b3a54577a793edf379ba0ff2a9</pre></td></tr>
 
</table>
 
</table>
  

Revision as of 14:57, 1 March 2011

Extension Information
Implementation
Description
Author(s)K, Suwa
Version0.2
MediaWiki
License
Hooks used
Token typeParser function, XML markup

Contents


Extension to display graphs by using jpgraph.

Example

{{#graph:グラフの種類|size=サイズ;title=タイトル;legend=凡例位置;label=ラベル;data1=データ}}

折れ線グラフ

  • ソース
{{#graph:line|size=300x300;title=test;legend=0x0;label=a,b,c,d,e,f,g,h;data1=10,34,20,10,33,23,40;data2=5,2,10,23,21,8,1}}
  • 実行例


縦棒グラフ

  • ソース
{{#graph:vbar|size=300x300;title=test;legend=0x0;label=a,b,c,d,e,f,g;data1=10,34,20,10,33,23,40}}
  • 実行例


横棒グラフ

  • ソース
{{#graph:hbar|size=300x300;title=test;legend=0x0;label=a,b,c,d,e,f,g;data1=10,34,20,10,33,23,40}}
  • 実行例


円グラフ

  • ソース
{{#graph:pie|size=300x300;title=test;legend=0x0;label=;a=10,b=34,c=20,d=10,e=33,f=23,g=40}}
  • 実行例


3D円グラフ

  • ソース
{{#graph:pie3|size=300x300;title=test;legend=0x0;label=;a=10,b=34,c=20,d=10,e=33,f=23,g=40}}
  • 実行例

Requirements

Download

versionsourcemd5OperationCheck version
0.2(October 23,2008)CreateGraph.phps
ca648eadeb95cb99151cf24cecfcd3ba
1.11.1, 1.16.2


versionsourcemd5
0.2(March 1,2011)graph.phps
c6b8d0d7b8172395998a291258646242
0.1(September 17,2008)graph-0.1.phps
f43944b3a54577a793edf379ba0ff2a9


versionsourcemd5
0.1(September 17,2008)graph_inc.phps
1325096054243aa333a98033c4d35c18

Installtion

  1. Install jpgraph.
  2. Download CreateGraph.phps and rename it to CreateGraph.php.
  3. Place it in the extensions/ directory.
  4. Download graph.phps and graph_inc.phps, rename them to graph.php and graph.inc.
  5. Place them in any directory (the same place under DocumentRoot).
  6. Insert the follow lines to LocalSettings.php
    require_once( "$IP/extensions/CreateGraph.php" );
    $egScriptPath = "path to directory which in graph.php from DocumentRoot"; // ex. "/mediawiki/scripts"
  7. set $jpgraph variable in graph.inc
    $jpgraph = "path to jpgraph"; // ex. "/var/www/htdocs/mediawiki/scripts/jpgraph

Function

  1. graph
Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox