Offline does not render in a published notebook in a dashboard or an insight

theoplatt Registered Posts: 5 ✭✭✭✭
edited July 16 in Using Dataiku

Hi there,

Running a python Jupyter notebook I can render beautiful offline charts. However, when I publish the notebook to a dashboard, those charts are no longer visible.

I can seem to publish the charts as individual insights using a static insight but I really like the idea of keeping it within the published notebook.

For example - try this in a notebook (assuming you have plotly installed in your python environment). It should work and show a pretty contour plot. Not publish that notebook on a dashboard. Neither the dashboard rendering or insight rendering show the graph - just a blank.

import dataiku
import plotly.graph_objs as go
import numpy as np
import plotly.offline as py


x = np.random.randn(1000)
y = np.random.randn(1000)

fig = go.FigureWidget(
{'x': x, 'y': y, 'type': 'histogram2dcontour'}

py.iplot(fig, filename='histogram')

Screen grab of the notebook running -

Not quite so exciting screen grab of the insight...

Any ideas?

Many thanks


Best Answer

  • Alex_Combessie
    Alex_Combessie Alpha Tester, Dataiker Alumni Posts: 539 ✭✭✭✭✭✭✭✭✭
    Answer ✓

    Due to the current way Plotly works, this is only possible through the standard Plotly methods, not the offline ones. This is already referenced as an issue on Plotly's Github:

    Do you have a professional Plotly account? If so, have you tried with the standard Plotly server (not through offline)?




  • theoplatt
    theoplatt Registered Posts: 5 ✭✭✭✭
    Hi Alex - not exactly what I was hoping to hear but I'll try the professional Plotly account option and see how that shapes up.

    I love the ides of being able to publish Jupyter notebooks as insights and hiding the code behind them.

    Thanks for your answer.
Setup Info
      Help me…