Considering a data frame as below that shows different types of activities happened within 5 weeks,
id Type Day_index(no)
1 711 C 16
2 346 A 30
3 569 B 8
4 11 A 22
5 263 A 29
6 510 C 19
7 686 B 9
8 467 A 11
9 478 C 16
10 202 A 22
11 701 C 22
12 448 A 5
13 106 A 19
14 674 B 8
15 139 A 25
How to plot a percentage Stacked Bar Plot in r which x-axis shows weeks and day names instead of the day number in the data frame as below: