Cufflinks Graphs in Dash


#1

Hi. I just wanted to know if there is any way to integrate cufflinks graphs in dash apps.


#2

There should be some way to return a cufflinks figure as the standard plotly figure, I suspect it’s something like to_figure or as_figure. If you find that method, then should be able to pass the result directly into the figure property of dcc.Graph, something like: dcc.Graph(figure=cufflings_graph.as_figure())


#3

Thanks @chriddyp for the reply. I will try the same and hope the solution works.


#4

I’ve written a wrapper for libraries in including plotly (cufflinks) at https://github.com/cuemacro/chartpy. It returns figure objects that can be used in Dash, from a callback. Here’s an example below:

from chartpy import Chart, Style

style = Style(title=title, plotly_plot_mode='dash')

plot = Chart().plot(df, style=style, chart_type='line')

The plot object can be used in Dash callback.


#5

OOOhh!! Thanks @saeedamen for the help. i was trying to find something like this. Although i solved the problem by removing the cufflinks code and using the plotly conventional coding. However, i am sure it will come handy later.