-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
TimeSeriesChart: Add time label format option for time series chart #9049
TimeSeriesChart: Add time label format option for time series chart #9049
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #9049 +/- ##
==========================================
+ Coverage 89.82% 90.62% +0.79%
==========================================
Files 412 398 -14
Lines 11878 12372 +494
Branches 2364 2403 +39
==========================================
+ Hits 10670 11212 +542
+ Misses 681 621 -60
- Partials 527 539 +12 ☔ View full report in Codecov by Sentry. |
Hi, Thanks for the PR. Can you add a very simple bUnit test with a custom |
Test has been added now |
Thanks |
My bad I had intended for it to have a date/time format but I must have missed that with tunnel vision! |
@jorisBarkema I also thought about making the labels be able to have an angle to make it work better in higher density data. I.e. 30-45 degree angle labels. Otherwise did you find it a good chart? |
Yeah it was very easy to work with and did exactly what I wanted to do. So far at least because some other things have come up after I started on this. |
The time label format was hardcoded at HH:mm, but I wanted a chart over several days. This format does not make sense in that case so I wanted a way to show the date in the time label.
Description
Add a parameter similar to TimeLabelSpacing to be able to set the TimeLabelFormat. Default to the value that was previously hardcoded to maintain backwards compatability.
How Has This Been Tested?
The TimeSeries component as a whole has no tests yet (#8973 see last comments) so can't add a test for just this feature without testing the whole thing and I sadly don't have time for that.
Type of Changes
Example of a time series with datelabel format "dd/MM HH:mm"
![example_timeseries_with_dates](https://private-user-images.githubusercontent.com/20751395/333520168-cc229dab-1ce1-496d-9366-0b5fcee0db45.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAzNzYyNzQsIm5iZiI6MTcyMDM3NTk3NCwicGF0aCI6Ii8yMDc1MTM5NS8zMzM1MjAxNjgtY2MyMjlkYWItMWNlMS00OTZkLTkzNjYtMGI1ZmNlZTBkYjQ1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA3VDE4MTI1NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ4ZTQ1NmY5Nzc0ZTVjOWMxYmY3MTQ3MDI2MzY5MDBmZWQxNjQ5NTY5OGUyYTRlMzhmNzc3NzEwYTU4MGIyMjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.l_OTsTG0txN4SPMgJrXsuSMtm-DcG1pM7EenUOk9MGU)
Checklist
dev
).