geom_path: Each group consists of only one observation. Do you need to adjust the group aesthetic?

I had this error code I was trying to show the legend with colours because the product names are too long to show on the x axis what am i doing wrong?
geom_path: Each group consists of only one observation. Do you need to adjust the group aesthetic?

This is the code
ggline(TotalSales, x = "Products", y = "TotalSales", main = "Highest and Lowest selling Products", col ="Products", text.font = 5)

That looks like a problem with your data, as in itself a similar call with different data doesn't create that error:

ggpubr::ggline(mtcars,x = "mpg",y="cyl",color = "cyl")

You need to provide a reprex.