R - y axis as time interval

I'm building an R report to display time in y axis.

The R code I'm using is as follows:

library(ggplot2)


c1_graph <- ggplot(dataset, aes(workflow_code,Value, fill= Attribute))+
geom_col(width=0.4, position=position_dodge(width=0.5)) +
#scale_y_continuous(limits=c(min_value,max_value))+
 theme(axis.text.x=element_text( angle=90, hjust=1, vjust=0.5))+
 theme(axis.title.x=element_blank())+
        #scale_y_time(breaks = time_breaks)
# theme(axis.text.y=element_text(size=8))+
        scale_y_time(labels=function(1), strftime(1, '%H:%M:%S'))
theme(axis.title.y=element_blank())+
 theme(legend.position="bottom")+
 theme(legend.title=element_blank())
 c1_graph

My time appears a bit congested. How can I set time intervals?

Also, is it possible to get tooltips so that when I hover over the graph it would display the values?
And, how can I adjust the overall size of R report?

Thanks,

AR

You might be interested in c1_graph + coord_flip(...)

Otherwise, try ggsave() to save the graph in certain size (with certain DPI), and load that image. I'm not sure how that would work in PowerBI though.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.