1

I have a time-series-style array of data I would like to pass into a noflo component which displays the data in a cart/graph/plot using the browser runtime and the flowhub ui.

I've browsed through the component library and not found a relevant component. I'm familiar with several charting libraries and am willing to write it myself, but am unsure how to fit this into a component.

  1. is there a charting/plotting component that I missed? I've seen noflo-ducksboard, but I really want to be able to view the plot from within the noflo-ui.
  2. how might I load a charting library into a component?
  3. is there a particular charting library you suggest I use?
7yl4r
  • 4,788
  • 4
  • 34
  • 46

1 Answers1

1

I have not seen a specific charting library. noflo-canvas is lower-level, and could give you the primitives that you need. Here is a quick demo line chart: https://app.flowhub.io/#example/77f213fb32c9b22527e2

noflo-canvas demo line chart

To build from this you would just need to build one component that translates your data into the points to be drawn.

forresto
  • 12,078
  • 7
  • 45
  • 64
  • thanks for the example. This will help me a lot if I go this route, but I'm really hoping I don't need to build a charting library from scratch. Though I suppose I could decompose an existing one into a set of components. Is it possible to load javascript in an external file into a component or into the runtime environment for use in components? – 7yl4r Apr 15 '15 at 16:09
  • also: why does dom/GetElement work there? where was the #mycanvas element created? – 7yl4r Apr 16 '15 at 13:43
  • Library authoring with dependencies isn't polished yet. Check out https://github.com/noflo/noflo-browser-app to make a custom iframe runtime where you can load d3 or whatever charting lib you like. The canvas was made in the graph settings (cog icon to right of search) "preview contents" html. To make a canvas within the graph, there is `canvas/CreateCanvas` and `dom/AppendChild`. – forresto Apr 17 '15 at 14:05
  • aha! Thanks for the tips. It's all starting to make sense now. – 7yl4r Apr 17 '15 at 15:18