简体   繁体   English

Highcharts X轴和y轴

[英]Highcharts X-axis and y-axis

I am using react-high-charts-official and I need to change the x-axis to a string values and y-axis to example: 1%, 2%, 3%.我正在使用 react-high-charts-official,我需要将 x 轴更改为字符串值,将 y 轴更改为示例:1%、2%、3%。 How do i achieve that?我如何做到这一点? Also the bar graph tip should be round.条形图尖端也应该是圆形的。

You can use axis label formatter.您可以使用轴 label 格式化程序。 Reference: api.highcharts.com/highstock/yAxis.labels.formatter参考: api.highcharts.com/highstock/yAxis.labels.formatter

 yAxis: {
  labels: {
    format: `${value} %`
  },
 }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM