给柱状图设置了渐变背景色后,tooltip的小圆点(marker)的颜色都变成了黑色的,它应该识别不了`
l (90) 0:#FF9E4C 1:#FB6051这种写法
<div className={barClassName} ref={this.handleRoot}>
<div className={styles.chart} ref={this.handleRef}>
{ title && (<h4 className={styles.title}>{title}</h4>) }
<Chart
height={title ? height - 31 : height}
data={dv}
forceFit={forceFit}
onGetG2Instance={this.getG2Instance}
>
<Coord scale={scale} />
<Axis name="x" />
<Axis name="y"
label={autoHideXLabels ? undefined : {}}
tickLine={autoHideXLabels ? undefined : {}}
/>
<Tooltip
crosshairs={{
type: "y"
}}
/>
<Geom
type="interval"
position="x*y"
active={true}
color={['name', [
'l (90) 0:#FF9E4C 1:#FB6051',
'l (90) 0:#FF69A6 1:#FF3636',
'l (90) 0:#4BFCFA 1:#199EFF',
'l (90) 0:#D6F417 1:#46BD16',
'l (90) 0:#B8DEFF 1:#5D80A4',
]]}
adjust={[
{
type: "dodge",
marginRatio: 1 / 32
}
]}
/>
</Chart>
{hasLegend && (
<ul className={styles.legend}>
{legendData.map((item, i) => (
<li key={i}>
<span
className={styles.dot}
style={{
background: !item.checked ? '#aaa' : `linear-gradient(to bottom, ${item.colors.topColor}, ${item.colors.bottomColor})`
}}
/>
<span
className={styles.legendTitle}
style={{color: item.colors.bottomColor}}
>
{item.name}
</span>
</li>
))}
</ul>
)}
</div>
</div>