- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试在重新图表雷达图表上获取自定义标签工作。我已经尝试根据文档做多件事,所以我想我会把它扔给狼群。希望你们中的一个能指出我正确的方向。
<ResponsiveContainer>
<RadarChart outerRadius={125} cy={175} data={ucRadarData}>
<Legend verticalAlign='top' height={36} />
<PolarGrid />
<PolarAngleAxis dataKey='value'>
<Label content={({ value }) => <Typography>{value}</Typography>} /> // When I remove this component, the labels get removed as well so I assume this is the component I want to target.
</PolarAngleAxis>
<PolarRadiusAxis domain={[lowestRangeStart, highestRangeEnd]} tickCount={tickArray.length} />
<Radar label={({ label }) => <Typography>{label}</Typography>} name='Self Assessment' dataKey='Self' stroke='#8884d8' fill='#8884d8' fillOpacity={0.6} /> // Also tried adding custom label here.
</RadarChart>
</ResponsiveContainer>
最佳答案
做这个:
为自定义刻度创建渲染函数并将其作为刻度属性添加到 PolarAngleAxis 组件
function customTick({ payload, x, y, textAnchor, stroke, radius }) {
return (
<g
className="recharts-layer recharts-polar-angle-axis-tick"
>
<text
radius={radius}
stroke={stroke}
x={x}
y={y}
className="recharts-text recharts-polar-angle-axis-tick-value"
text-anchor={textAnchor}
>
<tspan x={x} dy="0em">
{payload.value}
</tspan>
</text>
</g>
);
}
<PolarAngleAxis dataKey='value' tick={customTick}/>
关于reactjs - Recharts 雷达图上的自定义标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59361614/
我想尝试用 Java OpenGL 构建雷达。基本上,在该方法中,您传递玩家的当前位置、玩家面对的角度以及敌人的位置。如果敌人就在正前方,那么红点(象征敌人)应该在圆圈(雷达)的顶部,可以说是0度。如
我只是对声纳设备有一个总体的思考。声纳结果如何用数据类型表示。 目前我想出的解决方案是拥有一个 360 2D array,其值表明物体被击中时的距离,最大范围意味着那里什么也没有。这样做的问题是,对于
我有一个雷达图Js。 我不知道如何在区域内放置径向渐变。放置当前代码时,默认只取1种颜色作为background-color 当前代码: let ctx = document.getElementBy
我用在线生成器实现了 amChart。这是结果: https://live.amcharts.com/ODVhY/ 如您所见,带有值的标签仅在红牛上可见。 如何将其扩展到所有 5 个项目符号? 我的配
我需要一种灵活的方法在 ggplot2 中制作雷达/蜘蛛图。从我在 github 和 ggplot2 组上找到的解决方案,我已经走到了这一步: library(ggplot2) # Define a
我想用radare2调试程序“id3v2 -c halo test.mp3”。 如何将参数“-c halo test.mp3”传递给radare2? 我只用 rarun2 找到了一些东西,但是当我这样
我在哪里可以找到适用于 iOS 的优秀蜘蛛(雷达)图表库? (如下图) 我检查了“Core Plot”和“iOSPlot”开源项目,但这些都不支持蜘蛛图。 BR,元一。 最佳答案 在 Github 上
我是一名优秀的程序员,十分优秀!