模板:Graph:Stacked/testcases
| 文件:Gnome-applications-science.svg | This is the template test cases page for the sandbox of 模板:Graph:Stacked. to update the examples. |
Test legend ordering with explicate `series` parameter
Series order and legend order should match each other
series="TX","NY","CA" ( colors=#1f77b4, #ff7f0e, #2ca02c )
series="NY","CA","TX" ( colors=#ff7f0e, #2ca02c, #1f77b4 )
series="TX","NY","CA" ( colors=#2ca02c, #1f77b4, #ff7f0e )
Test dataset optional filtering (e.g. for limiting x-axis displayed range)
without filtering (default width)
filter = 2000 <= datum.year && datum.year <= 2010
filter = datum.year <= 2010
Test optional arbitrary ("raw") data transforms
filter = 2000 <= datum.year && datum.year <= 2010
dataTransforms = { "type": "filter", ... }, { "type": "filter", ... }
Test different colors list formats
colors=["#1f77b4", "#ff7f0e", "#2ca02c"]
colors=["rgba(31,119,180,80%)", "rgba(255,127,14,80%)", "rgba(44,160,44,80%)"]
colors=rgb(31 119 180 / 70%), rgb(255 127 14 / 70%), rgb(44 160 44 / 70%)
colors="category20"
colorscheme=category20
Test chart sizing (enabling/disabling chart width grows)
without explicit `chartSizing` (default chart sizing model)
模板:Graph:Stacked 模板:Graph:Stacked
chartSizing=fit | chartSizing=padding-box
模板:Graph:Stacked 模板:Graph:Stacked 模板:Graph:Stacked
chartSizing=pad | chartSizing=content-box
模板:Graph:Stacked 模板:Graph:Stacked
Test chart title positioning
default chart title positioning
模板:Graph:Stacked 模板:Graph:Stacked
titleXAlign=left
模板:Graph:Stacked 模板:Graph:Stacked
titleXAlign=right
模板:Graph:Stacked 模板:Graph:Stacked
titleXAlign=center
模板:Graph:Stacked 模板:Graph:Stacked
titleXAlign=center | titleXOffset=80
Test axis domain min/max values values + clamping
It 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
xAxisMin=1994 | xAxisMax=2020 | yAxisMax=8000000
模板:Graph:Stacked 模板:Graph:Stacked
xAxisMin=1999 | xAxisMax=2014 | yAxisMax=4500000 | (without clamping)
模板:Graph:Stacked 模板:Graph:Stacked
xAxisMin=1999 | xAxisMax=2014 | yAxisMax=4500000 | xAxisClamp=true | yAxisClamp=true
模板:Graph:Stacked 模板:Graph:Stacked
type=linear
xAxisZero=false | xAxisMin=1994 | xAxisMax=2020 | yAxisMax=8000000
模板:Graph:Stacked 模板:Graph:Stacked
xAxisZero=false | xAxisMin=1999 | xAxisMax=2014 | yAxisMax=4500000 | xAxisClamp=true | yAxisClamp=true
模板:Graph:Stacked 模板:Graph:Stacked