Jump to content

Topic on Template talk:Graph:Stacked

Skip value / Start from

3
Valerio Bozzolan (talkcontribs)

Hello,

It would be amazing to skip the first column (a specific x / specific data row) in this graph. Is it supported?

{{Graph:Stacked
|title = Website visits by duration
|table = ItWikiCon/2020/WebsiteVisitsByDurationAll.tab
|type = ordinal
|xField = duration
|series = "visits"
}}

Used in meta:ItWikiCon/2020/Under the hood of a cozy online conference#Stats.

U.84-47-17-91 (talkcontribs)

I've recently added filter parameter similar to one from Template:Graph:Population_history. So now you could filter out first bar by simply adding |filter= datum.row > 0 Complete example will look like

{{Graph:Stacked
|title = Website visits by duration
|table = ItWikiCon/2020/WebsiteVisitsByDurationAll.tab
|type = ordinal
|xField = duration
|series = "visits"
|barwidth=50
|filter= datum.row > 0
}}

Currently this snippet definitely works on mediawiki, but probably will not work on other wikies until recent changes will be manually synced there.

Valerio Bozzolan (talkcontribs)

This is amazing. Thank you for your work!

Reply to "Skip value / Start from"