The anychart pie chart didn’t render graph

0
Hi community, I am using anychart in my app, and I want to render a pie chart. I follow the cheat sheet to build the entity structure for creating JSON, but it won’t work. Can someone help me to check what’s wrong with the json data:    [ { "orientation": "v", "type": "pie", "name": "Apple", "x": [ 5 ], "y": [ "Apple" ] }, { "orientation": "v", "type": "pie", "name": "Sumsung", "x": [ 3 ], "y": [ "Sumsung" ] }, { "orientation": "v", "type": "pie", "name": "siemens", "x": [ 2 ], "y": [ "siemens" ] }, { "orientation": "v", "type": "pie", "name": "Huawei", "x": [ 60 ], "y": [ "Huawei" ] } ]  
asked
1 answers
3

Your data is in scatter format, for pie chart you need this format

 

[{
  "values": [19, 26, 55],
  "labels": ['Apple', 'Huawei', 'Samsung'],
}]

 

 

answered