Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should charts render in jupyterlab? #147

Open
jwhendy opened this issue Nov 5, 2017 · 0 comments
Open

Should charts render in jupyterlab? #147

jwhendy opened this issue Nov 5, 2017 · 0 comments

Comments

@jwhendy
Copy link

jwhendy commented Nov 5, 2017

Using this example, I get an error and blank output.

import random
from IPython import display as d
import nvd3
nvd3.ipynb.initialize_javascript(use_remote=True)

type = 'stackedAreaChart'
chart2 = nvd3.stackedAreaChart(name=type,height=450,width=500, 
                               use_interactive_guideline=True)
nb_element = 50
xdata = range(nb_element)
ydata = [i * random.randint(1, 10) for i in range(nb_element)]
ydata2 = [x * 2 for x in ydata]
ydata3 = [x * 5 for x in ydata]
chart2.add_serie(name="serie 1", y=ydata, x=xdata)
chart2.add_serie(name="serie 2", y=ydata2, x=xdata)
chart2.add_serie(name="serie 3", y=ydata3, x=xdata)
chart2

2017-11-05_150003

$ pip freeze
python-nvd3==0.14.2
ipython==6.2.1
jupyter-client==5.1.0
jupyter-console==5.2.0
jupyter-core==4.4.0
jupyterlab==0.28.12
jupyterlab-launcher==0.5.5

Is there any other data needed to identify if this is a bug or some sort of setup issue? For what it's worth, I'm up to 4 js based plotting libraries and they all fail except for altair with their various commands to render in jupyterlab. Not sure if that's related or not, but thought I'd mention it.

  • bokeh with output_notebook()
  • plotly with init_notebook_mode()
  • altair works with it's alt.enable_mime_rendering()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant