Merge pull request #6077 from dataease/pr@dev@feat_antv_bar_brush

feat: AntV 柱状图/条形图支持刷选
This commit is contained in:
wisonic-s 2023-09-07 21:01:42 +08:00 committed by GitHub
commit 4bcbcc2fec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 3416 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -45,6 +45,16 @@ export function baseBarOptionAntV(plot, container, chart, action, isGroup, isSta
yAxis: yAxis,
slider: slider,
annotations: analyse,
brush: {
enabled: true,
isStartEnable: (context) => {
// 按住 shift 键,才能开启交互
if (context.event.gEvent.originalEvent?.shiftKey) {
return true
}
return false
}
},
interactions: [
{
type: 'legend-active', cfg: {
@ -162,6 +172,16 @@ export function hBaseBarOptionAntV(plot, container, chart, action, isGroup, isSt
yAxis: yAxis,
slider: slider,
annotations: analyse,
brush: {
enabled: true,
isStartEnable: (context) => {
// 按住 shift 键,才能开启交互
if (context.event.gEvent.originalEvent?.shiftKey) {
return true
}
return false
}
},
interactions: [
{
type: 'legend-active', cfg: {