Am trying to implement the Donut Chart with my own data.
In my donut drawing function I get:
overall = TypeError: Cannot read property 'name' of undefined
for
.attr("fill", d => color(d.totals_arcs.name))
My data looks like:
totals_arcs = Array(18) [
0: Object {name: “eClose”, value: 190}
1: Object {name: “Secondary Marketing”, value: 250}
2: Object {name: “Encompass\n- New URLA\n- Enhanced Conditions & Task-based Workflow”, value: 150}
3: Object {name: “Network\n- TPOC\n- Automated Service Ordering\n- Investor Connect\n- Marketplace”, value: 450}
4: Object {name: “Simplifile”, value: 110}
5: Object {name: “AIQ - Core”, value: 150}
6: Object {name: “AIQ - Analyzers”, value: 300}
7: Object {name: “AIQ - Integration”, value: 50}
8: Object {name: “Consumer Engagement\n- LM/LOC/ECC Integration\n- Mobile”, value: 350}
9: Object {name: “Data & Insights”, value: 40}
10: Object {name: “Compliance”, value: 50}
11: Object {name: "Accessibility ", value: 200}
12: Object {name: “Dim Sum”, value: 300}
13: Object {name: “Acquisitions Alignment”, value: 30}
14: Object {name: “Integrations Alignment”, value: 25}
15: Object {name: “Admin”, value: 55}
16: Object {name: “Other”, value: 100}
The Donut Data has an extra object at the end:
columns: Array(2) [
0: “name”
1: “value”
]
I tried adding an “columns” Object and end up with:
17: Object {
columns: Array(2) [“name”, “value”]
- Is this the problem?
- How do I coerce an array to have this?