highcharts 更改从highcharter下载的文件中的列名

k2fxgqgv  于 2022-12-18  发布在  Highcharts
关注(0)|答案(1)|浏览(145)

从highcharter导出后,我想更改.csv文件的列名。例如,当前列名为“flipper_length_mm”和“Penguins”,但是否可以将其更改为“X”和“Y”?
我认为highcharts有一个更改列名的选项,但我对JS不太熟悉,无法自己更改它。(Change Highchart's pie chart .xls file category column name

library(highcharter)
data(penguins, package = "palmerpenguins")
penguins <- penguins[complete.cases(penguins),]

hchart(
  penguins,
  "scatter",
  name = "Penguins",
  hcaes(x = flipper_length_mm, y = bill_length_mm)) |>
  hc_exporting(enabled = TRUE)
a1o7rhls

a1o7rhls1#

我们可以使用hc_xAxis()hc_yAxis

hchart(
  penguins,
  "scatter",
  name = "Penguins",
  hcaes(x = flipper_length_mm, y = bill_length_mm)) |>
  hc_xAxis(title = list(text = "x")) |>
  hc_yAxis(title = list(text = "y")) |>
  hc_exporting(enabled = TRUE)

相关问题