I'm trying to generate a graph similar to the one in the image
However, I havn't figured out how to display both the actual sales and the target sales, without creating a bar for the target (notice how in the image, the target is just a mark). The dataset I'm using is as follows:
Where columns "text", "KGSFACT" and "porcentaje_VN" are not important. And instead of using months, I'm using the "SOLICITANTE" dimension. Also, I'm measuring sales with column "VALORNETO". Column "type" is to set the difference between actual and target sales.
The idea I have is something like use a filter inside the ggplot code chunk, but it doesn't seem right, and is actually not functional.
ggplot(data = a7) +
geom_bar(aes(x = SOLICITANTE,
type = "actual",
stat = "identity",
position = "dodge",
fill = type ) ) +
geom_point( aes( x = SOLICITANTE,
y = VALORNETO,
type = "target") ) +
coord_flip()
Any idea how can I recreate a graph like the one in the image with ggplot?



