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
Hello. I'm glad to using Kartograph library. But i have a issue about adding label symbols.
Here is my code:
.get('Aimag1.svg', function(svg) { var div = $('<div />').addClass('mapnail'); $('#map').append(div); var map = kartograph.map(div, w * 0.5, w/3); map.setMap(svg); map.addLayer('provinces', { styles: { 'stroke-width': 0.3, 'fill': "#FFF", 'stroke': "#000" }, mouseenter: function(d, path) { if(path.attr('fill') != 'red') path.attr('fill', '#c04'); }, mouseleave: function(d, path) { if(path.attr('fill') == '#c04') path.animate({ fill: '#fff' }, 1000); }, click: function(data, path, event) { if(path.attr('fill') != 'red') path.attr('fill', 'red'); else path.attr('fill', '#fff'); }, tooltips: function(d) { return ['/km<sup>2</sup>']; } map.addSymbols({ type: kartograph.Label, data: map.getLayer('provinces').getPathsData(), location: function(d) { //console.log(map.getLayer('provinces').getPathsData()); //return 'provinces.0'; return 'provinces.' + d.id }, text: function(d) { return d.namemn; } });
And the log is: Error: <text> attribute x: Expected length, "NaN".
Error: <text> attribute x: Expected length, "NaN".
Thank you for helping!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello. I'm glad to using Kartograph library.
But i have a issue about adding label symbols.
Here is my code:
And the log is:
Error: <text> attribute x: Expected length, "NaN".
Thank you for helping!
The text was updated successfully, but these errors were encountered: