idyll
idyll copied to clipboard
plot.ly support
Can you support plot.ly out of the box
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.
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.
I'd love to see this implemented as a new npm module