Dear Observerable Team and Community Members,
I am trying to convert Mike’s BiLevel Donut Chart from Bl.ocks to Observable.
Here’s where I am at:
I’ve made a few adjustments: updating bits here and there to update from d3v3 to d3v4, attempting to add in a
<svg> container to which the data can bind in an effort to learn from Tom’s earlier feedback. Most everything appears to be in order (at least I am not getting errors with my cells), but still the visualization isn’t loading.
I suspect that there’s an issue with how I am referencing the json file. In the example, the data were stored in a
json data file. I tried using
d3.json to load in the data, and “named” the cell as
jsondata=. I tried adjusting the example to call in these data, but the chart is drawing as an empty container.
Towards solving this on my own, I referred to Mike’s Introduction to Data notebook, but this didn’t address issues of naming a dataset (which I am guessing is my issue). I also tried re-organizing the example in code in a manner similar to Mike’s donut chart example… which I unfortunately didn’t fork into a separate notebook for reference, but which was giving me a different error wherein the svg element was being returned in a weird way. Lastly, I watched Tom’s YouTube Video on Converting D3.js to work in Observable. Still no dice.
Unfortunately, I don’t know if my mistake is actually with the data loading, or if I am making another mistake in rendering the chart.
I would be happy for some help and guidance. Thanks so much to Tom and Mike for all the tutorials and problem-specific help and insights that you’ve shared with me already!!!