有没有一种方法可以自定义图表中的参考区域形状?

时间:2020-07-31 15:35:01

标签: recharts

我基本上是在尝试复制此内容: chart.gif

我尝试了一个面积图-jsfiddle here-以及一个带有参考面积的散点图,但没有得到结果,任何建议将不胜感激。

    <AreaChart width={600} height={400} data={data}
                margin={{top: 10, right: 30, left: 0, bottom: 0}}>
            <CartesianGrid strokeDasharray="3 3"/>
            <XAxis dataKey="name" domain={[0, "auto"]}/>
            <YAxis  dataKey="hct"/>
            <Tooltip/>
            <Area type='monotone' dataKey='lct' stackId="1" stroke='green' fill='none' />        
            <Area type='monotone' dataKey='hct' stackId="1" stroke='green' fill='none' />
            <Area type='monotone' dataKey='pv' stackId="1" stroke='none' fill='none' />
            <ReferenceDot  r={5} fill="red" stroke="black" y={5600} x={147} alwaysShow={true} />
   </AreaChart>

谢谢

0 个答案:

没有答案