Merge pull request #13740 from ulleo/dev-v2

feat(图表): 图表支持更换字体
This commit is contained in:
fit2cloud-chenyw
2024-12-02 21:00:53 +08:00
committed by GitHub
4 changed files with 10 additions and 4 deletions

View File

@@ -446,7 +446,8 @@ export class BidirectionalHorizontalBar extends G2PlotChartView<
layout,
style: {
fill: l.color,
fontSize: l.fontSize
fontSize: l.fontSize,
fontFamily: chart.fontFamily
},
formatter: param => {
let yaxis = yAxis[0]

View File

@@ -337,7 +337,10 @@ export class StockLine extends G2PlotChartView<MixOptions, Mix> {
data,
slider: {
start: 0.5,
end: 1
end: 1,
textStyle: {
fontFamily: chart.fontFamily
}
},
plots: [
{

View File

@@ -246,7 +246,8 @@ export class SankeyBar extends G2PlotChartView<SankeyOptions, Sankey> {
style: {
fill: labelAttr.color,
fontSize: labelAttr.fontSize,
textAlign: isLast ? 'end' : 'start'
textAlign: isLast ? 'end' : 'start',
fontFamily: chart.fontFamily
},
offsetX: isLast ? -8 : 8
}

View File

@@ -687,7 +687,8 @@ export function getSlider(chart: Chart) {
}
if (senior.functionCfg.sliderTextColor) {
cfg.textStyle = {
fill: senior.functionCfg.sliderTextColor
fill: senior.functionCfg.sliderTextColor,
fontFamily: chart.fontFamily
}
cfg.handlerStyle = {
fill: senior.functionCfg.sliderTextColor,