rawgraphs / rawgraphs-app

A web interface to create custom vector-based visualizations on top of RAWGraphs core
https://rawgraphs.io
Apache License 2.0
8.66k stars 1.84k forks source link

API call to translate .rawgraph into .jpeg/.png/etc #253

Closed cuddihyge closed 3 years ago

cuddihyge commented 3 years ago

(I've made a good-faith, hour+ attempt to search through docs and hope this question is reasonable)

Goal: translate a .rawgraph file into a rendered graph file programatically.

Is there a REST-like call to the server, or do I need to use the code.

I couldn't find any docs on this in Wiki (not enough context to understand the API section).

bianchimro commented 3 years ago

Hi @cuddihyge your question is reasonable :)

We're publishing the rawgraphs-core (the library used by rawgraphs app) code and docs in the next weeks, and we'll explain in detail the process of rendering a rawgraphs chart from your javascript code (also from a project). Here you can see an early preview of the API usage for this purpose:

https://observablehq.com/@bianchimro/test-rawgraphs

but keep in mind that the api is not totally stable and it could slightly change before the public release.

Also note that the example I linked lives in observablehq environment .. so the syntax is not "vanilla" javascript.

bianchimro commented 3 years ago

Hi @cuddihyge, we just released the rawgraphs-core library. The api is not 100% stable and docs not 100% complete, but you should find all the information needed to perform your task, the example I linked in the previous comment is still a valid example.