Forum Discussion
Color and label failed to display after publishing R visuals (ggplot)
Hi, Anonymous
Start by checking which R packages the Power BI service supports you are using, such as ggplot2 and ggrepel. Sometimes, some versions of the package may not be fully compatible. Or try using a hexadecimal color code in the colorcurrent vector instead of using the color name. For example, c("#000000", "#0000FF", ... ) instead of c("black", "blue", ... ).
Also make sure that labelcurrent and colorcurrent are properly formatted as character vectors. Sometimes, factors or other data types can cause problems.
Try clearing the cache by going to File > Options & Settings > Options & Settings > Data Load > Clear Cache to clear the Power BI cache.
If you're using a custom theme, make sure you apply it correctly and re-import it if necessary. After you make these changes, republish the report to the Power BI service.
You can refer to the following post:
Solved: Colours Change when report is published to the Ser... - Microsoft Fabric Community
Based on your information, I create a sample data:
Here is my preview:
Then publih to service:
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.