add year-specific button/control to Graphs Page (enhancement)
Closed this issue · 13 comments
Since January 1, 2022 rolled over, the 2021 graph data disappeared.
I'd like to be able to look back at the temperature values of 2021, as a whole.
I know I can text edit the graphs.conf file and add "time_length = year_specific" and "year_specific = 2021" so that the Graphs - YEAR page will show the full 2021 data, but it would be nicer to press a Graphs page button for 2021 or used a Pull-down menu and select 2021.
I'm not sure how:
- to create a button or a pull-down menu
- have the button assign the value '2021' to a variable in the graphs.conf file
Can one of the developers can add the required code tell how-to add a button and the code to assign a variable, to give the year_specific functionality to a button or a pull-down menu?
First step
Try to debug the skin yourself. If you can't figure it out, please include the debug information (text, screenshots, etc.). See this guide on debugging the skin. https://github.com/poblabs/weewx-belchertown#how-to-use-debug
Looked for location of code that creates Graph page buttons and didn't find.
Describe the bug
A clear and concise description of what the bug is.
This is a feature request, rather than a bug report.
Link to your website (IMPORTANT)
Version of the skin you're using
1.3 beta1
To Reproduce
Steps to reproduce the behavior:
- Click on Graphs link at top of Belchertown skin
- Look at the buttons labeled: ALL HOMEPAGE DAY WEEK MONTH YEAR
- Imagine a year-specific button/control
Expected behavior
A clear and concise description of what you expected to happen.
When a year-specific button or year-specific pull-down control on the Graphs page is used, the Graphs page will display the data for that specific year.
Screenshots
If applicable, add screenshots to help explain your problem.
Device Information (please complete the following information):
- Device: [e.g. desktop, iPhone6]
- OS: [e.g. Windows, Android, iOS]
- Browser [e.g. Chrome, Safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here. Maybe a potential fix?
HELP WANTED
If you have a fix for this, please submit a pull request against the development branch!
Hi @mrneutron42, I will try to have a look
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@mrneutron42 This is how i have my "2021" graphs setup on my site in graphs.conf
hope this helps
[2021]
# Chart Timespan Defaults
title = "2021"
show_button = true
button_text = "2021"
type = spline
time_length = year_specific
year_specific = 2021
tooltip_date_format = "dddd LL"
aggregate_type = max
aggregate_interval = 86400 # 1 day
gapsize = 86400 # 1 day in seconds
[[first_graph]]
....
@ThePeePs I think @mrneutron42 talk to have a dropdown menu than buttons for years graphs.
The idea is to detect with python or JS if there graphs categories named with 4 digits like [2021]
, and then show a menu than multiple buttons in graphs page.
I'm still want that behavior, but have no time to go deep in this mod... :/
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hey bot this is not stale.
I would LOVE to have a generalized capability throughout this skin, to select previous day/week/month/year info going back as far as data exists.
Curious if any weewx skins have such a capability.
I would LOVE to have a generalized capability throughout this skin, to select previous day/week/month/year info going back as far as data exists.
Curious if any weewx skins have such a capability.
this is hard to do because weewx websites by design don't have direct access to the database. so in order to be able to freely select dates would require massive text files to be generated every archive interval (e.g. 5 minutes).
there are some weewx websites that connect to a database, and are a bit more advanced. i think there's a skin called weert that does some realtime graphing. it's made by the creator of weewx but i'm not sure if it's released
this is hard to do because weewx websites by design don't have direct access to the database. so in order to be able to freely select dates would require massive text files to be generated every archive interval (e.g. 5 minutes).
shouldn't it be possible to create historic text files only once instead of each interval? For me personally, the reason I'm running weewx in first place is to compare and record historic data, e.g. January 2018 & 2023. The current graph section of this skin is very well designed (I really like the layout!) but of limited use to me. For low-powered devices, such as your typical Raspberry Pi, real-time graphing is certainly not necessary - the 5 or 10 min interval is absolutely sufficient.
Hi!
+1 to this.
Wouldn't this be easier to give a prev/next button to each level of days/month/year and just change *_specific" accordingly? Just an idea.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.