idyll icon indicating copy to clipboard operation
idyll copied to clipboard

plot.ly support

Open sirinath opened this issue 8 years ago • 3 comments
trafficstars

Can you support plot.ly out of the box

sirinath avatar Jun 11 '17 04:06 sirinath

I'd be open to having a conversation about including a plot.ly component. Honestly I don't know enough about the plotly API to comment on how much that makes sense. IMO the most important thing for a default charting component in Idyll is that there's a nice interface to quickly create things like scatter plots and line plots with common data formats. We already support this in the [Chart /] component via the Victory library, but that has some quirks.

mathisonian avatar Jun 11 '17 06:06 mathisonian

I think it's a good candidate for npm install -S idyll-component-plotly being a straightforward process so that it's very simple, but I'm not sure out of the box support is desirable. For larger libraries like that, I think a bit more subtlety to the loading process is a good thing. For simple pages you might just want a blocking load, but for more production-quality things, you'd probably want to load the library asynchronously, maybe with an image placeholder. I've toyed around with both of those things a bit, but I wouldn't consider them quite ready for prime time.

I think the general syntax though would be:

[Plotly data:"data/file.json"/]

That could use my tentative/forthcoming/not quite finished loading component to load the plotly.js library, but you'd have to add a key for which plotly library (cdn? your own?)

Overall though, it should be very simple.

rreusser avatar Jun 17 '17 05:06 rreusser

I'd love to see this implemented as a new npm module

mathisonian avatar May 28 '19 22:05 mathisonian