Jump to content

Module talk:Piechart

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Nux (talk | contribs) at 02:45, 24 January 2025 (Combining with Template:Pie chart: Reply). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Option not to sum to 100 percent

Would be nice to have an "other" chunk that isn't mentioned in the legend. Wizmut (talk) 22:00, 4 February 2024 (UTC)[reply]

Combining with Template:Pie chart

This has some advantages over {{Pie chart}} (tooltips, calculates percentages, no crosshair glitches). I've been tinkering with using the template's pie chart as a replacement for the one in {{Pie chart}}. There are a bunch of demos of {{Pie chart/sandbox2}} at Template:Pie chart/testcases. Nux, I have a few questions, is this something that you'd want to get wider usage or more a proof of concept. It's only transcluded to a handful of pages right now.

Also, the module should do something to sanitize user input for titles. A lot of people will place links there so the brackets ([ and ]) need to be checked for, and in case they use a piped link, it also needs to remove the pipe (|) and the wikilink target. Rjjiii (talk) 21:03, 22 January 2025 (UTC)[reply]

Hi, yes this module can be used widely. I've added suport for links in labels and added an example here: Module:Piechart#Links. I think now in most cases you should be able to replace {{Pie chart}}, maybe even converting it automatically to the {{Piechart}}. Also added support for floating graphs in the template. Nux (talk) 02:45, 24 January 2025 (UTC)[reply]