Skip to content

Commit

Permalink
feat: add radar theme & ajust fontweight
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoluoHe committed May 31, 2024
1 parent 1fe7d81 commit 3528af7
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const axis: Pick<
style: {
fontSize: 12,
fill: { type: 'palette', key: 'blackColors45' },
fontWeight: 'normal',
fontWeight: 400,
fillOpacity: 1
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ export const crosshair: ICrosshairTheme = {
visible: true,
style: {
fill: '#CCD7EB',
fillOpacity: 0.4
fillOpacity: 0.4,
lineDash: []
}
},
label: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ export const legend: Partial<IComponentTheme> = {
fill: '#85878A',
fontSize: 12,
lineHeight: 12,
opacity: 1
opacity: 1,
fontWeight: 400
},
state: {
unSelected: {
Expand Down
26 changes: 6 additions & 20 deletions packages/vchart-theme/src/chart-hub/common/series/area.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ export const area: Pick<
area: {
point: {
style: {
visible: false
visible: false,
size: 12,
lineWidth: 2,
shadowColor: 'rgba(0, 0, 0, 0.1)',
shadowBlur: 3,
stroke: { type: 'palette', key: 'whiteColors100' }
}
},
line: {
Expand All @@ -27,24 +32,5 @@ export const area: Pick<
}
}
}
},
area_horizontal: {
seriesMark: 'line',
area: {
style: {
fillOpacity: 0.25,
lineWidth: 2
},
state: {
selected: {
fillOpacity: 0.5
}
}
},
point: {
style: {
visible: false
}
}
}
};
12 changes: 7 additions & 5 deletions packages/vchart-theme/src/chart-hub/common/series/line.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ export const line: ISeriesTheme['line'] = {
},
point: {
style: {
visible: false
visible: false,
size: 12,
lineWidth: 2,
shadowColor: 'rgba(0, 0, 0, 0.1)',
shadowBlur: 3,
stroke: { type: 'palette', key: 'whiteColors100' }
}
},
label: {
position: 'top',
offset: 4,
style: {
fill: { type: 'palette', key: 'secondaryFontColor' }
}
offset: 4
}
};
26 changes: 26 additions & 0 deletions packages/vchart-theme/src/chart-hub/common/series/radar.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import type { ISeriesTheme } from '@visactor/vchart';

export const radar: ISeriesTheme['radar'] = {
line: {
style: {
lineWidth: 1
}
},
point: {
style: {
visible: false,
size: 12,
lineWidth: 2,
shadowColor: 'rgba(0, 0, 0, 0.1)',
shadowBlur: 3,
stroke: { type: 'palette', key: 'whiteColors100' }
}
},
area: {
visible: true
},
label: {
position: 'top',
offset: 4
}
};
4 changes: 3 additions & 1 deletion packages/vchart-theme/src/chart-hub/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { markArea } from './common/component/mark-area';
import { markPoint } from './common/component/mark-point';
import { dataZoom } from './common/component/data-zoom';
import { scrollBar } from './common/component/scroll-bar';
import { radar } from './common/series/radar';

export const chartHubLightTheme: ITheme = {
name: 'chartHubLight',
Expand Down Expand Up @@ -52,7 +53,8 @@ export const chartHubLightTheme: ITheme = {
pie,
funnel,
treemap,
heatmap
heatmap,
radar
},
markByName
};

0 comments on commit 3528af7

Please sign in to comment.