Open sachinjakhar23 opened 6 years ago
I know it's old question, but maybe it will be useful for somebody else. Wrap the maps in list. Like that: xdata = list(map(lambda x: start_time + x * 1000000000, xdata))
Do it both for xdata and ydata2. In my case it works.
Hi All, While using NVD3 and the examples available on this page I am not able to generate the graph, Nothng is generated. I am using Django 2.0, Python 3.6.3 and NVD3
Here is my view.py
def demo_linechart(request): """ lineChart page """ start_time = int(time.mktime(datetime.datetime(2012, 6, 1).timetuple()) 1000) nb_element = 150 xdata = range(nb_element) xdata = map(lambda x: start_time + x 1000000000, xdata) ydata = [i + random.randint(1, 10) for i in range(nb_element)] ydata2 = map(lambda x: x * 2, ydata)
Below is the HTML
{% load nvd3_tags %}
Pls suggest what to do as nothing is displayed on the webpage