That's why I selected the "Macros Popular High Protein Foods" as my dataset for D3 visualization. I noticed a lot of people want to eat healthier, and the high Protein foods are essential for their diets.
I chose Proteins and carbohydrates chart to create x and y scale for my viz. But at first, I found the circles didn't match to the scale, I tried to change the margin to let scale more accessible, but it doesn't work.
It's good to know Trying to change the "range" number from "margin-left", the circles will start from the x scale.
As a high protein foods, fats also matters for healthy, so I tried to create a funcation "update", letting people to see the different between fats and carbohydrates. But it also didn't work at first. I checked all the codes I wrote, but still didn't know why.
And then I know it is because I just copy/paste the code from other project, and for this html it can't know what the data is, that is the big problem. Just "let" a new data exist, the code run!