if (FALSE) {
my_chart <- canvasXpress(data = data.frame(Sample1 = c(33, 48),
Sample2 = c(44, 59),
Sample3 = c(55, 6)),
graphType = "Bar",
title = "Example Bar Chart",
width = "600px")
# create a page using the chart dimensions on my_chart
html_page <- cxHtmlPage(my_chart)
# or change the chart width/height for this page:
html_page <- cxHtmlPage(my_chart, width = "100%", height = "70vh")
# save page for viewing/sharing
writeLines(html_page, tempfile(fileext = ".html"))
}
Run the code above in your browser using DataLab