-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove erroneous shape from vertical on hover line when shape dimensi…
…on is added (#2486) * remove erroneous shape from vertical on hover line when shape dimension is added * add test for spec update * revert min cli version
- Loading branch information
1 parent
ea5621e
commit b24f2db
Showing
3 changed files
with
162 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
extension/src/test/fixtures/plotsDiff/templates/multiSource.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import { TopLevelSpec } from 'vega-lite' | ||
|
||
const data = { | ||
$schema: 'https://vega.github.io/schema/vega-lite/v5.json', | ||
data: '<DVC_METRIC_DATA>', | ||
title: '<DVC_METRIC_TITLE>', | ||
width: 300, | ||
height: 300, | ||
layer: [ | ||
{ | ||
encoding: { | ||
x: { | ||
field: '<DVC_METRIC_X>', | ||
type: 'quantitative', | ||
title: '<DVC_METRIC_X_LABEL>' | ||
}, | ||
y: { | ||
field: '<DVC_METRIC_Y>', | ||
type: 'quantitative', | ||
title: '<DVC_METRIC_Y_LABEL>', | ||
scale: { zero: false } | ||
}, | ||
color: { | ||
field: 'rev' | ||
} | ||
}, | ||
layer: [ | ||
{ mark: 'line' }, | ||
{ | ||
selection: { | ||
label: { | ||
type: 'single', | ||
nearest: true, | ||
on: 'mouseover', | ||
encodings: ['<DVC_METRIC_X>'], | ||
empty: 'none', | ||
clear: 'mouseout' | ||
} | ||
}, | ||
mark: 'point', | ||
encoding: { | ||
opacity: { | ||
condition: { selection: 'label', value: 1 }, | ||
value: 0 | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
transform: [{ filter: { selection: 'label' } }], | ||
layer: [ | ||
{ | ||
mark: { type: 'rule', color: 'gray' }, | ||
encoding: { x: { field: '<DVC_METRIC_X>', type: 'quantitative' } } | ||
}, | ||
{ | ||
encoding: { | ||
text: { type: 'quantitative', field: '<DVC_METRIC_Y>' }, | ||
x: { field: '<DVC_METRIC_X>', type: 'quantitative' }, | ||
y: { field: '<DVC_METRIC_Y>', type: 'quantitative' } | ||
}, | ||
layer: [ | ||
{ | ||
mark: { type: 'text', align: 'left', dx: 5, dy: -5 }, | ||
encoding: { color: { type: 'nominal', field: 'rev' } } | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} as unknown as TopLevelSpec | ||
|
||
export default data |