Sandbox: mudanças entre as edições
→Não funcionando
imported>Admin |
imported>Admin |
||
Linha 87: | Linha 87: | ||
Teste de gráficos com dados JSON. | Teste de gráficos com dados JSON. | ||
'''Gráfico de barras | '''Gráfico de barras''' | ||
<graph> | <graph> | ||
{ | { | ||
Linha 152: | Linha 152: | ||
</graph> | </graph> | ||
<br> | <br>'''Gráfico de áreas'''<graph> | ||
'''Gráfico de | |||
<graph> | |||
{ | { | ||
"width": 500, | "width": 500, | ||
Linha 220: | Linha 217: | ||
} | } | ||
</graph> | </graph> | ||
'''Gráfico de linhas'''<graph>{ | |||
"version": 2, | |||
"width": 400, | |||
"height": 200, | |||
"data": [ | |||
{ | |||
"name": "table", | |||
"values": [ | |||
{ | |||
"x": 0, | |||
"y": 1 | |||
}, | |||
{ | |||
"x": 1, | |||
"y": 3 | |||
}, | |||
{ | |||
"x": 2, | |||
"y": 2 | |||
}, | |||
{ | |||
"x": 3, | |||
"y": 4 | |||
} | |||
] | |||
} | |||
], | |||
"scales": [ | |||
{ | |||
"name": "x", | |||
"type": "linear", | |||
"range": "width", | |||
"zero": false, | |||
"domain": { | |||
"data": "table", | |||
"field": "x" | |||
} | |||
}, | |||
{ | |||
"name": "y", | |||
"type": "linear", | |||
"range": "height", | |||
"nice": true, | |||
"domain": { | |||
"data": "table", | |||
"field": "y" | |||
} | |||
} | |||
], | |||
"axes": [ | |||
{ | |||
"type": "x", | |||
"scale": "x" | |||
}, | |||
{ | |||
"type": "y", | |||
"scale": "y" | |||
} | |||
], | |||
"marks": [ | |||
{ | |||
"type": "line", | |||
"from": { | |||
"data": "table" | |||
}, | |||
"properties": { | |||
"enter": { | |||
"x": { | |||
"scale": "x", | |||
"field": "x" | |||
}, | |||
"y": { | |||
"scale": "y", | |||
"field": "y" | |||
}, | |||
"y2": { | |||
"scale": "y", | |||
"value": 0 | |||
}, | |||
"interpolate": { | |||
"value": "monotone" | |||
}, | |||
"stroke": { | |||
"value": "steelblue" | |||
}, | |||
"strokeWidth": { | |||
"value": 3 | |||
} | |||
} | |||
} | |||
} | |||
] | |||
}</graph> | |||
=== Não funcionando === | === Não funcionando === | ||
Os gráficos abaixo não funcionam. | Os gráficos abaixo não funcionam: de pizza, mapa etc. Verificar exemplos na [[mediawikiwiki:Extension:Graph|documentação]]. | ||
Falta implementar | Falta implementar as predefinições (usa [[mediawikiwiki:Extension:Scribunto|Scribunto]] e Lua): | ||
{{Graph:Chart|width=600|height=100|xAxisTitle=X|yAxisTitle=Y | {{Graph:Chart|width=600|height=100|xAxisTitle=X|yAxisTitle=Y |