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

Fix x-axis ticks to reflect hourly and 15-minute intervals #307

Merged
merged 5 commits into from
Mar 15, 2024

Conversation

s-egge
Copy link
Member

@s-egge s-egge commented Mar 5, 2024

Hourly/15-minute Interval Before

image

Both hourly and 15-minute intervals would only display the day on the x-axis

Hourly/15-minute Interval After

image
image

The new hourly interval is displayed in the bottom picture.

The 15-minute interval displayed in the top picture now shows the day of the week and the time, which is every 30-minutes here due to having ~2 1/2 days of data displayed. I added formatting to the 'minute' option so that the day is visible, otherwise the data is hard to read as displayed here, without the update:
image

Monthly Interval

One side effect of this change is that the monthly interval labels are now Month Year instead of Month / Day:

Before:
image

After:
image

This can easily be changed by adding a formatting rule for the month interval if the previous format is preferred.

@s-egge s-egge marked this pull request as draft March 5, 2024 16:39
@s-egge
Copy link
Member Author

s-egge commented Mar 5, 2024

The x-axis labels don't update when comparing multiple time periods for one building:
image

@s-egge
Copy link
Member Author

s-egge commented Mar 7, 2024

The x-axis ticks for comparing multiple time periods have a custom function so that the different dates will stack, see here:

I added formatting for the 15-minute, hourly, and monthly intervals. I also increased the minimum padding for multiple time comparisons because the 15-minute intervals were difficult to distinguish.

image
image
image

@solderq35
Copy link
Contributor

image

I noticed that the map popup graph y axis is a bit squished due to the x axis taking up more space, maybe need to readjust the height for that component (src\components\map\sideView.vue)

@s-egge
Copy link
Member Author

s-egge commented Mar 8, 2024

I updated the comparison charts to have the day of the week formatting, as well as changed the height of the sideView chart by 50 pixels. According to the Chart.js docs, this line:


Is supposed prevent axis tick overlap, but I've found a few complaints of it not working as intended. There was a patch in 2.9 that seemed to fix it for some people, but I wasn't able to find any other way of fixing it aside from limiting the max number of ticks, but then that would alter the larger charts.

Here is a comparison of the charts as they are currently on the dashboard (on the left) and the charts after adding 50 pixels to the height (on the right):
image
image

@solderq35
Copy link
Contributor

Tweaked heights a bit as the map popups were going under the screen for me on 1980 x 1080p screen dimensions on Chrome
image

@s-egge s-egge marked this pull request as ready for review March 12, 2024 16:26
@s-egge s-egge merged commit 86c7cac into master Mar 15, 2024
3 checks passed
@s-egge s-egge deleted the fix-interval-axis-label branch July 1, 2024 18:56
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 this pull request may close these issues.

2 participants