Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
quiver-frontend-local
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
subugoe
OCR-D
quiver-frontend-local
Commits
d09b6dd3
Commit
d09b6dd3
authored
1 year ago
by
Paul Pestov
Browse files
Options
Downloads
Patches
Plain Diff
feat: display large average chart on click
parent
c07569c8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/timeline/MetricAverageChart.vue
+29
-1
29 additions, 1 deletion
src/components/timeline/MetricAverageChart.vue
src/components/timeline/MetricChart.vue
+9
-2
9 additions, 2 deletions
src/components/timeline/MetricChart.vue
with
38 additions
and
3 deletions
src/components/timeline/MetricAverageChart.vue
+
29
−
1
View file @
d09b6dd3
...
...
@@ -6,6 +6,7 @@ import type {EvaluationResultsDocumentWide, EvaluationRun, TimelineChartDataPoin
import
{
getMaxValueOfMetric
}
from
'
@/helpers/metrics
'
import
{
useI18n
}
from
"
vue-i18n
"
;
import
{
metricChartTooltipContent
}
from
"
@/helpers/metric-chart-tooltip-content
"
;
import
OverlayPanel
from
"
primevue/overlaypanel
"
;
const
{
t
}
=
useI18n
()
...
...
@@ -20,6 +21,7 @@ const data = ref<TimelineChartDataPoint[]>([])
const
maxY
=
ref
(
2
)
const
workflows
=
ref
<
Workflow
[]
|
null
>
(
null
)
const
runs
=
ref
<
EvaluationRun
[]
>
([])
const
op
=
ref
<
OverlayPanel
|
null
>
(
null
)
onMounted
(
async
()
=>
{
const
{
gtId
,
metric
}
=
props
...
...
@@ -66,7 +68,33 @@ function tooltipContent(d: TimelineChartDataPoint) {
</
script
>
<
template
>
<BaseTimelineChart
:data=
"data"
:max-y=
"maxY"
:start-date=
"startDate"
:end-date=
"endDate"
:tooltip-content=
"tooltipContent"
/>
<div
@
click=
"op?.toggle($event)"
class=
"cursor-pointer flex justify-end"
>
<BaseTimelineChart
:data=
"data"
:max-y=
"maxY"
:start-date=
"startDate"
:end-date=
"endDate"
:tooltip-content=
"tooltipContent"
:width=
"400"
/>
</div>
<OverlayPanel
ref=
"op"
:pt=
"
{
root: {
class: 'z-[9999] bg-white border rounded-md shadow-md'
}
}"
>
<BaseTimelineChart
:data=
"data"
:max-y=
"maxY"
:start-date=
"startDate"
:end-date=
"endDate"
:tooltip-content=
"tooltipContent"
:height=
"400"
:width=
"660"
/>
</OverlayPanel>
</
template
>
<
style
scoped
lang=
"scss"
>
...
...
This diff is collapsed.
Click to expand it.
src/components/timeline/MetricChart.vue
+
9
−
2
View file @
d09b6dd3
...
...
@@ -46,8 +46,15 @@ function tooltipContent(d: TimelineChartDataPoint) {
</
script
>
<
template
>
<div
@
click=
"op?.toggle($event)"
class=
"cursor-pointer"
>
<BaseTimelineChart
:data=
"data"
:max-y=
"maxY"
:start-date=
"startDate"
:end-date=
"endDate"
:tooltip-content=
"tooltipContent"
/>
<div
@
click=
"op?.toggle($event)"
class=
"cursor-pointer flex justify-end"
>
<BaseTimelineChart
:data=
"data"
:max-y=
"maxY"
:start-date=
"startDate"
:end-date=
"endDate"
:tooltip-content=
"tooltipContent"
:width=
"400"
/>
</div>
<OverlayPanel
ref=
"op"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment