You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before writing: chart.htmlcontent.replace("Ya","yA").replace("Xa","xA")
NVD3.js expectes yA instead of Ya for "chart.yAxis.axisLabel". Same is the case with X axis.
Creating a Line Chart and then adding axis throws error.
from nvd3 import lineChart
output_file = open('LineChart.html','w')
chart = lineChart(name="lineChart", x_is_date=False, x_axis_format="AM_PM", show_labels=True, margin_bottom=60, margin_top=60)
xdata = range(24)
ydata = [0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 4, 3, 3, 5, 7, 5, 3, 16, 6, 9, 15, 4, 12]
ydata2 = [9, 8, 11, 8, 3, 7, 10, 8, 6, 6, 9, 6, 5, 4, 3, 10, 0, 6, 3, 1, 0, 0, 0, 1]
extra_serie = {"tooltip": {"y_start": "There are ", "y_end": " calls"}}
kwargs1 = {'color': "blue"}
kwargs2 = {'color': 'red'}
chart.add_serie(y=ydata, x=xdata, name='sine', extra=extra_serie, **kwargs1)
extra_serie = {"tooltip": {"y_start": "", "y_end": " min"}}
chart.add_serie(y=ydata2, x=xdata, name='cose', extra=extra_serie, **kwargs2)
chart.create_x_axis(name="Xaxis", label="Something in X-axis")
chart.create_y_axis(name="Yaxis", label="Something in Y-axis")
chart.buildhtml()
output_file.write(chart.htmlcontent)
output_file.close()
The text was updated successfully, but these errors were encountered: