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.
ImageGraph we could have a separate issue for it maybe as most important be the UI (re 80/20 rule). cc @mattab
Sounds good to have a separate issue for it, as the most pain is felt in the UI :+1:
Looks great. Feedback:
(incomplete period.)under the date in the tooltip? or some other better wording?
@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?
@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
idSite=1&period=year&date=today as URL and in the fixture track a wee bit of data for this year, and some data for the past year, then this might work? We would probably just need to update the image once a year but otherwise the screenshot might not change.
Be great to check if that could work. It might be even easiest to create a new
spec file just for this and a dedicated fixture where we track bit of data for this and for the previous year. Since it's something that could easily regress it be very valuable to have a screenshot test for it.
@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.