Hopefully a very simple question. I am displaying some data using DC.js and Crossfilter and need to plot annual totals based on the financial year range 1st April - 31st March, i.e. the 2015 total will cover the date range 1st April 2015 - 31st March 2016.
I have created a year dimension as below though this is based on each year covering 1st January - 31st December. I cannot find anything obvious through searching the D3/DC/Crossfilter documentation.
The date value in the csv file being imported is in the format YYYYMMDD.
var yearFormat = d3.time.format("%Y");
var yearDim = cf.dimension(function (d) {
return yearFormat(d.myDateField);
});