mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 13:32:18 +08:00
refactor(图表): 优化组合图中折线图标签显示效果
This commit is contained in:
@@ -208,6 +208,8 @@ export class ColumnLineMix extends G2PlotChartView<DualAxesOptions, DualAxes> {
|
||||
pre[next.id] = next
|
||||
return pre
|
||||
}, {})
|
||||
const textBaseline =
|
||||
this.getLeftType() === 'line' ? 'bottom' : axisType === 'yAxis' ? 'top' : 'bottom'
|
||||
tempLabel.style.fill = DEFAULT_LABEL.color
|
||||
const label = {
|
||||
fields: [],
|
||||
@@ -232,7 +234,7 @@ export class ColumnLineMix extends G2PlotChartView<DualAxesOptions, DualAxes> {
|
||||
y: 0,
|
||||
text: value,
|
||||
textAlign: 'start',
|
||||
textBaseline: 'top',
|
||||
textBaseline,
|
||||
fontSize: labelCfg.fontSize,
|
||||
fontFamily: chart.fontFamily,
|
||||
fill: labelCfg.color
|
||||
@@ -650,7 +652,7 @@ export class ColumnLineMix extends G2PlotChartView<DualAxesOptions, DualAxes> {
|
||||
this.configYAxis,
|
||||
this.configAnalyse,
|
||||
this.configEmptyDataStrategy
|
||||
)(chart, options)
|
||||
)(chart, options, {}, this)
|
||||
}
|
||||
|
||||
constructor(name = 'chart-mix') {
|
||||
|
||||
Reference in New Issue
Block a user