Search code examples
d3.jsvisualizationbokehmpld3

Interactive chart Library for web browser supporting click and drag of points


I've developed an application in pyqt and matplotlib which allows the user to drag and edit plot data and I need to provide the same functionality in a web browser. I've looked at d3.js but the learning curve seems too steep for the time I have available.

I need advice on which Library/Framework can deliver my needs. Users should be able to select a number of points on a chart and be able to drag them without any noticeable performance penalty. bokeh and mpld3 seem like good candidates. Can anyone advise if these libraries or any other would work well for my needs?


Solution

  • Bokeh provides a number of standard mechanisms to enable it, mainly via JavaScript or Python callbacks. There is a number of drag tools like BoxSelectTool or LassoSelectTool for which you could define a callback but it is also possible to attach a callback to the canvas or plot's data source object.

    Additionally it is possible to add a new functionality to Bokeh by writing your own extensions using TypeScript. See Bokeh documentation here.