How to use the d3-time.timeMonths function in d3-time

To help you get started, we’ve selected a few d3-time examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / types / d3-time / d3-time-tests.ts View on Github external
countableI = d3Time.timeThursday;
dateArray = d3Time.timeThursdays(start, end);
dateArray = d3Time.timeThursdays(start, end, 2);

countableI = d3Time.timeFriday;
dateArray = d3Time.timeFridays(start, end);
dateArray = d3Time.timeFridays(start, end, 2);

countableI = d3Time.timeSaturday;
dateArray = d3Time.timeSaturdays(start, end);
dateArray = d3Time.timeSaturdays(start, end, 2);

countableI = d3Time.timeMonth;
dateArray = d3Time.timeMonths(start, end);
dateArray = d3Time.timeMonths(start, end, 3);

countableI = d3Time.timeYear;
dateArray = d3Time.timeYears(start, end);
dateArray = d3Time.timeYears(start, end, 2);

countableI = d3Time.utcMillisecond;
dateArray = d3Time.utcMilliseconds(start, end);
dateArray = d3Time.utcMilliseconds(start, end, 60000);

countableI = d3Time.utcSecond;
dateArray = d3Time.utcSeconds(start, end);
dateArray = d3Time.utcSeconds(start, end, 120);

countableI = d3Time.utcMinute;
dateArray = d3Time.utcMinutes(start, end);
dateArray = d3Time.utcMinutes(start, end, 5);
github DefinitelyTyped / DefinitelyTyped / types / d3-time / d3-time-tests.ts View on Github external
dateArray = d3Time.timeWednesdays(start, end, 2);

countableI = d3Time.timeThursday;
dateArray = d3Time.timeThursdays(start, end);
dateArray = d3Time.timeThursdays(start, end, 2);

countableI = d3Time.timeFriday;
dateArray = d3Time.timeFridays(start, end);
dateArray = d3Time.timeFridays(start, end, 2);

countableI = d3Time.timeSaturday;
dateArray = d3Time.timeSaturdays(start, end);
dateArray = d3Time.timeSaturdays(start, end, 2);

countableI = d3Time.timeMonth;
dateArray = d3Time.timeMonths(start, end);
dateArray = d3Time.timeMonths(start, end, 3);

countableI = d3Time.timeYear;
dateArray = d3Time.timeYears(start, end);
dateArray = d3Time.timeYears(start, end, 2);

countableI = d3Time.utcMillisecond;
dateArray = d3Time.utcMilliseconds(start, end);
dateArray = d3Time.utcMilliseconds(start, end, 60000);

countableI = d3Time.utcSecond;
dateArray = d3Time.utcSeconds(start, end);
dateArray = d3Time.utcSeconds(start, end, 120);

countableI = d3Time.utcMinute;
dateArray = d3Time.utcMinutes(start, end);
github DefinitelyTyped / DefinitelyTyped / d3-time / d3-time-tests.ts View on Github external
countableI = d3Time.timeThursday;
dateArray = d3Time.timeThursdays(start, end);
dateArray = d3Time.timeThursdays(start, end, 2);

countableI = d3Time.timeFriday;
dateArray = d3Time.timeFridays(start, end);
dateArray = d3Time.timeFridays(start, end, 2);

countableI = d3Time.timeSaturday;
dateArray = d3Time.timeSaturdays(start, end);
dateArray = d3Time.timeSaturdays(start, end, 2);

countableI = d3Time.timeMonth;
dateArray = d3Time.timeMonths(start, end);
dateArray = d3Time.timeMonths(start, end, 3);

countableI = d3Time.timeYear;
dateArray = d3Time.timeYears(start, end);
dateArray = d3Time.timeYears(start, end, 2);


countableI = d3Time.utcMillisecond;
dateArray = d3Time.utcMilliseconds(start, end);
dateArray = d3Time.utcMilliseconds(start, end, 60000);

countableI = d3Time.utcSecond;
dateArray = d3Time.utcSeconds(start, end);
dateArray = d3Time.utcSeconds(start, end, 120);

countableI = d3Time.utcMinute;
dateArray = d3Time.utcMinutes(start, end);
github DefinitelyTyped / DefinitelyTyped / d3-time / d3-time-tests.ts View on Github external
dateArray = d3Time.timeWednesdays(start, end, 2);

countableI = d3Time.timeThursday;
dateArray = d3Time.timeThursdays(start, end);
dateArray = d3Time.timeThursdays(start, end, 2);

countableI = d3Time.timeFriday;
dateArray = d3Time.timeFridays(start, end);
dateArray = d3Time.timeFridays(start, end, 2);

countableI = d3Time.timeSaturday;
dateArray = d3Time.timeSaturdays(start, end);
dateArray = d3Time.timeSaturdays(start, end, 2);

countableI = d3Time.timeMonth;
dateArray = d3Time.timeMonths(start, end);
dateArray = d3Time.timeMonths(start, end, 3);

countableI = d3Time.timeYear;
dateArray = d3Time.timeYears(start, end);
dateArray = d3Time.timeYears(start, end, 2);


countableI = d3Time.utcMillisecond;
dateArray = d3Time.utcMilliseconds(start, end);
dateArray = d3Time.utcMilliseconds(start, end, 60000);

countableI = d3Time.utcSecond;
dateArray = d3Time.utcSeconds(start, end);
dateArray = d3Time.utcSeconds(start, end, 120);

countableI = d3Time.utcMinute;
github hpcc-systems / Visualization / packages / other / src / CalendarHeatMap.ts View on Github external
        const monthPath = svg.select(".months").selectAll(".month").data(function (d) { return d3TimeMonths(new Date(d, 0, 1), new Date(d + 1, 0, 1)); });
        monthPath.enter().append("path")
github plouc / nivo / packages / calendar / src / compute.js View on Github external
yearRange.forEach((year, i) => {
        const yearStart = new Date(year, 0, 1)
        const yearEnd = new Date(year + 1, 0, 1)

        days = days.concat(
            timeDays(yearStart, yearEnd).map(dayDate => {
                return {
                    date: dayDate,
                    day: dayFormat(dayDate),
                    size: cellSize,
                    ...cellPosition(originX, originY, dayDate, i),
                }
            })
        )

        const yearMonths = timeMonths(yearStart, yearEnd).map(monthDate => ({
            date: monthDate,
            year: monthDate.getFullYear(),
            month: monthDate.getMonth(),
            ...memoMonthPathAndBBox({
                originX,
                originY,
                date: monthDate,
                direction,
                yearIndex: i,
                yearSpacing,
                daySpacing,
                cellSize,
            }),
        }))

        months = months.concat(yearMonths)
github hpcc-systems / Visualization / packages / other / src / CalendarHeatMap.ts View on Github external
.each(function (d) {
                const svgElement = d3Select(this);
                const g = svgElement.append("g");
                g.append("text")
                    .style("text-anchor", "middle")
                    ;
                g.append("g")
                    .attr("class", "days")
                    ;

                const _d3TimeMonths = d3TimeMonths(new Date(d, 0, 1), new Date(d + 1, 0, 1));
                const _months = g.append("g").attr("class", "months");
                _d3TimeMonths.forEach(function (_m) {
                    _months.append("path")
                        .attr("class", "month")
                        .attr("d", calcMonthPath(_m))
                        .style("stroke", context.monthStrokeColor())
                        .style("stroke-width", context.monthStrokeWidth())
                        ;
                });
            })
            .merge(svg)