fix(图表): 修复双轴图横轴和图例标签显示模糊

This commit is contained in:
wisonic-s
2025-09-17 17:51:25 +08:00
committed by wisonic-s
parent ea20beb1ff
commit d4219412c4
5 changed files with 15 additions and 3 deletions

View File

@@ -388,7 +388,9 @@ export class GroupLineMix extends G2ChartView {
itemMarker: legend.icon,
itemMarkerSize: legend.size,
itemLabelFontSize: legend.fontSize,
itemLabelFill: legend.color
itemLabelFill: legend.color,
itemLabelOpacity: 1,
itemLabelFillOpacity: 1
}
unionRelations.forEach(([key, value]) => {
legendMark.scale.color.domain.push(key)
@@ -663,6 +665,7 @@ export class GroupLineMix extends G2ChartView {
lineLineWidth: xAxis.axisLine.lineStyle.width,
lineLineDash,
label: xAxis.axisLabel.show,
labelOpacity: 1,
labelFill: xAxis.axisLabel.color,
labelFillOpacity: 1,
labelFontSize: xAxis.axisLabel.fontSize,

View File

@@ -378,7 +378,9 @@ export class GroupLineMix extends G2ChartView {
itemMarker: legend.icon,
itemMarkerSize: legend.size,
itemLabelFontSize: legend.fontSize,
itemLabelFill: legend.color
itemLabelFill: legend.color,
itemLabelOpacity: 1,
itemLabelFillOpacity: 1
}
unionRelations.forEach(([key, value]) => {
legendMark.scale.color.domain.push(key)
@@ -653,6 +655,7 @@ export class GroupLineMix extends G2ChartView {
lineLineWidth: xAxis.axisLine.lineStyle.width,
lineLineDash,
label: xAxis.axisLabel.show,
labelOpacity: 1,
labelFill: xAxis.axisLabel.color,
labelFillOpacity: 1,
labelFontSize: xAxis.axisLabel.fontSize,

View File

@@ -377,7 +377,9 @@ export class StackLineMix extends G2ChartView {
itemMarker: legend.icon,
itemMarkerSize: legend.size,
itemLabelFontSize: legend.fontSize,
itemLabelFill: legend.color
itemLabelFill: legend.color,
itemLabelOpacity: 1,
itemLabelFillOpacity: 1
}
unionRelations.forEach(([key, value]) => {
legendMark.scale.color.domain.push(key)
@@ -652,6 +654,7 @@ export class StackLineMix extends G2ChartView {
lineLineWidth: xAxis.axisLine.lineStyle.width,
lineLineDash,
label: xAxis.axisLabel.show,
labelOpacity: 1,
labelFill: xAxis.axisLabel.color,
labelFillOpacity: 1,
labelFontSize: xAxis.axisLabel.fontSize,

View File

@@ -492,6 +492,7 @@ export class ColumnLineMix extends G2ChartView {
lineLineWidth: xAxis.axisLine.lineStyle.width,
lineLineDash,
label: xAxis.axisLabel.show,
labelOpacity: 1,
labelFill: xAxis.axisLabel.color,
labelFillOpacity: 1,
labelFontSize: xAxis.axisLabel.fontSize,

View File

@@ -75,6 +75,8 @@ export abstract class G2ChartView<
itemMarkerSize: legendSize,
itemLabelFontSize: legendFontSize,
itemLabelFill: legendColor,
itemLabelFillOpacity: 1,
itemLabelOpacity: 1,
navPageNumFontSize: legendSize,
navPageNumFill: legendColor,
navButtonSize: legendSize,