重新图表:如何设置垂直实线的格式(将鼠标悬停在数据点上时)?

fam*_*oes 4 recharts

Recharts 文档描述了如何在悬停期间设置数据点样式以及工具提示的格式。

然而,在悬停期间,文档中似乎没有描述出现的垂直实线(除非我错过了它)。

是否有允许格式化该行的道具?

(如果您不知道我在说什么,那就是我的示例图像中“Nov-14”上方的垂直实线)

这是我的折线图和结果:

                     <ResponsiveContainer>
                        <LineChart data={this.props.data} margin={{ top: 5, right: 30, left: 20, bottom: 5 }}>
                            <CartesianGrid strokeDasharray="3 3" />
                            <XAxis dataKey="date" tickFormatter={xFormatter}/>
                            <YAxis dataKey="value" tickFormatter={yFormatter}/>
                            <Tooltip />
                            <Line type="monotone" dataKey="value" stroke="#4F80E4" strokeWidth={2}/>
                        </LineChart>
                    </ResponsiveContainer>
Run Code Online (Sandbox Code Playgroud)

Ren*_*laj 8

您将需要编辑光标:)

<Tooltip cursor={false}/>
Run Code Online (Sandbox Code Playgroud)