Skip to content

Commit

Permalink
fix: move chart title inside BaseTimelineDetailedChart componet
Browse files Browse the repository at this point in the history
  • Loading branch information
noornoorie committed May 14, 2024
1 parent f509faf commit a235022
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ interface Props {
tooltipContent: (d: TimelineChartDataPoint) => string,
yAxisTitle?: string,
workflow?: string,
label?: string,
higherIsPositive?: boolean
}
Expand Down Expand Up @@ -232,6 +233,7 @@ watch([() => props.data, () => props.startDate, () => props.endDate, () => props
</script>

<template>
<h3> {{ label }}</h3>
<div class="svg-container" ref="container"></div>
</template>

Expand Down
2 changes: 1 addition & 1 deletion src/components/workflows/timeline/MetricAverageChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ function tooltipContent(d: TimelineChartDataPoint) {
}
}"
>
<h3 class="font-semibold" style="width: 660px; margin-left: 40px">{{ gtName }}</h3>
<BaseTimelineDetailedChart
:data="data"
:max-y="maxY"
:y-axis-title="`${t(metric)} (${t(getUnitOfMetric(metric))})`"
:workflow="workflowName"
:label="gtName"
:start-date="startDate"
:end-date="endDate"
:tooltip-content="tooltipContent"
Expand Down
2 changes: 1 addition & 1 deletion src/components/workflows/timeline/MetricChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ function tooltipContent(d: TimelineChartDataPoint) {
}
}"
>
<h3 class="font-semibold" style="width: 600px; margin-left: 40px">{{ gtName }}</h3>
<BaseTimelineDetailedChart
:data="data"
:max-y="maxY"
:y-axis-title="`${t(metric)} (${t(getUnitOfMetric(metric))})`"
:workflow="workflowName"
:label="gtName"
:start-date="startDate"
:end-date="endDate"
:tooltip-content="tooltipContent"
Expand Down

0 comments on commit a235022

Please sign in to comment.