Skip to content

Commit

Permalink
feat(default-options): update default option for plots (#1907)
Browse files Browse the repository at this point in the history
  • Loading branch information
hustcc authored Nov 12, 2020
1 parent 18bab57 commit 2b03b92
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/plots/area/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export class Area extends Plot<AreaOptions> {
protected getDefaultOptions() {
return deepAssign({}, super.getDefaultOptions(), {
tooltip: {
shared: true,
showMarkers: true,
showCrosshairs: true,
crosshairs: {
Expand Down
5 changes: 5 additions & 0 deletions src/plots/histogram/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ export class Histogram extends Plot<HistogramOptions> {
columnStyle: {
stroke: '#FFFFFF',
},
tooltip: {
shared: true,
showMarkers: false,
},
interactions: [{ type: 'active-region' }],
});
}

Expand Down
1 change: 1 addition & 0 deletions src/plots/line/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export class Line extends Plot<LineOptions> {
protected getDefaultOptions() {
return deepAssign({}, super.getDefaultOptions(), {
tooltip: {
shared: true,
showMarkers: true,
showCrosshairs: true,
crosshairs: {
Expand Down
5 changes: 5 additions & 0 deletions src/plots/rose/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ export class Rose extends Plot<RoseOptions> {
type: 'limit-in-shape',
},
},
tooltip: {
shared: true,
showMarkers: false,
},
interactions: [{ type: 'active-region' }],
});
}

Expand Down

0 comments on commit 2b03b92

Please sign in to comment.