everybody.
I am using R and ggplot2. I have a chart and there are multiple points on it (Each of them has different colors. Red, blue, yellow, etc). I am using also R Shiny and ggiraph package to have click events on legends. Once, I click legend, I am rendering new chart based on filter criteria and it is fine.
Problem. When any color is removed from dataset (for example red), legend (with name red) is hided also. Also, I try to hide points but this case legends are hided also.
What kind of solution I need this case ?
Thanks !

You have to create your own discrete scale: