reactjs - Highcharts X轴和y轴
问题描述
我正在使用 react-high-charts-official,我需要将 x 轴更改为字符串值,将 y 轴更改为示例:1%、2%、3%。我如何做到这一点?条形图尖端也应该是圆形的。
解决方案
您可以使用轴标签格式化程序。参考:api.highcharts.com/highstock/yAxis.labels.formatter
yAxis: {
labels: {
formatter: function () {
return this.value + ' units';
}
},
}
推荐阅读
- reactjs - Redux 存储数据在表格中显示的问题
- filter - 如何访问 panflute 中的全局变量(Pandoc 过滤器)
- c# - 在 UI 线程上使用计时器更新标签文本,而不阻塞 UI
- angular - 如何在单独的按钮上发布上传的文件,而不是在 Kendo Angular Upload 中自动上传
- python - 动态更新 Flask 应用程序中的文本以获取温度读数
- c# - GenerateChangePhoneNumberToken System.ArgumentNullException:字符串引用未设置为字符串的实例。参数名称:s
- python - 是否可以将字节对象转换为代码对象?
- postgresql - 在 xmltable 中的 xmlpath 上计算累积和 (cumsum)
- editor - ABAP 编辑器中的代码完成太小
- c# - VS 2013发布项目时如何在应用程序文件中查找SQL Server数据库文件?