mirror of
https://github.com/dataease/dataease.git
synced 2026-06-17 04:51:43 +08:00
fix(图表): 修复线面图辅助线标签遮挡
This commit is contained in:
@@ -82,10 +82,10 @@ export class Area extends G2ChartView {
|
||||
type: 'area',
|
||||
tooltip: false,
|
||||
style: { fillOpacity: 0.3 },
|
||||
zIndex: 1
|
||||
zIndex: -1
|
||||
},
|
||||
{ type: 'line', encode: { series: 'category' }, zIndex: 0 },
|
||||
{ type: 'point', tooltip: false, zIndex: 2 }
|
||||
{ type: 'line', encode: { series: 'category' }, zIndex: -2 },
|
||||
{ type: 'point', tooltip: false, zIndex: 0 }
|
||||
]
|
||||
}
|
||||
EMPTY_MARKER = () => []
|
||||
@@ -492,6 +492,7 @@ export class Area extends G2ChartView {
|
||||
type: 'lineY',
|
||||
encode: { y: 'value', color: () => randomAssistColorScale },
|
||||
data: lineData,
|
||||
zIndex: 0,
|
||||
style: {
|
||||
stroke: d => d.color,
|
||||
lineDash: d => (d.lineType === 'solid' ? [] : d.lineType === 'dashed' ? [10, 8] : [1, 2]),
|
||||
@@ -927,6 +928,7 @@ export class StackArea extends Area {
|
||||
type: 'lineY',
|
||||
encode: { y: 'value', color: () => randomAssistColorScale },
|
||||
data: [line],
|
||||
zIndex: 0,
|
||||
style: {
|
||||
stroke: line.color,
|
||||
lineDash:
|
||||
|
||||
@@ -97,6 +97,7 @@ export class Line extends G2ChartView {
|
||||
},
|
||||
children: [
|
||||
{
|
||||
zIndex: -1,
|
||||
type: 'line',
|
||||
encode: { series: 'category' },
|
||||
interaction: {
|
||||
@@ -110,7 +111,7 @@ export class Line extends G2ChartView {
|
||||
}
|
||||
}
|
||||
},
|
||||
{ type: 'point', tooltip: false }
|
||||
{ type: 'point', tooltip: false, zIndex: 0 }
|
||||
]
|
||||
}
|
||||
const options = this.setupOptions(chart, initOptions)
|
||||
@@ -575,6 +576,7 @@ export class Line extends G2ChartView {
|
||||
const randomAssistColorScale = randomString(6)
|
||||
const assistLineMark: G2Spec = {
|
||||
type: 'lineY',
|
||||
zIndex: 0,
|
||||
encode: { y: 'value', color: () => randomAssistColorScale },
|
||||
data: lineData,
|
||||
style: {
|
||||
|
||||
Reference in New Issue
Block a user