diff --git a/CHANGELOG.md b/CHANGELOG.md
index 63ac137d0..205cb1ff5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -55,8 +55,9 @@ All notable changes to this project will be documented in this file.
- Ability to invite users to sites with different roles plausible/analytics#1122
- Option to configure a custom name for the script file
- Add Conversion Rate to Top Sources, Top Pages Devices, Countries when filtered by a goal plausible/analytics#1299
+- Choice of metric for main-graph both in UI and API (visitors, pageviews, bounce_rate, visit_duration) plausible/analytics#1364
- Add list view for countries report in dashboard plausible/analytics#1381
-- Add ability to view more than 100 custom goal properties plausible/analytics#1353
+- Add ability to view more than 100 custom goal properties plausible/analytics#1382
### Fixed
- Fix weekly report time range plausible/analytics#951
diff --git a/assets/css/app.css b/assets/css/app.css
index c492847be..bb8e89a68 100644
--- a/assets/css/app.css
+++ b/assets/css/app.css
@@ -32,6 +32,7 @@
html {
@apply text-gray-800;
+ overflow-x: hidden;
}
body {
@@ -70,9 +71,8 @@ blockquote {
.main-graph {
position: relative;
height: 0;
-
- /* Formula is: (top row height + (graph height / graph width * 100%)) */
- padding-top: calc(168px + (451 / 1088 * 100%));
+ /* Formula is: (top row height + (graph height / graph width * 100%) - adjustment for stat selectors) */
+ padding-top: calc(168px + (451 / 1088 * 100%) - 20px);
}
@screen sm {
@@ -89,7 +89,31 @@ blockquote {
@screen lg {
.main-graph {
- padding-top: calc(28px + (451 / 1088 * 100%));
+ padding-top: calc(28px + (451 / 1088 * 100%) - 10px);
+ }
+}
+
+.top-stats-only {
+ position: relative;
+ height: 0;
+ padding-top: calc(158px + 15px);
+}
+
+@screen sm {
+ .top-stats-only {
+ padding-top: calc(155px + 15px);
+ }
+}
+
+@screen md {
+ .top-stats-only {
+ padding-top: calc(168px + 15px);
+ }
+}
+
+@screen lg {
+ .top-stats-only {
+ padding-top: calc(75px + 15px);
}
}
@@ -313,6 +337,17 @@ iframe[hidden] {
}
}
+#chartjs-tooltip {
+ background-color: rgba(25, 30, 56);
+ position: absolute;
+ font-size: 14px;
+ font-style: normal;
+ padding: 10px 12px;
+ pointer-events: none;
+ border-radius: 5px;
+ z-index: 100;
+}
+
.active-prop-heading {
/* Properties related to text-decoration are all here in one place. TailwindCSS does support underline but that's about it. */
text-decoration-line: underline;
diff --git a/assets/js/dashboard/comparison-consumer-hoc.js b/assets/js/dashboard/comparison-consumer-hoc.js
new file mode 100644
index 000000000..c78fcd754
--- /dev/null
+++ b/assets/js/dashboard/comparison-consumer-hoc.js
@@ -0,0 +1,16 @@
+import React from 'react';
+import { ComparisonContext } from './comparison-context'
+
+export const withComparisonConsumer = (WrappedComponent) => {
+ return class extends React.Component {
+ render() {
+ return (
+