Open alearrigo opened 1 month ago
Did you look into the events
You should be able to
observeEvent(input$plot_legend_change, {})
# and / or
observeEvent(input$plot_legend_selected, {})
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: https://github.com/apache/echarts/issues/17649
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