Forum Discussion
JocelynLu
9 years agoRegular Visitor
Line Chart as "Excel Scatter Plot"
Hello, I'm trying to plot a large data set over an extended period of time. For example: Date-Time, Average Feed Pressure (PSI) 2/8/16 0:00, 10.66 2/8/16 0:05, 11.3 2/8/16 0:10, 11.56 2/...
Greg_Deckler
Community Champion
9 years agoHmm, I see what you mean, the bubble chart does not like date/time values in its x-asix and putting it in the play axis isn't going to get you what you want. The line chart works but its a line and not single points. You might find something in the Custom Visuals Gallery or, you could use an R visual like this:
library("ggplot2")
p <- ggplot(dataset,aes(dt,ps))
p + geom_point(,dataset)My columns were named dt and ps. I had to set my dt column to Text instead of Date/Time because Power BI R wanted to put in Year, Month, Day and you wanted to get to minutes.
So, you might have to manipulate things a bit to get it to work, but I got the same point graph using this (this version ignores the internally built dataframe)
library("ggplot2")
dt = c("2/8/16 0:00", "2/8/16 0:05", "2/8/16 0:10", "2/8/16 0:15")
ps = c(10.66,11.3,11.56,11.68)
data <- data.frame(dt,ps)
p <- ggplot(data, aes(dt, ps))
p + geom_point()