dtz55359 2016-02-18 14:58
浏览 75

通过服务器导出Highcharts bubble lat / long map

TL;DR

Does somebody know how to export the bubble map with lat, lon points, and why is my code rendering empty map?


I am trying to export Highcharts bubble chart trough their server export.highcharts.com, but all I get is empty map with no cities on it.

When you go to http://export.highcharts.com/ set Constructor to Map, paste this code to Options textarea http://pastebin.com/ZGWme6rJ (too long to paste here) in and click Preview, you'll see that it generates blank map, with nothing on it (remove text from Callback textarea on the site), but if you'd use it in a graph, you get this result: http://jsfiddle.net/2ubcsgbe/

I managed to export regions map without any problems using this code: http://pastebin.com/XqhdN48B (you can test it at http://export.highcharts.com)

I also googled and read their API & docs, but could not find any examples of how you should export such map. Does somebody have idea or example of how to export such map trough their export server?

Ps.: I can not use their exporting module, as I am manipulating the image on my server with PHP & mPDF. And I also can not use any other libraries.

Thanks.

  • 写回答

1条回答 默认 最新

  • dsk49208 2016-02-18 15:45
    关注

    I found out that Highcharts has functions chart.getSVG() and chart.getSVGForExport()

    So instead of me manually getting data from the charts and making my own functions for hours, now I am just using chart.getSVGForExport() and sending data it returns by to their export server and it works like a charm...

    Don't forget that you need their export.js to have access to this functionality.

    Man, I just wasted so much time doing this manually...

    评论

报告相同问题?