Pomoc:Mw chart

Z Kiwiki
Verzia z 14:28, 1. január 2010, ktorú vytvoril Juraj (diskusia | príspevky)
Skočit na navigaci Skočit na vyhledávání

Popis

Rozšírenie pchart4mw umožňuje vkladanie jednoduchých grafov do wiki stránok. Sú podporovaných 6 typov grafov:

  • čiarový
  • stĺpcový
  • koláčový
  • scatter
  • radarový
  • bubble

Použitie

Graf sa dá do stránky vložiť pomocou značky nasledujúcej shcémy:

<pChartType p1 p2 p3 ...>
data....
</pChartType>

kde

  • <pChartType> je tag pre určitý typ grafu. Titeto tagy sú uvedené nižšie.
  • p1 p2 p3 ... je zoznam voliteľných parametrov (názov grafu, osi, legenda...)
  • data sú údaje, ktoré sa budú zobrazovať.

Typy grafov (<pChartType> )

  • Bar charts - <pBars>
  • Line charts - <pLines>
  • Pie charts - <pPie>
  • Scatter charts - <pScatter>
  • Radar charts - <pRadar>
  • Bubble charts - <pBubble>

Parametre

Nasledujúca tabuľka uvádza zoznam možných parametrov a ich podporu v jednotlivýchtypoch grafov.

Parameter Bars Pie Lines Radar Scatter Bubble Description
size yes yes yes yes yes yes Determines the size of the chart image in pixels.
title yes yes yes yes yes yes Sets the title of the chart. The title is printed on top of the chart.
colors yes yes yes yes yes yes Sets the color(s) for the chart in RRGGBB-style (like FF0000 for red). If you have multiple data columns separate the colors with a colon. If more colors are needed to draw the chart than given, the colors are used multiple times.
labels yes yes yes no yes yes Set labels=false to hide the labels on the X and Y axes.
grid yes no yes no yes yes Often a chart is more appealing if there is a grid under it. Use grid=true to do so. Otherwise, set grid=false.
legend yes yes yes yes yes yes you can add a legend to the chart with the legend parameter and putting the labels in the first row of the content. You can specify the location of the legend by setting legend=top, legend=bottom, legend=left or legend=right. Any other value will put the legend on the right.
stacked yes no no no no no if you show multiple data columns in a chart you can use the stacked-parameter to show them stacked and not side by side.
plots no no yes no yes no shows small circles on the position of the measured values. Possible values are 'open', 'closed' or 'none'.
opacity yes no yes yes no no sets the opacity of the bars or the area underneath the line or radar area. A number between 0 and 100 is allowed
3d no yes no no no no make the pie chart three dimensional.

Ukážky grafov

Stĺpcový graf

<pbars size=300x200 title="Site Visitors" ymin=0 ymax=10000 legend>
,Europe,United States,Asia
Oct,5345,3110,1291
Nov,3452,3695,1047
Dec,7843,4712,1305
</pbars>

<pbars size=500x250 title="Site Visitors" ymin=0 ymax=10000 legend> ,Europe,United States,Asia Oct,5345,3110,1291 Nov,3452,3695,1047 Dec,7843,4712,1305 </pbars>

Radarový graf

<pRadar size=300x200 striped filled>
,Allocated Budget,Actual Spending
Sales,4,5
Marketing,2,5
Development,6,1
Customer Support,2,1
IT,3,2
Administration,1,1
</pRadar>

<pRadar size=300x200 striped filled> ,Allocated Budget,Actual Spending Sales,4,5 Marketing,2,5 Development,6,1 Customer Support,2,1 IT,3,2 Administration,1,1 </pRadar>

Čiarový graf

<pLines ymin=0 ymax=10000 axiscolor=888888 cubic filled  angle=90 plots legend>
,US,EU
Jan,6748,4301
Feb,3911,5019
Mar,3019,3941
Apr,4810,6412
May,2203,4823
Jun,4510,4110
Jul,3918,5510
Aug,8810,2930
Sep,7182,3504
Oct,6911,3881
Nov,6749,4761
Dec,7184,4918
</pLines>

<pLines ymin=0 ymax=10000 axiscolor=888888 cubic filled angle=90 plots legend> ,US,EU Jan,6748,4301 Feb,3911,5019 Mar,3019,3941 Apr,4810,6412 May,2203,4823 Jun,4510,4110 Jul,3918,5510 Aug,8810,2930 Sep,7182,3504 Oct,6911,3881 Nov,6749,4761 Dec,7184,4918 </pLines>

Koláčový graf

<pPie exploded 3d>
Sales,43
Marketing,21
Development,56
Customer Support,23
Information Technology,31
Administration,13
</pPie>

<pPie exploded 3d> Sales,43 Marketing,21 Development,56 Customer Support,23 Information Technology,31 Administration,13 </pPie>

Odkazy