Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(calendar): enhanced calendar with month granularity support #1173

Closed
wants to merge 23 commits into from

Conversation

diegosps
Copy link
Contributor

This PR implements the #212

To avoid any breaking change and weird names, I created EnhancedCalendar,EnhancedCalendarCanvas, ResponsiveEnhancedCalendar and ResponsiveEnhancedCalendarCanvas which supports granularity, breakpoint and weekDirection. The previous set of Calendar components stayed almost the same.

In this set of components, yearSpacing, yearLegend, yearLegendPosition and yearLegendOffset have been renamed to blockSpacing, blockLegend, blockLegendPosition and blockLegendOffset.

While yearLegend receives year: number, blockLegend receives:

block: {
firstMonth: number
firstYear: number
lastMonth: number
lastYear: number
}

There are some examples of the new functionalities as new stories in the storybook.

I tried my best to put shared code in a single file and specific code in different trees. This way, tree shaking should work and users of the normal Calendar should not see any increase in bundle size.

Please, review thoroughly and check index.d.ts

Cya!!

@plouc plouc added 📆 calendar @nivo/calendar package enhancement labels Oct 29, 2020
@igorbalteiro
Copy link

Hi @plouc , how are you?

Is there any expectation of when this PR will be merged?

@scherler
Copy link
Contributor

image
It does not address the underlying issue to limit the month to display.

@wyze
Copy link
Contributor

wyze commented May 29, 2021

Thanks for this @diegosps but I decided to go with the implementation in #1503.

@wyze wyze closed this May 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📆 calendar @nivo/calendar package enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants