import random from IPython import display as d import nvd3 nvd3.ipynb.initialize_javascript(use_remote=True) help(nvd3.ipynb.initialize_javascript) nvd3.ipynb.initialize_javascript(use_remote=True) type = 'stackedAreaChart' chart2 = nvd3.stackedAreaChart(name=type,height=450,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 chart = nvd3.scatterChart(name='scatterChart_1', width=600, height=300, x_is_date=False) nb_element = 50 xdata = [i + random.randint(1, 10) for i in 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] kwargs1 = {'shape': 'circle', 'size': '1'} kwargs2 = {'shape': 'cross', 'size': '10'} kwargs3 = {'shape': 'triangle-up', 'size': '100'} extra_serie = {"tooltip": {"y_start": "", "y_end": " calls"}} chart.add_serie(name="serie 1", y=ydata, x=xdata, extra=extra_serie, **kwargs1) chart.add_serie(name="serie 2", y=ydata2, x=xdata, extra=extra_serie, **kwargs2) chart.add_serie(name="serie 3", y=ydata3, x=xdata, extra=extra_serie, **kwargs3) chart type = 'pieChart' chart1 = nvd3.pieChart(name=type, color_category='category20c', height=450, width=450) chart1.set_containerheader("\n\n