Difference between revisions of "User:Fbstj/edits-pie"

m
+percent
(+)
 
m (+percent)
{ "type": "filter", "test": "datum.sliceSize > 2" },
// Remove namespace from the text - keeps only text after the first ':' symbol, limits to 40 chars.
{ "type": "formula", "field": "name", "expr": "substring(datum.name, 1+indexof(datum.name,':'), 40) +': '+ datum.editcount + ' ('+ round(datum.sliceSize * 100 / 180) +'%)'" },
// Determine the side of the pie chart we are on - left or right.
{ "type": "formula", "field": "invert", "expr": "datum.layout_mid*180/PI < 180 ? 1 : -1" },