Skip to content

Commit 48951c3

Browse files
authored
feat(tiny-area): update tiny area default color (#1707)
1 parent 89c89e8 commit 48951c3

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

src/plots/tiny-area/index.ts

+13-1
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,23 @@ export class TinyArea extends Plot<TinyAreaOptions> {
1010
/** 图表类型 */
1111
public type: string = 'tiny-area';
1212

13-
protected getDefaultOptions() {
13+
protected getDefaultOptions(options: TinyAreaOptions) {
1414
return {
15+
appendPadding: 2,
1516
tooltip: {
1617
...DEFAULT_TOOLTIP_OPTIONS,
1718
},
19+
// 默认样式
20+
color: 'l(90) 0:#5B8FF9 1:#ffffff',
21+
areaStyle: {
22+
fillOpacity: 0.6,
23+
},
24+
line: {
25+
size: 1,
26+
style: {
27+
stroke: '#5B8FF9',
28+
},
29+
},
1830
};
1931
}
2032

src/plots/tiny-column/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export class TinyColumn extends Plot<TinyColumnOptions> {
1212

1313
protected getDefaultOptions() {
1414
return {
15+
appendPadding: 2,
1516
tooltip: {
1617
...DEFAULT_TOOLTIP_OPTIONS,
1718
},

src/plots/tiny-line/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export class TinyLine extends Plot<TinyLineOptions> {
1212

1313
protected getDefaultOptions() {
1414
return {
15+
appendPadding: 2,
1516
tooltip: {
1617
...DEFAULT_TOOLTIP_OPTIONS,
1718
},

0 commit comments

Comments
 (0)