Pomoc:Mw chart: Rozdiel medzi revíziami
Riadok 1: | Riadok 1: | ||
[[Kategória:Portál]] | [[Kategória:Portál]] | ||
[[Kategória:Kiwiki]] | [[Kategória:Kiwiki]] | ||
+ | =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 | ||
+ | |||
+ | * <nowiki><pChartType> </nowiki> 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 (<nowiki><pChartType> </nowiki>)=== | ||
+ | * Bar charts - <nowiki><pBars></nowiki> | ||
+ | * Line charts - <nowiki> <pLines></nowiki> | ||
+ | * Pie charts - <nowiki><pPie></nowiki> | ||
+ | * Scatter charts -<nowiki> <pScatter></nowiki> | ||
+ | * Radar charts - <nowiki><pRadar></nowiki> | ||
+ | * Bubble charts - <nowiki><pBubble> </nowiki> | ||
+ | |||
+ | ===Parametre=== | ||
+ | Nasledujúca tabuľka uvádza zoznam možných parametrov a ich podporu v jednotlivýchtypoch grafov. | ||
+ | |||
+ | <table><tr><td style="border: 1px solid #aaa; padding: 5px;"> <strong>Parameter</strong> </td><td style="border: 1px solid #aaa; padding: 5px;"> <strong>Bars</strong> </td><td style="border: 1px solid #aaa; padding: 5px;"> <strong>Pie</strong> </td><td style="border: 1px solid #aaa; padding: 5px;"> <strong>Lines</strong> </td><td style="border: 1px solid #aaa; padding: 5px;"> <strong>Radar</strong> </td><td style="border: 1px solid #aaa; padding: 5px;"> <strong>Scatter</strong> </td><td style="border: 1px solid #aaa; padding: 5px;"> <strong>Bubble</strong> </td><td style="border: 1px solid #aaa; padding: 5px;"> <strong>Description</strong> </td></tr> <tr><td style="border: 1px solid #aaa; padding: 5px;"> size </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> Determines the size of the chart image in pixels. </td></tr> <tr><td style="border: 1px solid #aaa; padding: 5px;"> title </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> Sets the title of the chart. The title is printed on top of the chart. </td></tr> <tr><td style="border: 1px solid #aaa; padding: 5px;"> colors </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> 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. </td></tr> <tr><td style="border: 1px solid #aaa; padding: 5px;"> labels </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> no </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> Set labels=false to hide the labels on the X and Y axes. </td></tr> <tr><td style="border: 1px solid #aaa; padding: 5px;"> grid </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> no </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> no </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> Often a chart is more appealing if there is a grid under it. Use grid=true to do so. Otherwise, set grid=false. </td></tr> <tr><td style="border: 1px solid #aaa; padding: 5px;"> legend </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> 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. </td></tr> <tr><td style="border: 1px solid #aaa; padding: 5px;"> stacked </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> no </td><td style="border: 1px solid #aaa; padding: 5px;"> no </td><td style="border: 1px solid #aaa; padding: 5px;"> no </td><td style="border: 1px solid #aaa; padding: 5px;"> no </td><td style="border: 1px solid #aaa; padding: 5px;"> no </td><td style="border: 1px solid #aaa; padding: 5px;"> if you show multiple data columns in a chart you can use the stacked-parameter to show them stacked and not side by side. </td></tr> <tr><td style="border: 1px solid #aaa; padding: 5px;"> plots </td><td style="border: 1px solid #aaa; padding: 5px;"> no </td><td style="border: 1px solid #aaa; padding: 5px;"> no </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> no </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> no </td><td style="border: 1px solid #aaa; padding: 5px;"> shows small circles on the position of the measured values. Possible values are 'open', 'closed' or 'none'.</td></tr> <tr><td style="border: 1px solid #aaa; padding: 5px;"> opacity </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> no </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> no </td><td style="border: 1px solid #aaa; padding: 5px;"> no </td><td style="border: 1px solid #aaa; padding: 5px;"> sets the opacity of the bars or the area underneath the line or radar area. A number between 0 and 100 is allowed </td></tr> <tr><td style="border: 1px solid #aaa; padding: 5px;"> 3d </td><td style="border: 1px solid #aaa; padding: 5px;"> no </td><td style="border: 1px solid #aaa; padding: 5px;"> yes </td><td style="border: 1px solid #aaa; padding: 5px;"> no </td><td style="border: 1px solid #aaa; padding: 5px;"> no </td><td style="border: 1px solid #aaa; padding: 5px;"> no </td><td style="border: 1px solid #aaa; padding: 5px;"> no </td><td style="border: 1px solid #aaa; padding: 5px;"> make the pie chart three dimensional. </td></tr> </table> | ||
+ | =Ukážky grafov= | ||
==Stĺpcový graf== | ==Stĺpcový graf== | ||
{| style="width:100%" | {| style="width:100%" | ||
Riadok 109: | Riadok 144: | ||
</pPie> | </pPie> | ||
|} | |} | ||
+ | |||
+ | =Odkazy= | ||
+ | * http://pchart.sourceforge.net/ |
Verzia zo dňa a času 14:28, 1. január 2010
Obsah
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> |