Difference between revisions of "Template:Graph:CategoryPie"

From Public Play Space Community
Line 6: Line 6:
     {
     {
       "name": "table",
       "name": "table",
       "values": [{"name":"Green","data":1},{"name":"Blue","data":1},{"name":"Red","data":1}],
       "values": [{"name":"Green","color":"#1d6100","data":1},{"name":"Blue","color":"#000361","data":1},{"name":"Red","color":"#610000","data":1}],
       "transform": [{"type": "pie", "field": "data"}]
       "transform": [{"type": "pie", "field": "data"}]
     }
     }
Line 29: Line 29:
           "endAngle": {"field": "layout_end"},
           "endAngle": {"field": "layout_end"},
           "innerRadius": {"value": 0},
           "innerRadius": {"value": 0},
           "outerRadius": {"value": 100},
           "outerRadius": {"value": 100}
          "stroke": {"value": "#fff"}
         },
         },
         "update": {
         "update": {
           "fill": {"value": "#ccc"}
           "fill": {"field": "color"}
        },
        "hover": {
          "fill": {"value": "pink"}
         }
         }
       }
       }
Line 57: Line 53:
     }
     }
   ]
   ]
}
}\
</graph>
</graph>

Revision as of 08:52, 19 May 2020

Syntax error