问题
I have created a D3 chart with year column as a number and have worked. But now we need to add the month and so I have added the month for one year as 201701,201702,201703,201704......201712 then the code is working fine as expected.
But when I just include 201611 (Nov 2016) for years list then 2017 year months all overlap.(I understand that it is taking as a number and that's why the number the difference between 201701 and 201611)
This is the screenshot:
I have tried with the changing that x-axis field as date field as now it is parsing as a number but was unsuccessful.
My Code is in : plunker
The binding of Graph is present in the mainscript.js and how to change x-axis as date fields
来源:https://stackoverflow.com/questions/47815204/how-to-show-d3-graph-with-year-and-month-on-x-axis-across-different-years