Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"e_tooltip(formatter = )" how to display the interval instead of the average of the histogram column? #469

Open
avraam-inside opened this issue Sep 30, 2022 · 1 comment

Comments

@avraam-inside
Copy link

avraam-inside commented Sep 30, 2022

Hi!

I have a histogram and the need to see not the average value of the histogram column (2.9 on the picture), but its interval (2.8-3.0). How to do it?

Example code:

iris %>% setDT() %>% 
    e_charts() %>%
    e_histogram(
        Sepal.Width,
        name = "histogram") %>%
    e_density(
        Sepal.Width,
        name = "density",
        y_index = 1) %>%
    e_tooltip(trigger = "axis")

What I see and what I want to see:
image

@avraam-inside
Copy link
Author

avraam-inside commented Oct 1, 2022

I managed to get the gaps in the histograms in other packages right away without any problems. Accordingly, it is very strange that I am having problems in echarts4r with this issue.

For example:
image

I examined all the parameters in e_tooltip and found no information about neighboring points or about the max and min boundaries of the current bar histogram rendering. Please add information about the column boundaries to the js code (example: e_tooltip(formatter = 'function(param) {param[0].indexMin}') or somethink like that) - they are definitely in the code somewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant