Hi; Im looking into the possible of creating charts such as Heatmaps in DT.
I can find javascript libraries for charts and heatmaps but almost nothing for applescript.
Mermeid is interesting but not enough functionally and aesthetically.
What is the best way to enable DT to create charts and graphs?
/A
Then you must use JavaScript. Which is no problem in DT. But some more context might give you more information – for example: what kind of documents do you want to create?
1 Like
I looking into if DT can be used for structured Business Analysis where visual representations are important, including various kinds of heat- and processmaps.
I imagine that, the input could come from (linked) documents collected in (smart)groups och sheets.
The output could be static PNG, JPG, maybe powerpoint or a dynamic HTML or similar ala Mermaid of GoJs.
But what role do you want DT to play in all this? It’s a document management system, not a programming environment. If you know of JavaScript libraries doing what you want, use them in whatever environment you’re comfortable with. There are some sample scripts for DT in this forum to be found, and theres
</publicity> for more general information on JXA (and also some DT code).
If the JS library produces that – sure. Mermaid is not a standalone format, AFAIK.
I had a brief look at https://apexcharts.com. With that, you can
- install the JS library with
npm
- write a JS script to be used in a smart rule or stand alone which
- collects the data from all currently selected documents/the ones selected by the smart
rule
- writes the code for another JavaScript script which builds the data structure and call(s) for the apex library
- and finally passes this script onto
npm
with something like doShellScript "npm `script code`"
So it might be feasible. But I doubt that it’s fun. Or flexible. Which might not be a concern if you’re always working with the same kind of data and generating the same kind of graphics from it.
1 Like