feat: AntV 柱状图/条形图支持刷选

This commit is contained in:
wisonic-s 2023-09-07 20:59:42 +08:00
parent 8127d5cba3
commit 933d78d68b
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, yAxis: yAxis,
slider: slider, slider: slider,
annotations: analyse, annotations: analyse,
brush: {
enabled: true,
isStartEnable: (context) => {
// 按住 shift 键,才能开启交互
if (context.event.gEvent.originalEvent?.shiftKey) {
return true
}
return false
}
},
interactions: [ interactions: [
{ {
type: 'legend-active', cfg: { type: 'legend-active', cfg: {
@ -162,6 +172,16 @@ export function hBaseBarOptionAntV(plot, container, chart, action, isGroup, isSt
yAxis: yAxis, yAxis: yAxis,
slider: slider, slider: slider,
annotations: analyse, annotations: analyse,
brush: {
enabled: true,
isStartEnable: (context) => {
// 按住 shift 键,才能开启交互
if (context.event.gEvent.originalEvent?.shiftKey) {
return true
}
return false
}
},
interactions: [ interactions: [
{ {
type: 'legend-active', cfg: { type: 'legend-active', cfg: {