# NOT RUN {
#preparing data frames
data <- data.frame(
xdata = c(1, 60,90, 30, 60, 90, 30, 60, 90, 45,95,45, 95),
ydata = c(5, -10, -15, 11, 16, 18, 25, 22, 18, 10, 8, 23, 28),
catdata = c("Jan","Jan", "Jan", "Feb","Feb", "Feb", "Mar",
"Mar", "Mar", "Apr", "Apr", "May", "May")
)
df <- data.frame(
xdf = c(1,60,90, 30, 60, 90, 30, 60, 90, 45,95,45, 95),
ydf = c(25, 22,20, 18, 28, 35,33, 29, 30, 38,31,26, 22),
catdf = c("Jan","Jan", "Jan", "Feb","Feb", "Feb", "Mar",
"Mar", "Mar", "Apr", "Apr", "May", "May")
)
#defining the rest of the arguments
list <- list(data, df)
vector_x <- c("xdata", "xdf")
vector_y <- c("ydata", "ydf")
vector_cat <-c("catdata", "catdf")
df_numbers <- c(1,2,2, 1)
point_cords <- c(1, 3, 4, 10)
#generating the svg string
plot<- line_chart_dense_custom(
list,
vector_x = c("xdata", "xdf"),
vector_y = c("ydata", "ydf"),
vector_cat = c("catdata", "catdf"),
series_labels = c("Gamma inc.", "Delta inc."),
df_numbers = df_numbers,
point_cords = point_cords)
#showing the plot
plot
# }
Run the code above in your browser using DataLab