【问题标题】:How to customize Recharts Scatter circle size如何自定义 Recharts Scatter 圆圈大小
【发布时间】:2021-07-19 08:45:58
【问题描述】:

我想自定义 Recharts Scatter 圆圈大小。是否有所有可能的自定义选项的文档?

    <ScatterChart
            width={400}
            height={400}
            margin={{
                top: 20, right: 20, bottom: 20, left: 20,
            }}
        >
            <CartesianGrid />
            <XAxis type="number" dataKey="x" name="stature" unit="cm" />
            <YAxis type="number" dataKey="y" name="weight" unit="kg" />
            <Tooltip cursor={{ strokeDasharray: '3 3' }} />
            **<Scatter name="A school" data={data} fill="#8884d8" />**
        </ScatterChart>

【问题讨论】:

    标签: javascript recharts react-charts


    【解决方案1】:

    您可以通过添加 zAxis 来自定义圆圈的大小。这是文档中的一个示例。 https://recharts.org/en-US/examples/ThreeDimScatterChart

    【讨论】:

    • 请添加更多详细信息以扩展您的答案,例如工作代码或文档引用。
    • 虽然此链接可能会回答问题,但最好在此处包含答案的基本部分并提供链接以供参考。如果链接页面发生更改,仅链接的答案可能会失效。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-08-31
    • 1970-01-01
    • 1970-01-01
    • 2020-11-21
    相关资源
    最近更新 更多