Thursday, May 14, 2020

D3-Celestial: SVG and PNG-Export

A long requested feature for D3-Celestial: Export a map view as SVG, and for good measure I also implemented saving a PNG image. Both are available as buttons below the form. Ther isn't much to write about; a simple click saves the current view in the chosen format. the configuration parameter formFields.download = true enables the feature.

3 comments:

  1. The https://github.com/ofrohn/d3-celestial repo lists various methods to use form functionality. Is there a method to export to SVG\PNG?

    ReplyDelete
  2. https://github.com/ofrohn/d3-celestial lists various exposed functions and objects. Is there an exposed function to save to SVG?

    ReplyDelete
  3. When I call Celestial.exportSVG('test.svg'), I get "Uncaught TypeError: exportCallback is not a function" in celestial.js. Any ideas why?

    ReplyDelete