Template:Graph:Stacked/testcases
This is the template test cases page for the sandbox of Template:Graph:Stacked. to update the examples. |
Test legend ordering with explicate `series` parameter
editSeries order and legend order should match each other
series="TX","NY","CA" ( colors=#1f77b4, #ff7f0e, #2ca02c )
editSee or edit source data.
series="NY","CA","TX" ( colors=#ff7f0e, #2ca02c, #1f77b4 )
editSee or edit source data.
series="TX","NY","CA" ( colors=#2ca02c, #1f77b4, #ff7f0e )
editSee or edit source data.
Test dataset optional filtering (e.g. for limiting x-axis displayed range)
editwithout filtering (default width)
editSee or edit source data.
filter = 2000 <= datum.year && datum.year <= 2010
editSee or edit source data.
filter = datum.year <= 2010
editSee or edit source data.
Test optional arbitrary ("raw") data transforms
editfilter = 2000 <= datum.year && datum.year <= 2010
editSee or edit source data.
dataTransforms = { "type": "filter", ... }, { "type": "filter", ... }
editSee or edit source data.
Test different colors list formats
editcolors=["#1f77b4", "#ff7f0e", "#2ca02c"]
editSee or edit source data.
colors=["rgba(31,119,180,80%)", "rgba(255,127,14,80%)", "rgba(44,160,44,80%)"]
editSee or edit source data.
colors=rgb(31 119 180 / 70%), rgb(255 127 14 / 70%), rgb(44 160 44 / 70%)
editSee or edit source data.
colors="category20"
editSee or edit source data.
colorscheme=category20
editSee or edit source data.
Test chart sizing (enabling/disabling chart width grows)
editwithout explicit `chartSizing` (default chart sizing model)
editSee or edit source data.
See or edit source data.
chartSizing=fit | chartSizing=padding-box
editSee or edit source data.
See or edit source data.
See or edit source data.
chartSizing=pad | chartSizing=content-box
editSee or edit source data.
See or edit source data.
Test chart title positioning
editdefault chart title positioning
editSee or edit source data.
See or edit source data.
titleXAlign=left
editSee or edit source data.
See or edit source data.
titleXAlign=right
editSee or edit source data.
See or edit source data.
titleXAlign=center
editSee or edit source data.
See or edit source data.
titleXAlign=center | titleXOffset=80
editSee or edit source data.
Test axis domain min/max values values + clamping
editIt is possible to extend axis scales. And it is possible to shrink axis scale by manually providing scale domain min/max values, however without having "clamp":true it will not crop data plotting itself, but only affect axis positioning on graph, while adding "clamp":true actually applies data plotting cropping.
type=year
editxAxisMin=1994 | xAxisMax=2020 | yAxisMax=8000000
editSee or edit source data.
See or edit source data.
xAxisMin=1999 | xAxisMax=2014 | yAxisMax=4500000 | (without clamping)
editSee or edit source data.
See or edit source data.
xAxisMin=1999 | xAxisMax=2014 | yAxisMax=4500000 | xAxisClamp=true | yAxisClamp=true
editSee or edit source data.
See or edit source data.
type=linear
editxAxisZero=false | xAxisMin=1994 | xAxisMax=2020 | yAxisMax=8000000
editSee or edit source data.
See or edit source data.
xAxisZero=false | xAxisMin=1999 | xAxisMax=2014 | yAxisMax=4500000 | xAxisClamp=true | yAxisClamp=true
editSee or edit source data.
See or edit source data.
Test axis marks font size, angle + test legend labels transform
editxAxisAngle = -25 | xAxisFontSize = 20 | yAxisAngle = 25 | yAxisFontSize = 20 | labelsTransforms = { ... }
editSee or edit source data.
Test annotations
edittype=year
edithAnnotationsValues = {"text": "v 4.75", "y": 4750000} | vAnnotationsValues = {"text": "v 2002", "x": 2002}
editSee or edit source data.
See or edit source data.
hAnnotationsTable = ... | hAnnotationsTransforms = ... | vAnnotationsTable = ... | vAnnotationsTransforms = ...
editSee or edit source data.
See or edit source data.
type=linear
edithAnnotationsValues = {"text": "v 4.75", "y": 4750000} | vAnnotationsValues = {"text": "v 2002", "x": 2002}
editSee or edit source data.
See or edit source data.
hAnnotationsTable = ... | hAnnotationsTransforms = ... | vAnnotationsTable = ... | vAnnotationsTransforms = ...
editSee or edit source data.
See or edit source data.