Average Position Metrics Display
Bug Description
The Average Position Y value in the graph should be inverted, as the 1st position is considered the best position you could theoretically have.
Currently, when comparing Total clicks and or Total Impressions with Average Position, the graphs appear as if your Total Clicks and Total Impressions go down when your Average Position appears to go up. Upon analyzing the data below, you would expect the lines to have roughly followed each other.
Steps to reproduce
- Go to 'Site Kit > Search Console page'
- Click on 'Average Position, so that you are comparing Average Position with Total Clicks and or Total Impressions'
- See error
Screenshots

Additional Context
- PHP Version: 7.2
- OS: [e.g. iOS] macOS Catalina
- Browser [e.g. chrome, safari] Chrome
- Plugin Version [e.g. 22] 1.0.4
- Device: [e.g. iPhone6] MacBook Air
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
When displaying the chronological graph of Search Console avg position values for the site, the smallest value should be at the top of the Y axis, similar to how it's displayed in Search Console:

Implementation Brief
- In addition to the
titleprop for the "Average Position" stat, set thedirectionprop to be-1, eg: https://github.com/google/site-kit-wp/blob/bbe420f9742495c7b834615fd5f36f09c73ffa14/assets/js/modules/search-console/dashboard/dashboard-widget.js#L136-L145 - I noticed the charts' titles are not translated, so add translations to the chart titles (eg: https://github.com/google/site-kit-wp/blob/bbe420f9742495c7b834615fd5f36f09c73ffa14/assets/js/modules/search-console/dashboard/dashboard-widget.js#L128-L133)
Changelog entry
- Fix Search Console average position graph to show the smallest value on top of the Y axis.
This one took a fair amount of time to figure out in terms of which option to set and where; to stop the IB from being too generic I ended up implementing the solution, so the estimate on this one is quite low because most of the work for this IB is ready in #988.
IB ✅
Verified, y axis is inverted. Clicked through other filters, confirmed functionality.

Passed QA ✅
LGTM