Created
April 24, 2016 16:29
-
-
Save ThoDuyNguyen/8c566510274b59f77ca790bee4a2d81c to your computer and use it in GitHub Desktop.
ChartJS - Test barchart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "Flex Dashboard" | |
output: | |
flexdashboard::flex_dashboard: | |
orientation: columns | |
vertical_layout: fill | |
horizontal_layout: fill | |
--- | |
<!-- Learn more about flexdashboard at https://rstudio.github.io/flexdashboard --> | |
```{r setup, include=FALSE} | |
# Load packages and initialize data here | |
library(flexdashboard) | |
library(chartjs) | |
``` | |
Bars Chart | |
======================================= | |
```{r} | |
chartjs() %>% | |
cjsBar(labels = LETTERS[1:10]) %>% | |
cjsAddSeries(data = c(abs(c(rnorm(8))), NA, 0.5), label = "Series 1") %>% | |
cjsAddSeries(data = abs(c(rnorm(10))), label = "Series 2") %>% | |
cjsAddSeries(data = abs(c(rnorm(10))), label = "Series 3") %>% | |
cjsLegend() | |
``` | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment