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
Visual indication of incomplete periods on charts #18086
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That already looks nice 👍
Left a comment as the date check isn't proper. Besides that I'm not sure if that change should also be reflected in the scheduled reports. For those the graphs are rendered using the ImageGraph plugin. That one currently won't use a dotted line for incomplete periods. Not sure if that should be the case for consistency reasons. ping @tsteur @mattab
|
Sounds good to have a separate issue for it, as the most pain is felt in the UI 👍 |
Looks great. Feedback:
|
…for incomplete periods
…e range within an evolution last-n range
@bx80 looks like there might be changes from another PR in there from exclude parameters? |
@tsteur Because the periods service had been converted to vue while I was working on this issue I merged 4.x-dev into this branch to use those changes. The 4.x-dev branch now includes the exclude parameters change which I think is why those changes are appearing in this branch. I should perhaps have used rebase instead of merge? |
@bx80 merge should normally be fine. I don't see any changes from your other PR here, has it resolved itself meantime or did I miss something? It does have some conflicts now though. |
Looks all good to me and works @bx80 . Could we create a UI test though showing the dotted line that this works? |
It might be tricky to do a UI test as the dotted line will only show if the current period contains today, the check for whether it is today or not is being done in the periods service. I've tried overriding the Date.now() function prior to loading the page in a UI test, which is how the periods service tests work. but those tests directly call the periods calls, and that approach doesn't seem to work here, as I'm guessing a new javascript vm is being spawned by the test system when loading the page. Is there a usual way to fake today's date in javascript for a UI test? |
@justinvelluppillai The outstanding conflicts are all from the vue.js typescript build output, I suppose I'll need to merge 4.x-dev into this branch again to pickup whatever has changed CoreHome typescript in 4.x-dev and then do another ./console build:vue, then commit an updated set of UMDs, then resolve this branch conflict by preferring them over the current 4.x-dev versions (assuming 4.x-dev hasn't changed again in the meantime) Seems like a 'build vue' github action like we have for 'build js' could save a lot of time going forward. |
@bx80 I was hoping that it might work similarly to https://github.com/matomo-org/matomo/blob/4.5.0/tests/UI/specs/OnlyRawDataNotification_spec.js#L11-L13 I'm thinking if we could use Be great to check if that could work. It might be even easiest to create a new |
@tsteur That approach worked well, thank you. I've committed a new UI test and dedicated fixture to create a few visits in the current and previous year and compare the visitors overview chart. |
Description:
Fixes #10291
For charts where the last point on the horizontal axis has a date that is either today or in the future, then that segment of the line will be plotted in a dashed style to indicate that data for that period will be incomplete.
Review