Commit cd98a2b6 authored by Clement Ho's avatar Clement Ho

Merge branch 'mw-pa-scatterplot-custom-tooltip' into 'master'

Productivity Analytics: Align custom tooltip styling for scatterplot

See merge request gitlab-org/gitlab!20462
parents fffaf253 ca10af38
......@@ -69,8 +69,8 @@ export default {
methods: {
renderTooltip({ data }) {
const [, metric, dateTime] = data;
this.tooltipTitle = metric;
this.tooltipContent = dateFormat(dateTime, dateFormats.defaultDateTime);
this.tooltipTitle = dateFormat(dateTime, dateFormats.defaultDateTime);
this.tooltipContent = metric;
},
},
};
......@@ -84,7 +84,10 @@ export default {
:x-axis-title="xAxisTitle"
:format-tooltip-text="renderTooltip"
>
<div slot="tooltipTitle">{{ tooltipTitle }}</div>
<div slot="tooltipContent">{{ tooltipContent }}</div>
<div slot="tooltipTitle">{{ tooltipTitle }} ({{ xAxisTitle }})</div>
<div slot="tooltipContent" class="d-flex">
<div class="flex-grow-1">{{ yAxisTitle }}</div>
<div class="font-weight-bold">{{ tooltipContent }}</div>
</div>
</gl-discrete-scatter-chart>
</template>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment