Nivo ResponsiveLine 图表未正确显示负 y 轴

问题描述

尝试更改我生成的 ResponsiveLine 图表上的一系列设置,但它们都没有任何效果

这是图表代码

    return (
        <ResponsiveLine
            data={data}
            margin={{ top: 50,right: 30,bottom: 120,left: 50 }}
            gridYValues={[0,0.1,0.2,0.3]}
            yScale={{
                type: "linear",stacked: false,min: -0.4,max: 0.4,}}
            xScale={{
                type: "time",precision: "day",format: "native"
            }}
            axisLeft={{
                legend: 'polarity',legendPosition: 'center',legendOffset: -20,tickValues: [-0.4,0.4],}}
            axisBottom={{
                legend: 'timestamp',legendOffset: 40
            }}
            animate={true}
        />
    );

刻度值正确显示,但没有负 y 轴网格线,切片仅正确显示在正 y 轴 [这里][1]

我尝试将 yScale min 和 max 更改为 auto 但它什么也不做,我尝试增加边距它什么也不做我尝试将 max 更改为 maxValue 它什么也不做。 [1]:

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)