Comments (7)
I managed to modify the legend
plugin to achieve a continuous legend. It is a hack based on the article I linked to earlier. Here is a jsfiddle with code to reproduce it. I also like the threshold key legends by Mike, and think it will be useful to write more flexible legend plugins.
PS. The plugins idea is supercool. It makes it really easy to extend datamaps
without having to dig into the core code base.
from datamaps.
I'm glad you were able to use the plugin system!
The technique used for the responsive map looks like listening for window.onresize
and updating the geographies drawn. If I were to put that in the library, I'd probably have drawOnWindowResize
boolean.
Typically the best way to make the map look good on mobile or desktop is using a % width and media queries for height for the container element. It would just break on window resizing.
from datamaps.
Thanks for a prompt reply. I understand the technical challenges with making maps responsive. If you can provide me with an example of how you would make this work using media queries, I can try to see if I can send a pull request after implementing the same.
I am working on a blog post on how to use datamaps
with bindings for rCharts to create interactive choropleths from R. I was able to hook it up with AngularJS to allow animation and more control for time-series choropleths. Here is a draft of the post. Please DO NOT share as it is still work-in-progress and I still need to add attributions, especially for datamaps. If you have any feedback/comments, I would appreciate that.
from datamaps.
That looks incredible. I'm very excited that you went with Datamaps for that portion of rCharts. Also glad you were able to use the new updateChoropleth
function!
Let me know when this is finished and I'll add a link to rCharts from the Datamaps project page.
from datamaps.
Thanks. I hope to complete the post this week and will then share. I will keep you posted.
from datamaps.
Connected issue with the animated map. updateChoropleth
allows me to update colors, but the hover data is still tied to the original data. Is there a way to update the hover data also dynamically?
from datamaps.
Has this been resolved?
from datamaps.
Related Issues (20)
- Some of Countries missing in DataMap HOT 1
- I want to draw lines/paths on india map? Can someone please guide?
- get lat lng somehow from click event
- Missing Nantucket and Marthas Vineyard in Datampas.usa.js HOT 1
- Is it possible to change border colour of specific countries using updateChoropleth?
- Unrecognizable src script HOT 3
- Function to use custom map data HOT 1
- choropleth map color not updating when highlight on hover set to true
- React Native
- Custom-map-data-multi-layer example no longer works
- Text on bubbles
- Part of Russia is coming to the left of America HOT 1
- unable to import datamaps in angular app HOT 2
- How to have 2 maps using the same source, but with different information on hover tooltip? HOT 1
- Zoom to specified latitude and longitude
- Adding datamap to Vue 3
- `animationEnd` and `animationStart` as a configurable option for `map.arcConfig`
- rendering issues in safari 16.3
- Simple installation question
- Map for switzerland (swz?) not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datamaps.