I'm drawing a pie chart with two simple values: label and value. This is my json:
{
"valuecase": {
"times": [
{"label": "label", "value":5},
{"label": "label", "value":13}
],
"record": [
{"label": "label", "value":5},
{"label": "label", "value":13}
]
}
}
I'm not sure it's the best structure, in fact d3.js I can't call data value. This is my code:
d3.json("my.json", function(json) {
data = json.valuecase;
...selectAll("path")
.data(pie(dataset.times)) //*** How call the array, only value data??
}
any suggestions?