Zingchart Cumulative Line Graph Appearing Completely Linear
I recently started using Zingchart to graph large datasets in my Flask application.
I have around 45k unix timestamps that I want to graph, with the timestamps on the x-axis and their "accumulation" on the y-axis (ie. every new timestamp, increase the accumulator by 1). Here is my code, the timestamps are stored in listOfUts, which is passed through in render_template:
<center> <div id="myChart"></div> <script src="https://cdn.zingchart.com/zingchart.min.js"></script> <script> zingchart.render({ id: 'myChart', data: { type: 'line', series: [ { values: [ {% for item in listOfUts %} "{{ item }}", {% endfor %} ] }, { values: [ {% set count = 0 %} {% for item in listOfUts %} {% set count = count + 1 %} "{{ count }}", {% endfor %} ] } ] } }); </script> </center>
That produces a graph like this:
It appears to be perfectly linear, however my data is not perfectly linear – there should be periods of steep growth and periods of slow growth. My intuition is there is an error in my jinja2 but I’m not entirely sure where. Any help would be greatly appreciated! Thanks in advance!