I have a timeseries data from which I am trying to build a stackedAreaChart with nvd3. Series look like this:
xdata = ['2017-11-17', '2017-12-17', '2018-01-17', '2018-02-17', '2018-03-17', '2018-04-17']
ydata = [7277L, 9579L, 6291L, 6715L, 8743L, 9879L]
I convert dates in xdata to unix format and it becomes like this:
xdata = [1510873200000L,
1513465200000L,
1516143600000L,
1518822000000L,
1521241200000L,
1523916000000L]
Then I create a chart:
chart = stackedAreaChart(name='stackedAreaChart',
height=400,
width=400
,x_is_date=True
)
chart.add_serie(name = 'Chart1', y = ydata, x = xdata )
The problem is I want all xdata to be shown as ticks on x-axis or at least customize it in case of more data. I get output as on the picture below.
As you can see, dates are not equally displayed. I would like it to be 17 Nov 2017, 17 Dec 2017, 17 Jan 2018...
I haven't worked with js before, but everything I tried was unfortunate. I tried to add extra series to change x-axis format, but the problem us that extra series are added after plot is built and effect is not seen.