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
/** * A recreation of this demo: https://vega.github.io/vega-lite/examples/geo_choropleth.html */ import { feature } from 'topojson'; Promise.all([ fetch('https://assets.antv.antgroup.com/g2/us-10m.json').then((res) => res.json(), ), fetch('https://assets.antv.antgroup.com/g2/unemployment2.json').then((res) => res.json(), ), ]).then((values) => { const [us, unemployment] = values; const counties = feature(us, us.objects.counties).features; const chart = new Chart({ container: 'container', theme: 'classic', autoFit: true, }); chart .geoPath() .coordinate({ type: 'albersUsa' }) .data({ value: counties, transform: [ { type: 'join', join: unemployment, on: ['id', 'id'], select: ['rate'], }, ], }) .scale('color', { type: 'sequential', palette: 'ylGnBu', unknown: '#fff', }) .encode('color', 'rate') .state('active', { fill: 'orange' }) .state('inactive', { opacity: 0.5 }); chart.interaction('elementHighlight', true); chart.render(); });
The text was updated successfully, but these errors were encountered:
fixed by: #5095
Sorry, something went wrong.
pearmini
No branches or pull requests
The text was updated successfully, but these errors were encountered: