Open brianjenkins94 opened 4 years ago
Basically I'm trying to build something of a gantt chart that shows the last 30 days.
See the 2 comments below on the solutions that I thought should have worked:
c3.generate({ "bindto": "#chart1", "data": { "type": "bar", "json": data, "keys": { "x": "ticketNumber", "value": ["startDate", "endDate"] }, "groups": [ ["startDate", "endDate"] ], "colors": { "startDate": "transparent", } }, "axis": { "x": { "type": "category", "tick": { "values": [], } }, "y": { "type": "timeseries", "min": Date.now() - 1000 * 60 * 60 * 24 * 30, "max": Date.now(), "tick": { // Neither of these appear to change anything: //"culling": true, //"fit": true, "format": d3.timeFormat("%B %d, %Y"), "outer": false, // Nor does this: //"values": (function() { // const values = []; // // for (const x = new Date(Date.now() - 1000 * 60 * 60 * 24 * 30); x < Date.now(); x.setDate(x.getDate() + 1)) { // if (x.getDay() === 0) { // values.push(x); // // x.setDate(x.getDate() + 6) // } // } // // return values; //})() } }, "rotated": true }, "legend": { "hide": true } });
Basically I'm trying to build something of a gantt chart that shows the last 30 days.
See the 2 comments below on the solutions that I thought should have worked: