markmarkoh / datamaps

Customizable SVG map visualizations for the web in a single Javascript file using D3.js
http://datamaps.github.io
MIT License
3.78k stars 1.01k forks source link

Arc global options are not used #64

Closed duccio closed 10 years ago

duccio commented 10 years ago
    <script src="http://datamaps.github.io/scripts/datamaps.world.js"></script>
    […]
    var map = new Datamap({
        element: document.getElementById('container'),
        projection: 'mercator',
        geographyConfig: {
            popupOnHover: false,
            highlightOnHover: false
        },
        arcConfig: {
            strokeColor: '#000000',
            strokeWidth: 10
        }
    });

    map.arc([{
        origin: { latitude: 10, longitude: 20 },
        destination: { latitude: 50, longitude: 90 },
    }])

Arcs are not black and 10px width!

markmarkoh commented 10 years ago

Since arc is a plugin, I've been trying to move all plugin options to the actual plugin call itself. So you would do this:

    map.arc([{
        origin: { latitude: 10, longitude: 20 },
        destination: { latitude: 50, longitude: 90 },
    }], {
            strokeColor: '#000000',
            strokeWidth: 10
   });
duccio commented 10 years ago

Hi Mark, thanks for you reply. Yes, I can move this 2 options to "datum", how about animationSpeed and arcSharpness? My above was only an example, I'm interested in animationSpeed :-)


UPDATE: Sorry, you says to move the plugin options to plugin, not datum. It works, thanks.