I'm new to R and started with basic plots. I have used a simple excel table which has the following columns- Family, Family Name, Product.ID, Sales, Time, Value
The data table is similar to the below
|Family|Family.Name|Product.ID|Sales|Time|Value|
|19A| A Box|AA980|ACTUALSALESUNITS|Jan 2021|63|
|19A| A Box|AA980|ACTUALSALESUNITS|Feb 2021|34|
|19A| A Box|AA980|ACTUALSALESUNITS|Mar 2021|93|
|19A| A Box|AA980|ACTUALSALESUNITS|Apr 2021|99|
|19B| B Box|AL345|ACTUALSALESUNITS|Jan 2021|1|
|19B| B Box|AL345|ACTUALSALESUNITS|Feb 2021|0|
|19B| B Box|AL345|ACTUALSALESUNITS|Mar 2021|0|
|19B| B Box|AL345|ACTUALSALESUNITS|Apr 2021|0|
I used the code below but for some reason the when I try to group the chart by Family Name it is just showing a single color and even the legends is not appearing for all values in Family Name
library("ggplot2")
library("data.table")
library("readxl")
Data<-read.xlsx("C:/Users/vc/Desktop/Sales Data.xlsx")
setDT(Data)
Plot<-ggplot(data = Data,aes(x=Time,y=Value,group='Family Name',shape='Family Name',color='Family Name'))+geom_line()+geom_point()
I have attached the output graph and it is not very clear
Could someone please help me on this
Thank you so much