Skip to content

[Bug] on example code of Histogram #617

@jhk0530

Description

@jhk0530

Hi John, thanks for nice work.

in webpage (pkgdown) there is example code and result for histogram

https://echarts4r.john-coene.com/articles/stats#histogram

# data.frame
df <- data.frame(
  x = 1:100,
  y = rnorm(100, 20, 12)
)

df |> 
  e_charts() |> 
  e_histogram(y) |>  # NOT WORK
  e_tooltip()

However, when I tried this code it didn't make chart.
Instead when I changed code as e_histogram(y, name = 'histogram') |> it worked.
This working code is from manual page of e_histogram function, so I think update code may good for beginner like me.

Below is Example code from help page of e_histogram.
Also below code doesn't work when name = NULL

mtcars |>
  e_charts() |>
  e_histogram(mpg, name = "histogram") |>
  e_tooltip(trigger = "axis")

If you allow, I'd like to make PR for this.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions