Difference between revisions of "Template:Graph:CategoryPie"

From Public Play Space Community
Line 6: Line 6:
     {
     {
       "name": "table",
       "name": "table",
       "values": [1,1,1],
       "values": [{"name":"Green","data":1},{"name":"Blue","data":1},{"name":"Red","data":1}],
       "transform": [{"type": "pie", "field": "data"}]
       "transform": [{"type": "pie", "field": "data"}]
     }
     }
Line 15: Line 15:
       "type": "sqrt",
       "type": "sqrt",
       "domain": {"data": "table", "field": "data"},
       "domain": {"data": "table", "field": "data"},
       "range": [20, 100]
       "range": [0, 50]
     }
     }
   ],
   ],
Line 28: Line 28:
           "startAngle": {"field": "layout_start"},
           "startAngle": {"field": "layout_start"},
           "endAngle": {"field": "layout_end"},
           "endAngle": {"field": "layout_end"},
           "innerRadius": {"value": 20},
           "innerRadius": {"value": 0},
           "outerRadius": {"scale": "r", "field": "data"},
           "outerRadius": {"value": 100},
           "stroke": {"value": "#fff"}
           "stroke": {"value": "#fff"}
         },
         },
Line 52: Line 52:
           "align": {"value": "center"},
           "align": {"value": "center"},
           "baseline": {"value": "middle"},
           "baseline": {"value": "middle"},
           "text": {"field": "data"}
           "text": {"field": "name"}
         }
         }
       }
       }

Revision as of 08:47, 19 May 2020