We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
for example ,can I use static data in the .html file?
The text was updated successfully, but these errors were encountered:
Hi @smilefishes, yes! You can bring your own data in any format. The key is in providing the right "value" accessor:
var cartogram = d3.cartogram() .value(function(feature) { // return a value for each feature here });
For instance, if you have your data in JSON as an object that maps feature IDs to numeric values, you could do this:
var data = { AL: 20, CA: 100, FL: 50 // ... }; cartogram.value(function(feature) { return data[feature.id] || 0; });
Feel free to re-open this issue with a more specific question if you still need help.
Sorry, something went wrong.
thanks a lot! It really works!
No branches or pull requests
for example ,can I use static data in the .html file?
The text was updated successfully, but these errors were encountered: