User:Nux/pie chart - todo
Appearance
< User:Nux
Links
[edit]Wiki | Type | Link |
---|---|---|
enwiki | css | Template:Pie chart/styles.css • Template:Pie chart/sandbox/styles.css • diff |
tpl | Template:Pie chart • Template:Pie chart/sandbox • diff | |
mod | Module:Piechart • Module:Piechart/sandbox • diff | |
cases | Template:Pie chart/testcases | |
plwiki | css | Template:Piechart/style.css (edycja • historia • ostatnia edycja) |
tpl | Template:Piechart (edycja • historia • ostatnia edycja) | |
mod | Moduł:Piechart (edycja • historia • ostatnia edycja) | |
cases/tests | Moduł:Piechart/test (edycja • historia • ostatnia edycja) |
Tracing
[edit]below 100 + 0.2 • below 100 + 0.4 • below 100 + 0.6 • below 100 + 0.8 • below 100 + 1.0 • below 100 + 1.5 • below 100 + 2.0 • below 100 + 2.5 • below 100 + 3.0 • below 100 + 3.5 • below 100 + 4.0 • below 100 + 4.5 • below 100 + 5.0 • below 100 + 5.5 • below 100 + 6.0 • below 100 + 6.5 • below 100 + 7.0 • below 100 + 7.5 • below 100 + 8.0 • below 100 + 8.5 • below 100 + 9.0 • below 100 + 9.5 • below 100 + 10.0
Pie chart 1.0
[edit]Pie chart for pl.wiki and later for en.wiki.
PoC and some helpers: https://github.com/Eccenux/css-piechart
TODO / features:
- ✅ basic 2-element pie chart
- read json
- calculate value with -1
- generate html
- new css + tests
- provide dumb labels (just v%)
- ✅ colors in json
- ✅ 1st value >= 50%
- ✅ custom labels support
- ✅ pie size from 'meta' param (options json)
- ✅ pl formatting for numbers?
- ✅ support undefined value (instead of -1)
- ✅ undefined in any order
- ✅ scale values to 100% (autoscale)
- ✅ order values clockwise (not left/right)
- ✅ multi-cut pie
- ✅ sanitize user values
- ✅ auto colors
- ✅ function to get color by number (for custom legend)
- ✅ remember and show autoscaled data
- ✅ generate a legend
- ✅ simple legend positioning by (flex-)direction
Pie chart 2.0
[edit]Integration with en:Template:Pie chart. Support for enumerated template parameters (i.e. value1..n, label1..n, color1..n).
- ✅Support templates in colors
- ✅Example for PoC Template:Sandbox/Nux/enumParams/test
- ✅Prototype/PoC Module:Sandbox/Nux
- ✅Implement in sandbox.
- ✅Support both JSON and enum-params.
- ✅Proper support for other (compatibility, but without a formatting bug).
- ✅Remove {{Piechart/sandbox}} call and just invoke the module directly.
- ✅Allow passing custom meta JSON.
- ✅Replace Template:Pie chart/sandbox for easier testing and stuff...
- ✅Add more test cases
- ✅Remove Template:Pie chart/sandbox2 from cases
- ✅Side-by-side view of test cases (flex = shorter)
- ✅Simple cases for {{{thumb}}} param
- ✅Footer (expected not to be supported by sandbox template yet)
- ✅Numbers that are over 100 (autoscale; expected not to be supported by current template yet)
- ✅Re-think colors
- ✅Support numbers over 100
- ✅calculate sum before settings labels (sum > 100 => autoscale)
- ✅sum > 100 => use $v in labels
- ✅support setting $v in label1..n params
- ✅generate meta-JSON from classic params (similar function to parseEnumParams)
- ✅Support
{{{footer}}}
; used in e.g.: - ✅Re-integrate with plwiki.
- ✅Finalize?
- ✅Replace Module:Piechart code with its sandbox.
- ✅Replace Template:Piechart code with its sandbox.
- ✅Docs update?
- ✅Merge
- ✅Template:Piechart/sandbox/styles.css → Template:Piechart/styles.css (diff)
- ✅Template:Pie chart/sandbox → Template:Pie chart (+ Piechart/styles.css) (diff)
- ✅→ Template:Pie chart/styles.css (diff)
- ✅Template:Pie chart (+ Pie chart/styles.css)
- (?) ✅Redirect Template:Piechart to Template:Pie chart
Hopes and dreams
[edit]- legend2: customization
- (?) itemTpl support
- replace default item with tpl
- can I / should I sanitize it?
- support for $v, $d, $p
- (?) custom head
- (?) itemTpl support
- (?) validation of input
- check if required values are present
- message showing whole entry, when entry is invalid
- pre-sanitize values?
- sane info when JSON fails? Maybe dump JSON and show example with quotes-n-all...
- (?) option to sort entries by value