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

Extension to calendar for picking dates #16

Open
schwabts opened this issue Dec 28, 2022 · 3 comments · Fixed by #20
Open

Extension to calendar for picking dates #16

schwabts opened this issue Dec 28, 2022 · 3 comments · Fixed by #20

Comments

@schwabts
Copy link

schwabts commented Dec 28, 2022

As commented here to bendichter/plotly_activity_chart.py I need options for

  1. Choosing between horizontal and vertical display,
  2. In addition to month names on one side I'll need week numbers according to the preferred standard as given e.g. by epiweeks,
  3. highlighting holidays pulled from different selected holiday calendars (e.g. bank holidays or national holidays for different countries), cf. holidays on PyPI.

But the most important feature for me would be to be able to select dates as if this was a component like a dropdown.

  • Currently, it's not a priority for me, though.
  • Hoping to come with a little more than a stub asap, anyway.
  • Since I can't dive into this project very deep in a short time I'd just like to ask if it even makes sense trying to extend this at all or if you would recommend a new project?
@brunorosilva
Copy link
Owner

Hey, @schwabts

Thanks for the feedback. I'll prioritize some of these features ASAP, starting with 1 and 3.

As for the dropdown component for filtering dates I'm not so sure it fits in the scope of this project. Have you tried using Dash dropdowns or Streamlit dates filter? Here's an example with my Todoist Analytics dashboard. Code.
image

@schwabts
Copy link
Author

schwabts commented Jan 31, 2023

Well, "as if this was a component like a dropdown" may not have been a good wording. What I was trying to say was that while I define callbacks for dropdowns e.g. by

@callback(
    Output('label', 'children'),
    Input('dropdown', 'value'),
)
def update(dropdown_value):
    return f'You have selected {value}'

I would like to define them for plotly-calplot by something like

@callback(
    Output('label', 'children'),
    Input('calplot', 'value'),
)
def update(date_value):
    date_string = date.fromisoformat(date_value).strftime('%B %d, %Y')
    return f'You have selected the date {date_string}'

Rf. dcc.Dropdown and dcc.DatePickerSingle

I'm also not sure if this project could be the right one to look at given the requirements of my use case. Therefore this issue is kind of a question, too.

The point is I am currently already using a Dash dropdown offering to choose from a long list of single dates. I would be happier with a more compact display showing a long list of weeks each of which would be a row of seven tiles and I simply haven't found any sort of calendar which is more compact.

Last not least, including week numbers could be considered a matter of personal taste but it would be extremely helpful for my use case.

@brunorosilva brunorosilva mentioned this issue Mar 27, 2023
@brunorosilva brunorosilva linked a pull request Mar 27, 2023 that will close this issue
@brunorosilva brunorosilva reopened this Mar 27, 2023
@brunorosilva
Copy link
Owner

solved

  1. Choosing between horizontal and vertical display <- dealt with in release v0.1.14

not solved

  1. In addition to month names on one side I'll need week numbers according to the preferred standard as given e.g. by epiweeks
  2. highlighting holidays pulled from different selected holiday calendars (e.g. bank holidays or national holidays for different countries), cf. holidays on PyPI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants