diff --git a/web-common/src/components/data-graphic/marks/DelayedLabel.svelte b/web-common/src/components/data-graphic/marks/DelayedLabel.svelte
index f37e5e1e8dc..b9f78b01a6d 100644
--- a/web-common/src/components/data-graphic/marks/DelayedLabel.svelte
+++ b/web-common/src/components/data-graphic/marks/DelayedLabel.svelte
@@ -36,4 +36,6 @@
});
-
+
diff --git a/web-common/src/components/data-graphic/marks/MultiMetricMouseoverLabel.svelte b/web-common/src/components/data-graphic/marks/MultiMetricMouseoverLabel.svelte
index 1bd661b0aaf..842998e26d6 100644
--- a/web-common/src/components/data-graphic/marks/MultiMetricMouseoverLabel.svelte
+++ b/web-common/src/components/data-graphic/marks/MultiMetricMouseoverLabel.svelte
@@ -15,6 +15,7 @@ It is probably not the most up to date code; but it works very well in practice.
interface Point {
x: number;
y: number;
+ value: string;
label: string;
key: string;
valueColorClass?: string;
@@ -57,7 +58,8 @@ It is probably not the most up to date code; but it works very well in practice.
let containerWidths = [];
// let labelWidth = 0;
- $: fanOutLabels = !isDimension || false;
+ let fanOutLabels = true;
+
// update locations.
$: nonOverlappingLocations = preventVerticalOverlap(
point.map((p) => ({
@@ -135,6 +137,7 @@ It is probably not the most up to date code; but it works very well in practice.
}
let labelWidth = 0;
+ /** the full text width */
let transitionalTimeoutForCalculatingLabelWidth;
$: if (container && locations && $xScale && $yScale) {
@@ -206,12 +209,15 @@ It is probably not the most up to date code; but it works very well in practice.
{visibility}
>
{#if !location?.yOverride}
- {formatValue(location.y)}
+ {location.value
+ ? location.value
+ : formatValue(location.y)}
{/if}
{#if !location?.yOverride}
- {formatValue(location.y)}
+ {location.value
+ ? location.value
+ : formatValue(location.y)}
{/if}
{/if}
@@ -293,5 +302,12 @@ It is probably not the most up to date code; but it works very well in practice.
paint-order: stroke;
stroke: white;
stroke-width: 3px;
+ white-space: pre-wrap;
+ /* Make all characters and numbers of equal width for easy scanibility */
+ font-feature-settings: "case" 0, "cpsp" 0, "dlig" 0, "frac" 0, "dnom" 0,
+ "numr" 0, "salt" 0, "subs" 0, "sups" 0, "tnum", "zero" 0, "ss01", "ss02" 0,
+ "ss03" 0, "ss04" 0, "cv01" 0, "cv02" 0, "cv03" 0, "cv04" 0, "cv05" 0,
+ "cv06" 0, "cv07" 0, "cv08" 0, "cv09" 0, "cv10" 0, "cv11" 0, "calt", "ccmp",
+ "kern";
}
diff --git a/web-common/src/features/dashboards/state-managers/selectors/measures.ts b/web-common/src/features/dashboards/state-managers/selectors/measures.ts
index 864cc76b166..37d158e0704 100644
--- a/web-common/src/features/dashboards/state-managers/selectors/measures.ts
+++ b/web-common/src/features/dashboards/state-managers/selectors/measures.ts
@@ -18,9 +18,24 @@ export const visibleMeasures = ({
return measures === undefined ? [] : measures;
};
+export const isMeasureValidPercentOfTotal = ({
+ metricsSpecQueryResult,
+}: DashboardDataSources): ((measureName: string) => boolean) => {
+ return (measureName: string) => {
+ const measures = metricsSpecQueryResult.data?.measures;
+ const selectedMeasure = measures?.find((m) => m.name === measureName);
+ return selectedMeasure?.validPercentOfTotal ?? false;
+ };
+};
+
export const measureSelectors = {
/**
* Gets all visible measures in the dashboard.
*/
visibleMeasures,
+
+ /**
+ * Checks if the provided measure is a valid percent of total
+ */
+ isMeasureValidPercentOfTotal,
};
diff --git a/web-common/src/features/dashboards/time-series/DimensionValueMouseover.svelte b/web-common/src/features/dashboards/time-series/DimensionValueMouseover.svelte
index 52f277bcb01..13eccdbb61f 100644
--- a/web-common/src/features/dashboards/time-series/DimensionValueMouseover.svelte
+++ b/web-common/src/features/dashboards/time-series/DimensionValueMouseover.svelte
@@ -1,16 +1,32 @@