-
-
Notifications
You must be signed in to change notification settings - Fork 81
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
Dynamic totals in barchart #647
Comments
Did you look into the events You should be able to observeEvent(input$plot_legend_change, {})
# and / or
observeEvent(input$plot_legend_selected, {}) |
I'm going to look into it. Thanks for the quick reply! This is my first project using charts. Do you also know how to create the totals on the right side of the plot? |
I'm not sure I understand where you want the total to go. |
In the attached images I need to compute the red numbers for each bar (850, 530,...). An extra label that is the sum of the label printed. I think it's the same issues of: |
Probably skill issue more than library issue.
I have a Shiny app example using echarts4r to visualize sales data by category and year.
I'm trying to add two features to this plot:
A dynamic total displayed at the top of the chart that updates based on the legend selection. I know how to create one but I don't know how to make it change when something in the legend gets deselected. I think I need some sort of reactive function that listens to selection and compute totals again?
A number on the right side of the bars showing the sum of categories, which also updates with the legend selection.
Here's my current code:
In the image what I need.
Problem 1 is the total on top of the plot, Problem 2 are the numbers on the right side of the plot
The text was updated successfully, but these errors were encountered: