├── NEWS ├── inst ├── slidify │ ├── libraries │ │ ├── frameworks │ │ │ └── shower │ │ │ │ ├── config.yml │ │ │ │ ├── themes │ │ │ │ └── ribbon │ │ │ │ │ ├── images │ │ │ │ │ ├── linen.png │ │ │ │ │ ├── linen@2x.png │ │ │ │ │ ├── ribbon.svg │ │ │ │ │ ├── grid-16x10.svg │ │ │ │ │ └── grid-4x3.svg │ │ │ │ │ ├── fonts │ │ │ │ │ ├── PTMono.woff │ │ │ │ │ ├── PTSans.woff │ │ │ │ │ ├── PTSans.Bold.woff │ │ │ │ │ ├── PTSans.Italic.woff │ │ │ │ │ ├── PTSans.Bold.Italic.woff │ │ │ │ │ └── PTSans.Narrow.Bold.woff │ │ │ │ │ ├── pictures │ │ │ │ │ ├── exact.png │ │ │ │ │ ├── square.png │ │ │ │ │ ├── tall.png │ │ │ │ │ └── wide.png │ │ │ │ │ ├── styles │ │ │ │ │ ├── print.css │ │ │ │ │ ├── fonts.scss │ │ │ │ │ ├── reset.scss │ │ │ │ │ ├── print.scss │ │ │ │ │ └── defaults.scss │ │ │ │ │ ├── Readme.md │ │ │ │ │ ├── License.txt │ │ │ │ │ ├── Contributing.md │ │ │ │ │ └── index.html │ │ │ │ ├── layouts │ │ │ │ ├── slide.html │ │ │ │ ├── slide0.html │ │ │ │ └── deck.html │ │ │ │ ├── partials │ │ │ │ └── head.html │ │ │ │ ├── License.txt │ │ │ │ ├── Contributing.md │ │ │ │ └── Readme.md │ │ └── highlighters │ │ │ └── highlight.js │ │ │ ├── css │ │ │ ├── pojoaque.jpg │ │ │ ├── school_book.png │ │ │ ├── brown_papersq.png │ │ │ ├── ascetic.css │ │ │ ├── hemisu-light.css │ │ │ ├── tomorrow.css │ │ │ ├── tomorrow_night.css │ │ │ ├── solarized_dark.css │ │ │ ├── solarized_light.css │ │ │ ├── ir_black.css │ │ │ ├── vs.css │ │ │ ├── pojoaque.css │ │ │ ├── dark.css │ │ │ ├── brown_paper.css │ │ │ ├── idea.css │ │ │ ├── far.css │ │ │ ├── monokai.css │ │ │ ├── zenburn.css │ │ │ ├── github.css │ │ │ ├── magula.css │ │ │ ├── school_book.css │ │ │ ├── googlecode.css │ │ │ ├── sunburst.css │ │ │ ├── default.css │ │ │ ├── xcode.css │ │ │ └── arta.css │ │ │ └── highlight.js.html │ ├── .cache │ │ ├── __packages │ │ ├── unnamed-chunk-1_1dedafd1b725b95e78ea340e4bdf6477.RData │ │ ├── unnamed-chunk-1_1dedafd1b725b95e78ea340e4bdf6477.rdb │ │ ├── unnamed-chunk-1_1dedafd1b725b95e78ea340e4bdf6477.rdx │ │ ├── unnamed-chunk-2_1fbd39688e2b2a2a8fe54229e1d8a555.RData │ │ ├── unnamed-chunk-2_1fbd39688e2b2a2a8fe54229e1d8a555.rdb │ │ ├── unnamed-chunk-2_1fbd39688e2b2a2a8fe54229e1d8a555.rdx │ │ ├── unnamed-chunk-3_2f152dc99c3bde01b87c9c1bdf14955b.RData │ │ ├── unnamed-chunk-3_2f152dc99c3bde01b87c9c1bdf14955b.rdb │ │ ├── unnamed-chunk-3_2f152dc99c3bde01b87c9c1bdf14955b.rdx │ │ ├── unnamed-chunk-4_33413a539c918c837e5acf9dd2cb7cd2.RData │ │ ├── unnamed-chunk-4_33413a539c918c837e5acf9dd2cb7cd2.rdb │ │ ├── unnamed-chunk-4_33413a539c918c837e5acf9dd2cb7cd2.rdx │ │ ├── unnamed-chunk-5_5aa17923dc7c0b814cb51eaa7fc81780.RData │ │ ├── unnamed-chunk-5_5aa17923dc7c0b814cb51eaa7fc81780.rdb │ │ └── unnamed-chunk-5_5aa17923dc7c0b814cb51eaa7fc81780.rdx │ ├── index.md │ ├── index.html │ └── index.Rmd ├── tooltip │ ├── cityDF.csv │ ├── mapData.txt │ ├── tooltip.csv │ ├── tooltip.tsv │ ├── tooltip.txt │ └── tooltip.xlsx ├── template │ ├── caption.html │ ├── footer.html │ ├── header.html │ ├── header_GBK.html │ └── chart.recharts.html ├── examples │ ├── testDataForMap.csv │ ├── xPie.html │ ├── irisBar.html │ └── irisRadar.html └── shiny │ ├── recharts_shiny_integrated │ ├── new.csv │ ├── testData.csv │ ├── testData.rda │ ├── server.R │ └── www │ │ └── index.html │ ├── lazyPlot │ ├── eLine_Area │ │ └── www │ │ │ └── tooltip.js │ ├── eForce │ │ ├── server.R │ │ └── ui.R │ ├── ePie │ │ ├── server.R │ │ └── ui.R │ ├── ui.R │ ├── server.R │ └── eMap │ │ ├── ui.R │ │ └── www │ │ └── script.js │ ├── recharts_shiny_football │ ├── football.rda │ ├── testData_state.csv │ ├── testData.csv │ ├── server.R │ └── www │ │ └── index.html │ ├── recharts_shiny_football_en │ ├── football.rda │ ├── testData_state.csv │ ├── test.csv │ ├── testData.csv │ ├── server.R │ └── www │ │ └── index.html │ ├── rechartsWidget.html │ ├── recharts_shiny_pie │ ├── ui.R │ └── server.R │ └── recharts_shiny_eForce │ ├── ui.R │ └── server.R ├── screenshots ├── xPie.PNG ├── irisArea.PNG ├── irisBar.PNG ├── irisLine.PNG ├── irisPoints.PNG ├── irisChinaMap.PNG └── irisLineZoom.PNG ├── .Rbuildignore ├── demo ├── lazyRecharts.R ├── recharts_slidify.R ├── recharts_shiny.R ├── recharts_shiny_pie.R ├── recharts_shiny_football.R ├── recharts_shiny_integrated.R ├── lazyRecharts_Map.R ├── recharts.R └── recharts_knitr.Rmd ├── man ├── pause.Rd ├── renderEcharts.Rd ├── recharts.shiny.init.Rd ├── recharts.init.Rd ├── eLine.Rd ├── eArea.Rd ├── ePie.Rd ├── plot.recharts.Rd ├── print.recharts.Rd ├── ePoints.Rd ├── eMap.Rd ├── eRadar.Rd ├── eBar.Rd └── eForce.Rd ├── NAMESPACE ├── R ├── lazyPlot.R ├── zzz.R ├── config.R ├── eRadar.R ├── ePie.R ├── eBar.R ├── eMap.R └── ePoints.R ├── DESCRIPTION ├── .travis.yml ├── LICENSE.TXT └── README.md /NEWS: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/config.yml: -------------------------------------------------------------------------------- 1 | shower: 2 | theme: ribbon 3 | -------------------------------------------------------------------------------- /inst/slidify/.cache/__packages: -------------------------------------------------------------------------------- 1 | base 2 | plyr 3 | recharts 4 | RJSONIO 5 | slidify 6 | -------------------------------------------------------------------------------- /inst/slidify/index.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/index.md -------------------------------------------------------------------------------- /screenshots/xPie.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/screenshots/xPie.PNG -------------------------------------------------------------------------------- /.Rbuildignore: -------------------------------------------------------------------------------- 1 | .gitignore 2 | NEWS.md 3 | ^\.Rproj\.user$ 4 | ^.*\.Rproj$ 5 | FAQ.md 6 | Makefile 7 | -------------------------------------------------------------------------------- /inst/slidify/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/index.html -------------------------------------------------------------------------------- /inst/tooltip/cityDF.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/tooltip/cityDF.csv -------------------------------------------------------------------------------- /inst/tooltip/mapData.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/tooltip/mapData.txt -------------------------------------------------------------------------------- /inst/tooltip/tooltip.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/tooltip/tooltip.csv -------------------------------------------------------------------------------- /inst/tooltip/tooltip.tsv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/tooltip/tooltip.tsv -------------------------------------------------------------------------------- /inst/tooltip/tooltip.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/tooltip/tooltip.txt -------------------------------------------------------------------------------- /screenshots/irisArea.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/screenshots/irisArea.PNG -------------------------------------------------------------------------------- /screenshots/irisBar.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/screenshots/irisBar.PNG -------------------------------------------------------------------------------- /screenshots/irisLine.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/screenshots/irisLine.PNG -------------------------------------------------------------------------------- /inst/tooltip/tooltip.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/tooltip/tooltip.xlsx -------------------------------------------------------------------------------- /screenshots/irisPoints.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/screenshots/irisPoints.PNG -------------------------------------------------------------------------------- /screenshots/irisChinaMap.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/screenshots/irisChinaMap.PNG -------------------------------------------------------------------------------- /screenshots/irisLineZoom.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/screenshots/irisLineZoom.PNG -------------------------------------------------------------------------------- /inst/template/caption.html: -------------------------------------------------------------------------------- 1 | 2 |
Chart ID: CHARTID
3 | 4 | -------------------------------------------------------------------------------- /inst/template/footer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /inst/examples/testDataForMap.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/examples/testDataForMap.csv -------------------------------------------------------------------------------- /demo/lazyRecharts.R: -------------------------------------------------------------------------------- 1 | 2 | # Line Plot 3 | require(recharts) 4 | recharts.eLine <- eLine(WorldPhones) 5 | 6 | lazyPlot(recharts.eLine) 7 | -------------------------------------------------------------------------------- /inst/shiny/recharts_shiny_integrated/new.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/shiny/recharts_shiny_integrated/new.csv -------------------------------------------------------------------------------- /demo/recharts_slidify.R: -------------------------------------------------------------------------------- 1 | library(slidify) 2 | setwd(system.file("slidify", package = "recharts")) 3 | slidify("index.Rmd") 4 | browseURL("index.html") -------------------------------------------------------------------------------- /inst/shiny/lazyPlot/eLine_Area/www/tooltip.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/shiny/lazyPlot/eLine_Area/www/tooltip.js -------------------------------------------------------------------------------- /inst/shiny/recharts_shiny_football/football.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/shiny/recharts_shiny_football/football.rda -------------------------------------------------------------------------------- /inst/shiny/recharts_shiny_integrated/testData.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/shiny/recharts_shiny_integrated/testData.csv -------------------------------------------------------------------------------- /inst/shiny/recharts_shiny_integrated/testData.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/shiny/recharts_shiny_integrated/testData.rda -------------------------------------------------------------------------------- /inst/shiny/recharts_shiny_football_en/football.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/shiny/recharts_shiny_football_en/football.rda -------------------------------------------------------------------------------- /inst/shiny/recharts_shiny_football/testData_state.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/shiny/recharts_shiny_football/testData_state.csv -------------------------------------------------------------------------------- /inst/shiny/recharts_shiny_football_en/testData_state.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/shiny/recharts_shiny_football_en/testData_state.csv -------------------------------------------------------------------------------- /demo/recharts_shiny.R: -------------------------------------------------------------------------------- 1 | # shiny Demo For eForce 2 | library(shiny) 3 | runApp(system.file("shiny","recharts_shiny_eForce", package = "recharts")) 4 | pause() 5 | 6 | 7 | -------------------------------------------------------------------------------- /demo/recharts_shiny_pie.R: -------------------------------------------------------------------------------- 1 | 2 | # shiny Demo first 3 | library(shiny) 4 | runApp(system.file("shiny","recharts_shiny_pie", package = "recharts")) 5 | pause() 6 | 7 | 8 | -------------------------------------------------------------------------------- /demo/recharts_shiny_football.R: -------------------------------------------------------------------------------- 1 | 2 | # shiny Demo first 3 | library(shiny) 4 | runApp(system.file("shiny","recharts_shiny_football", package = "recharts")) 5 | pause() 6 | 7 | 8 | -------------------------------------------------------------------------------- /demo/recharts_shiny_integrated.R: -------------------------------------------------------------------------------- 1 | 2 | # shiny Demo first 3 | library(shiny) 4 | runApp(system.file("shiny","recharts_shiny_integrated", package = "recharts")) 5 | pause() 6 | 7 | 8 | -------------------------------------------------------------------------------- /inst/slidify/libraries/highlighters/highlight.js/css/pojoaque.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/libraries/highlighters/highlight.js/css/pojoaque.jpg -------------------------------------------------------------------------------- /inst/slidify/libraries/highlighters/highlight.js/css/school_book.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/libraries/highlighters/highlight.js/css/school_book.png -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/themes/ribbon/images/linen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/libraries/frameworks/shower/themes/ribbon/images/linen.png -------------------------------------------------------------------------------- /inst/slidify/libraries/highlighters/highlight.js/css/brown_papersq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/libraries/highlighters/highlight.js/css/brown_papersq.png -------------------------------------------------------------------------------- /inst/slidify/.cache/unnamed-chunk-1_1dedafd1b725b95e78ea340e4bdf6477.RData: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/.cache/unnamed-chunk-1_1dedafd1b725b95e78ea340e4bdf6477.RData -------------------------------------------------------------------------------- /inst/slidify/.cache/unnamed-chunk-1_1dedafd1b725b95e78ea340e4bdf6477.rdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/.cache/unnamed-chunk-1_1dedafd1b725b95e78ea340e4bdf6477.rdb -------------------------------------------------------------------------------- /inst/slidify/.cache/unnamed-chunk-1_1dedafd1b725b95e78ea340e4bdf6477.rdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/.cache/unnamed-chunk-1_1dedafd1b725b95e78ea340e4bdf6477.rdx -------------------------------------------------------------------------------- /inst/slidify/.cache/unnamed-chunk-2_1fbd39688e2b2a2a8fe54229e1d8a555.RData: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/.cache/unnamed-chunk-2_1fbd39688e2b2a2a8fe54229e1d8a555.RData -------------------------------------------------------------------------------- /inst/slidify/.cache/unnamed-chunk-2_1fbd39688e2b2a2a8fe54229e1d8a555.rdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/.cache/unnamed-chunk-2_1fbd39688e2b2a2a8fe54229e1d8a555.rdb -------------------------------------------------------------------------------- /inst/slidify/.cache/unnamed-chunk-2_1fbd39688e2b2a2a8fe54229e1d8a555.rdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/.cache/unnamed-chunk-2_1fbd39688e2b2a2a8fe54229e1d8a555.rdx -------------------------------------------------------------------------------- /inst/slidify/.cache/unnamed-chunk-3_2f152dc99c3bde01b87c9c1bdf14955b.RData: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/.cache/unnamed-chunk-3_2f152dc99c3bde01b87c9c1bdf14955b.RData -------------------------------------------------------------------------------- /inst/slidify/.cache/unnamed-chunk-3_2f152dc99c3bde01b87c9c1bdf14955b.rdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/.cache/unnamed-chunk-3_2f152dc99c3bde01b87c9c1bdf14955b.rdb -------------------------------------------------------------------------------- /inst/slidify/.cache/unnamed-chunk-3_2f152dc99c3bde01b87c9c1bdf14955b.rdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/.cache/unnamed-chunk-3_2f152dc99c3bde01b87c9c1bdf14955b.rdx -------------------------------------------------------------------------------- /inst/slidify/.cache/unnamed-chunk-4_33413a539c918c837e5acf9dd2cb7cd2.RData: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/.cache/unnamed-chunk-4_33413a539c918c837e5acf9dd2cb7cd2.RData -------------------------------------------------------------------------------- /inst/slidify/.cache/unnamed-chunk-4_33413a539c918c837e5acf9dd2cb7cd2.rdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/.cache/unnamed-chunk-4_33413a539c918c837e5acf9dd2cb7cd2.rdb -------------------------------------------------------------------------------- /inst/slidify/.cache/unnamed-chunk-4_33413a539c918c837e5acf9dd2cb7cd2.rdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/.cache/unnamed-chunk-4_33413a539c918c837e5acf9dd2cb7cd2.rdx -------------------------------------------------------------------------------- /inst/slidify/.cache/unnamed-chunk-5_5aa17923dc7c0b814cb51eaa7fc81780.RData: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/.cache/unnamed-chunk-5_5aa17923dc7c0b814cb51eaa7fc81780.RData -------------------------------------------------------------------------------- /inst/slidify/.cache/unnamed-chunk-5_5aa17923dc7c0b814cb51eaa7fc81780.rdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/.cache/unnamed-chunk-5_5aa17923dc7c0b814cb51eaa7fc81780.rdb -------------------------------------------------------------------------------- /inst/slidify/.cache/unnamed-chunk-5_5aa17923dc7c0b814cb51eaa7fc81780.rdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/.cache/unnamed-chunk-5_5aa17923dc7c0b814cb51eaa7fc81780.rdx -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/themes/ribbon/fonts/PTMono.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/libraries/frameworks/shower/themes/ribbon/fonts/PTMono.woff -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/themes/ribbon/fonts/PTSans.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/libraries/frameworks/shower/themes/ribbon/fonts/PTSans.woff -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/themes/ribbon/images/linen@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/libraries/frameworks/shower/themes/ribbon/images/linen@2x.png -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/themes/ribbon/pictures/exact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/libraries/frameworks/shower/themes/ribbon/pictures/exact.png -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/themes/ribbon/pictures/square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/libraries/frameworks/shower/themes/ribbon/pictures/square.png -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/themes/ribbon/pictures/tall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/libraries/frameworks/shower/themes/ribbon/pictures/tall.png -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/themes/ribbon/pictures/wide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/libraries/frameworks/shower/themes/ribbon/pictures/wide.png -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/themes/ribbon/fonts/PTSans.Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/libraries/frameworks/shower/themes/ribbon/fonts/PTSans.Bold.woff -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/themes/ribbon/fonts/PTSans.Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/libraries/frameworks/shower/themes/ribbon/fonts/PTSans.Italic.woff -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/themes/ribbon/images/ribbon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/themes/ribbon/fonts/PTSans.Bold.Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/libraries/frameworks/shower/themes/ribbon/fonts/PTSans.Bold.Italic.woff -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/themes/ribbon/fonts/PTSans.Narrow.Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lchiffon/recharts/master/inst/slidify/libraries/frameworks/shower/themes/ribbon/fonts/PTSans.Narrow.Bold.woff -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/layouts/slide.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

{{{ slide.title }}}

4 | {{{ slide.content }}} 5 |
6 |
7 | -------------------------------------------------------------------------------- /man/pause.Rd: -------------------------------------------------------------------------------- 1 | \name{pause} 2 | \alias{pause} 3 | \title{recharts demo pause function} 4 | \usage{ 5 | pause() 6 | } 7 | \description{ 8 | An function for pausing the command between two chunks of 9 | demo codes. 10 | } 11 | 12 | -------------------------------------------------------------------------------- /man/renderEcharts.Rd: -------------------------------------------------------------------------------- 1 | \name{renderEcharts} 2 | \alias{renderEcharts} 3 | \title{render recharts for shiny} 4 | \usage{ 5 | renderEcharts(expr, env = parent.frame(), quoted = FALSE) 6 | } 7 | \description{ 8 | An shell function for rendering recharts. 9 | } 10 | 11 | -------------------------------------------------------------------------------- /inst/slidify/libraries/highlighters/highlight.js/highlight.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /man/recharts.shiny.init.Rd: -------------------------------------------------------------------------------- 1 | \name{recharts.shiny.init} 2 | \alias{recharts.shiny.init} 3 | \title{recharts initial for knitr} 4 | \usage{ 5 | recharts.shiny.init() 6 | } 7 | \description{ 8 | An shell function for initializing knitr. which include 9 | the script head for html output. 10 | } 11 | 12 | -------------------------------------------------------------------------------- /demo/lazyRecharts_Map.R: -------------------------------------------------------------------------------- 1 | 2 | # Line Plot 3 | require(recharts) 4 | 5 | Sys.setlocale("LC_CTYPE","chs") 6 | cityDF = read.csv(system.file( "tooltip", "cityDF.csv", package="recharts"), stringsAsFactor=F) 7 | recharts.eMap <- eMap(cityDF, namevar=1, datavar = 2, title='2008~2010 GDP Data Visulization') 8 | lazyPlot(recharts.eMap) 9 | -------------------------------------------------------------------------------- /inst/shiny/rechartsWidget.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /man/recharts.init.Rd: -------------------------------------------------------------------------------- 1 | \name{recharts.init} 2 | \alias{recharts.init} 3 | \title{recharts initial for knitr} 4 | \usage{ 5 | recharts.init() 6 | } 7 | \description{ 8 | An shell function for initializing knitr. 9 | } 10 | \details{ 11 | Only the first chuck of recharts plot needs this 12 | function, the rest chuck mustn't include this function. 13 | } 14 | 15 | -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/layouts/slide0.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | {{# slide.header }} 5 |
6 |

7 | {{{ slide.title }}} 8 |

9 |
10 | {{/ slide.header}} 11 | {{{ slide.content }}} 12 |
13 |
14 |
15 | -------------------------------------------------------------------------------- /man/eLine.Rd: -------------------------------------------------------------------------------- 1 | \name{eLine} 2 | \alias{eLine} 3 | \title{Line charts} 4 | \usage{ 5 | eLine(dat, opt = list()) 6 | } 7 | \arguments{ 8 | \item{dat}{data.frame.} 9 | 10 | \item{opt}{option of ECharts.} 11 | } 12 | \value{ 13 | The HTML code as a character string. 14 | } 15 | \description{ 16 | ECharts style line charts. 17 | } 18 | \examples{ 19 | plot(eLine(WorldPhones)) 20 | } 21 | 22 | -------------------------------------------------------------------------------- /man/eArea.Rd: -------------------------------------------------------------------------------- 1 | \name{eArea} 2 | \alias{eArea} 3 | \title{Line charts} 4 | \usage{ 5 | eArea(dat, opt = list()) 6 | } 7 | \arguments{ 8 | \item{dat}{data.frame or matrix} 9 | 10 | \item{opt}{option of ECharts.} 11 | } 12 | \value{ 13 | The HTML code as a character string. 14 | } 15 | \description{ 16 | ECharts style area charts. 17 | } 18 | \examples{ 19 | plot(eArea(WorldPhones)) 20 | } 21 | 22 | -------------------------------------------------------------------------------- /inst/shiny/recharts_shiny_pie/ui.R: -------------------------------------------------------------------------------- 1 | shinyUI(pageWithSidebar( 2 | headerPanel("recharts on Shiny server"), 3 | sidebarPanel( 4 | selectInput("YearSelector", "Choose a year:", 5 | choices = c(2011, 2012, 2013)) 6 | ), 7 | mainPanel( 8 | ### includeHTML(recharts.shiny.init()) is fatal to run apps. 9 | includeHTML(recharts.shiny.init()), 10 | htmlOutput("rechartPie") 11 | ) 12 | )) 13 | 14 | -------------------------------------------------------------------------------- /man/ePie.Rd: -------------------------------------------------------------------------------- 1 | \name{ePie} 2 | \alias{ePie} 3 | \title{Pie charts} 4 | \usage{ 5 | ePie(dat, opt = list()) 6 | } 7 | \arguments{ 8 | \item{dat}{vector, names will be treated as labels} 9 | 10 | \item{opt}{option of ECharts.} 11 | } 12 | \value{ 13 | The HTML code as a character string. 14 | } 15 | \description{ 16 | ECharts style pie charts. 17 | } 18 | \examples{ 19 | x = runif(6) 20 | names(x) = LETTERS[1:6] 21 | ePie(x) 22 | } 23 | 24 | -------------------------------------------------------------------------------- /man/plot.recharts.Rd: -------------------------------------------------------------------------------- 1 | \name{plot.recharts} 2 | \alias{plot.recharts} 3 | \title{recharts plot fucntion} 4 | \usage{ 5 | plot.recharts(x, tag = NULL, ...) 6 | } 7 | \arguments{ 8 | \item{x}{recharts plot object.} 9 | 10 | \item{tag}{whether plot the recharts object to browser or 11 | string.} 12 | 13 | \item{...}{default parameter.} 14 | } 15 | \value{ 16 | The HTML code as a character string or an html page. 17 | } 18 | \description{ 19 | An shell function for ploting of the recharts object. 20 | } 21 | 22 | -------------------------------------------------------------------------------- /man/print.recharts.Rd: -------------------------------------------------------------------------------- 1 | \name{print.recharts} 2 | \alias{print.recharts} 3 | \title{recharts print fucntion} 4 | \usage{ 5 | print.recharts(x, tag = NULL, file = "", ...) 6 | } 7 | \arguments{ 8 | \item{x}{recharts print object.} 9 | 10 | \item{tag}{whether print the recharts object to browser 11 | or string.} 12 | 13 | \item{...}{default parameter.} 14 | } 15 | \value{ 16 | The HTML code as a character string. 17 | } 18 | \description{ 19 | An shell function for printing of the recharts object. 20 | } 21 | 22 | -------------------------------------------------------------------------------- /man/ePoints.Rd: -------------------------------------------------------------------------------- 1 | \name{ePoints} 2 | \alias{ePoints} 3 | \title{Points charts} 4 | \usage{ 5 | ePoints(dat, opt = list()) 6 | } 7 | \arguments{ 8 | \item{dat}{data.frame, should have two column or three 9 | colume. If three, the third colume should be factor or 10 | character, it will be treated as category labels.} 11 | 12 | \item{opt}{option of ECharts.} 13 | } 14 | \value{ 15 | The HTML code as a character string. 16 | } 17 | \description{ 18 | ECharts style scatter charts. 19 | } 20 | \examples{ 21 | plot(ePoints(iris[,3:5])) 22 | } 23 | 24 | -------------------------------------------------------------------------------- /man/eMap.Rd: -------------------------------------------------------------------------------- 1 | \name{eMap} 2 | \alias{eMap} 3 | \title{Map charts} 4 | \usage{ 5 | eMap(dat, opt = list()) 6 | } 7 | \arguments{ 8 | \item{dat}{data.frame, rownames are province names.} 9 | 10 | \item{opt}{option of ECharts.} 11 | } 12 | \value{ 13 | The HTML code as a character string. 14 | } 15 | \description{ 16 | ECharts style map charts. Only support CHINA now. 17 | } 18 | \examples{ 19 | options(encoding="UTF-8") 20 | Sys.setlocale("LC_CTYPE","chs") 21 | load(url('http://yzhou.org/recharts/ChinaGDP.RData')) 22 | ChinaGDP 23 | plot(eMap(ChinaGDP)) 24 | } 25 | 26 | -------------------------------------------------------------------------------- /inst/shiny/recharts_shiny_football_en/test.csv: -------------------------------------------------------------------------------- 1 | "","x" 2 | "1","Cheng Zhen" 3 | "2","Zhi Yang" 4 | "3","Dalei Wang" 5 | "4","Lei Wu" 6 | "5","Ning Jiang" 7 | "6","Bo Qu" 8 | "7","Dabao Yu" 9 | "8","Hai Yu" 10 | "9","Ke Sun" 11 | "10","Lin Gao" 12 | "11","Bowen Huang" 13 | "12","Jianye Liu" 14 | "13","Zhi Zheng" 15 | "14","Xuri Zhao" 16 | "15","Xizhe Zhang" 17 | "16","Hao Yang" 18 | "17","Hanchao Yu" 19 | "18","Jingdao Jin" 20 | "19","Yongpo Wang" 21 | "20","Jian Liu" 22 | "21","Xiaoting Feng" 23 | "22","Hao Rong" 24 | "23","Xiang Sun" 25 | "24","Linpeng Zhang" 26 | "25","Xi Wu" 27 | "26","Zheng Lang" 28 | "27","Wei Du" 29 | -------------------------------------------------------------------------------- /inst/template/header.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | HEADER 7 | 8 | 9 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /inst/template/header_GBK.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | HEADER 7 | 8 | 9 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /NAMESPACE: -------------------------------------------------------------------------------- 1 | S3method("+", recharts) 2 | export(eArea) 3 | export(eBar) 4 | export(eForce) 5 | export(eLine) 6 | export(eMap) 7 | export(ePie) 8 | export(ePoints) 9 | export(eRadar) 10 | export(pause) 11 | export(plot.recharts) 12 | export(print.recharts) 13 | export(eOption) 14 | export(recharts.init) 15 | export(recharts.shiny.init) 16 | export(renderEcharts) 17 | export(is.option) 18 | export(option) 19 | export(renderEcharts) 20 | export(eCalculable) 21 | export(eLegend) 22 | export(eTooltip) 23 | export(eTitle) 24 | export(eToolbox) 25 | export(eDataRange) 26 | export(eAxis.X) 27 | export(eAxis.Y) 28 | export(ePolar) 29 | export("%+%") 30 | export("lazyPlot") 31 | export("strstrip") -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/partials/head.html: -------------------------------------------------------------------------------- 1 | {{ page.title }} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | -------------------------------------------------------------------------------- /man/eRadar.Rd: -------------------------------------------------------------------------------- 1 | \name{eRadar} 2 | \alias{eRadar} 3 | \title{Radar charts} 4 | \usage{ 5 | eRadar(dat, limit = NULL, opt = list()) 6 | } 7 | \arguments{ 8 | \item{dat}{data.frame or matrix, should have colnames and 9 | rownames.} 10 | 11 | \item{limit}{data.frame or matrix, 2 column, indicates 12 | the limit of each axis.} 13 | 14 | \item{opt}{option of ECharts.} 15 | } 16 | \value{ 17 | The HTML code as a character string. 18 | } 19 | \description{ 20 | ECharts style radar charts. 21 | } 22 | \examples{ 23 | require(plyr) 24 | dat = ddply(iris, .(Species), colwise(mean)) 25 | rownames(dat) = dat[,1] 26 | dat = dat[, -1] 27 | dat 28 | plot(eRadar(dat)) 29 | } 30 | 31 | -------------------------------------------------------------------------------- /R/lazyPlot.R: -------------------------------------------------------------------------------- 1 | 2 | #' a lazy mode for plot 3 | #' 4 | #' 5 | #' @export 6 | 7 | lazyPlot <- function(e1){ 8 | recharts_oldLocal <<- Sys.getlocale("LC_CTYPE") 9 | Sys.setlocale("LC_CTYPE", "uk") 10 | if ("recharts" %in% class(e1)){ 11 | assign("tempEchartsObject", e1, env=.GlobalEnv) 12 | library(shiny) 13 | if ("eLine" %in% class(e1) | "eArea" %in% class(e1) | "eBar" %in% class(e1) | "ePoints" %in% class(e1)){ 14 | # eLine/eArea/eBar LazyPlot. 15 | runApp(system.file("shiny","lazyPlot","eLine_Area", package = "recharts")) 16 | }else if("eMap" %in% class(e1)){ 17 | # eMap lazyPlot 18 | runApp(system.file("shiny","lazyPlot","eMap", package = "recharts")) 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /man/eBar.Rd: -------------------------------------------------------------------------------- 1 | \name{eBar} 2 | \alias{eBar} 3 | \title{Bar charts} 4 | \usage{ 5 | eBar(dat, horiz = FALSE, opt = list()) 6 | } 7 | \arguments{ 8 | \item{dat}{data.frame.} 9 | 10 | \item{horiz}{logical. If FALSE, the bars are drawn 11 | vertically with the first bar to the left. If TRUE, the 12 | bars are drawn horizontally with the first at the 13 | bottom.} 14 | 15 | \item{opt}{option of ECharts.} 16 | } 17 | \value{ 18 | The HTML code as a character string. 19 | } 20 | \description{ 21 | ECharts style bar charts. 22 | } 23 | \examples{ 24 | require(plyr) 25 | dat = ddply(iris, .(Species), colwise(mean)) 26 | rownames(dat) = dat[,1] 27 | dat = dat[, -1] 28 | dat 29 | plot(eBar(dat)) 30 | plot(eBar(dat, horiz = TRUE)) 31 | } 32 | 33 | -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/themes/ribbon/styles/print.css: -------------------------------------------------------------------------------- 1 | @page{margin:0;size:1024px 640px}.list{padding:0;background:none}.list *{-webkit-print-color-adjust:exact}.list .caption,.list .badge{display:none}.list .slide{float:none;margin:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;-o-transform:none;transform:none}.list .slide:before{display:none}.list .slide:after,.list .slide:target:after{bottom:80px;color:#CCC;text-shadow:none;line-height:18px;font-weight:normal;-webkit-transform:none;-moz-transform:none;-ms-transform:none;-o-transform:none;transform:none}.list .slide footer{display:none}.list .slide.cover,.list .slide.shout{z-index:1}.list .slide.cover:after,.list .slide.shout:after{content:''}.list .slide.cover{background:#000} 2 | -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: recharts 2 | Type: Package 3 | Title: A R Interface to ECharts 4 | Version: 0.01 5 | Author: Taiyun WEI, Yang ZHOU 6 | Depends: 7 | RJSONIO, 8 | shiny(>= 0.9.1), 9 | tools 10 | Suggests: 11 | plyr, 12 | knitr 13 | Maintainer: Taiyun Wei 14 | Description: A R Interface to ECharts 15 | License: MIT 16 | URL: https://github.com/taiyun/recharts 17 | BugReports: https://github.com/taiyun/recharts/issues 18 | VignetteBuilder: knitr 19 | Collate: 20 | 'config.R' 21 | 'eBar.R' 22 | 'eForce.R' 23 | 'eLine.R' 24 | 'eMap.R' 25 | 'ePie.R' 26 | 'ePoints.R' 27 | 'eRadar.R' 28 | 'plot.recharts.R' 29 | 'optSetUtils.R' 30 | 'utils.R' 31 | 'zzz.R' 32 | 'chartOpt.R' 33 | 'lazyPlot.R' -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # it is not really python, but there is no R support on Travis CI yet 2 | language: python 3 | 4 | # environment variables 5 | env: 6 | - R_LIBS_USER=~/R R_MY_PKG="$(basename $TRAVIS_REPO_SLUG)" 7 | 8 | # install dependencies 9 | install: 10 | - sudo apt-add-repository -y "deb http://cran.rstudio.com/bin/linux/ubuntu `lsb_release -cs`/" 11 | - sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9 12 | - sudo apt-get update 13 | - sudo apt-get install r-base-dev 14 | - "[ ! -d ~/R ] && mkdir ~/R" 15 | - Rscript -e "install.packages(c('RJSONIO', 'plyr', 'knitr', 'shiny'), dep = TRUE, repos = 'http://cran.rstudio.org')" 16 | 17 | # run tests 18 | script: 19 | - cd ..; rm -f *.tar.gz; R CMD build $R_MY_PKG 20 | - R CMD check $R_MY_PKG*.tar.gz --no-manual 21 | -------------------------------------------------------------------------------- /man/eForce.Rd: -------------------------------------------------------------------------------- 1 | \name{eForce} 2 | \alias{eForce} 3 | \title{Force network graph} 4 | \usage{ 5 | eForce(networkMatrix, propertyDf = NULL, opt = list()) 6 | } 7 | \arguments{ 8 | \item{networkMatrix}{required, a symmetric matrix, each 9 | cell value indicates the weight of the two nodes and the 10 | 0 or NA cell would not be counted in. The matrix should 11 | have colnames or rownames.} 12 | 13 | \item{propertyDf}{optional, dataframe which contain the 14 | metadata for the nodes. It could contain category, value 15 | and color columns. The colnames and rownames are 16 | required.} 17 | 18 | \item{opt}{option of ECharts.} 19 | } 20 | \value{ 21 | The HTML code as a character string. 22 | } 23 | \description{ 24 | ECharts style Force network graph visulize the social 25 | network matrix data. 26 | } 27 | \examples{ 28 | testData <- matrix(1:25, nrow=5) 29 | plot(eForce(testData)) 30 | } 31 | 32 | -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/layouts/deck.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{> head }} 5 | {{{ page.stylesheets }}} 6 | 10 | 23 | 24 | 25 |
26 |

{{{ page.title }}}

27 |
28 | {{{ page.content }}} 29 |
30 |
31 |
32 | 33 | {{> javascripts }} 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /inst/shiny/recharts_shiny_pie/server.R: -------------------------------------------------------------------------------- 1 | # server.R 2 | shinyServer(function(input, output) { 3 | library(recharts) 4 | 5 | options(shiny.transcode.json = FALSE) 6 | 7 | browserData <- data.frame( 8 | ie7 = c(600, 200, 100), 9 | ie8 = c(800, 300, 500), 10 | ie9 = c(200, 600, 800), 11 | chrome = c(400, 800, 1200), 12 | firefox = c(200, 200, 200) 13 | ) 14 | 15 | yearArray = c( 2011, 2012, 2013) 16 | 17 | datasetInput <- reactive({ 18 | selectedYear <- input$YearSelector 19 | print(selectedYear) 20 | return(browserData[which(yearArray == selectedYear),]) 21 | }) 22 | 23 | output$rechartPie <- renderEcharts({ 24 | plotArray <<- datasetInput() 25 | recharts.init() 26 | class(plotArray) <- "integer" 27 | mm <<- ePie(plotArray) 28 | mm <- mm + eTitle(title="test") 29 | mm <- mm + option(size=c(500,500)) 30 | class(mm) <- "list" 31 | return(mm) 32 | }) 33 | }) 34 | 35 | # runApp("E:/kuaipan/git/recharts/inst/shiny/recharts_shiny_pie/") 36 | 37 | -------------------------------------------------------------------------------- /inst/slidify/libraries/highlighters/highlight.js/css/ascetic.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Original style from softwaremaniacs.org (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background: white; color: black; 10 | } 11 | 12 | pre .string, 13 | pre .tag .value, 14 | pre .filter .argument, 15 | pre .addition, 16 | pre .change, 17 | pre .apache .tag, 18 | pre .apache .cbracket, 19 | pre .nginx .built_in, 20 | pre .tex .formula { 21 | color: #888; 22 | } 23 | 24 | pre .comment, 25 | pre .template_comment, 26 | pre .shebang, 27 | pre .doctype, 28 | pre .pi, 29 | pre .javadoc, 30 | pre .deletion, 31 | pre .apache .sqbracket { 32 | color: #CCC; 33 | } 34 | 35 | pre .keyword, 36 | pre .tag .title, 37 | pre .css .tag, 38 | pre .ini .title, 39 | pre .winutils, 40 | pre .flow, 41 | pre .lisp .title, 42 | pre .apache .tag, 43 | pre .tex .command, 44 | pre .http .title, 45 | pre .request, 46 | pre .status { 47 | font-weight: bold; 48 | } 49 | -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/themes/ribbon/Readme.md: -------------------------------------------------------------------------------- 1 | # Ribbon theme for Shower 2 | 3 | Default theme for [shower](https://github.com/shower/shower) engine, part of [template](https://github.com/shower/template). 4 | 5 | To see Shower in action: 6 | 7 | - Open [shwr.me](http://shwr.me/) 8 | - Click any slide to enter presentation mode 9 | - Use arrow keys to navigate 10 | - Press `Esc` to exit presentation mode 11 | 12 | See more details in Shower [readme](https://github.com/shower/shower#readme). Follow [@shower_me](http://twitter.com/shower_me/) for support and updates. Use [Issues](https://github.com/shower/shower/issues) for sharing your ideas, bugs and feature requests. 13 | 14 | **Please note** this repository is for development only. To get Shower please use [template](https://github.com/shower/template) or [shower](https://github.com/shower/shower) engine. 15 | 16 | --- 17 | Licensed under [MIT License](http://en.wikipedia.org/wiki/MIT_License), see [license page](shower/wiki/MIT-License) for details. -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/themes/ribbon/images/grid-16x10.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/themes/ribbon/styles/fonts.scss: -------------------------------------------------------------------------------- 1 | // Ribbon theme for Shower HTML presentation engine: github.com/shower/shower 2 | // Copyright © 2010–2013 Vadim Makeev, pepelsbey.net 3 | // Licensed under MIT license: github.com/shower/shower/wiki/MIT-License 4 | 5 | // PT Sans 6 | @font-face { 7 | font-family:'PT Sans'; 8 | src:url(../fonts/PTSans.woff) format('woff'); 9 | } 10 | @font-face { 11 | font-weight:bold; 12 | font-family:'PT Sans'; 13 | src:url(../fonts/PTSans.Bold.woff) format('woff'); 14 | } 15 | @font-face { 16 | font-style:italic; 17 | font-family:'PT Sans'; 18 | src:url(../fonts/PTSans.Italic.woff) format('woff'); 19 | } 20 | @font-face { 21 | font-style:italic; 22 | font-weight:bold; 23 | font-family:'PT Sans'; 24 | src:url(../fonts/PTSans.Bold.Italic.woff) format('woff'); 25 | } 26 | @font-face { 27 | font-family:'PT Sans Narrow'; 28 | font-weight:bold; 29 | src:url(../fonts/PTSans.Narrow.Bold.woff) format('woff'); 30 | } 31 | 32 | // PT Mono 33 | @font-face { 34 | font-family:'PT Mono'; 35 | src:url(../fonts/PTMono.woff) format('woff'); 36 | } -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/themes/ribbon/images/grid-4x3.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/License.txt: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright © 2010–2013 Vadim Makeev, http://pepelsbey.net/ 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /inst/template/chart.recharts.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/themes/ribbon/License.txt: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright © 2010–2013 Vadim Makeev, http://pepelsbey.net/ 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /inst/slidify/libraries/highlighters/highlight.js/css/hemisu-light.css: -------------------------------------------------------------------------------- 1 | /* Hemisu Light */ 2 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 3 | /* Original theme - http://noahfrederick.com/vim-color-scheme-hemisu/ */ 4 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 5 | .hemisu-comment, pre .comment, pre .xml .doctype, pre .html .doctype { 6 | color: #999999; 7 | } 8 | 9 | .hemisu-accent1, pre .number, pre .ruby .keyword { 10 | color: #538192; 11 | } 12 | 13 | .hemisu-accent2, pre .string, pre .regexp, pre .xml .value, pre .html .value { 14 | color: #739200; 15 | } 16 | 17 | .hemisu-accent3, pre .keyword, pre .title, pre .constant, pre .xml .tag, pre .html .tag, pre .css .rules .attribute { 18 | color: #ff0055; 19 | } 20 | 21 | .hemisu-accent4 { 22 | color: #503d15; 23 | } 24 | 25 | pre code { 26 | display: block; 27 | background: white; 28 | color: #111111; 29 | font-family: Menlo, Monaco, Consolas, monospace; 30 | line-height: 1.5; 31 | border: 1px solid #ccc; 32 | padding: 10px; 33 | } 34 | pre .xml .tag .title { 35 | color: #111111; 36 | } 37 | pre .html .tag .title { 38 | color: #111111; 39 | } -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/themes/ribbon/styles/reset.scss: -------------------------------------------------------------------------------- 1 | // http://meyerweb.com/eric/tools/css/reset/ 2 | // v2.0 | 20110126 3 | // License: none (public domain) 4 | 5 | html, body, div, span, applet, object, iframe, 6 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 7 | a, abbr, acronym, address, big, cite, code, 8 | del, dfn, em, img, ins, kbd, q, s, samp, 9 | small, strike, strong, sub, sup, tt, var, 10 | b, u, i, center, 11 | dl, dt, dd, ol, ul, li, 12 | fieldset, form, label, legend, 13 | table, caption, tbody, tfoot, thead, tr, th, td, 14 | article, aside, canvas, details, embed, 15 | figure, figcaption, footer, header, hgroup, 16 | menu, nav, output, ruby, section, summary, 17 | time, mark, audio, video { 18 | margin:0; 19 | padding:0; 20 | border:0; 21 | font-size:100%; 22 | font:inherit; 23 | vertical-align:baseline; 24 | } 25 | article, aside, details, figcaption, figure, 26 | footer, header, hgroup, menu, nav, section { 27 | display:block; 28 | } 29 | body { 30 | line-height:1; 31 | } 32 | ol, ul { 33 | list-style:none; 34 | } 35 | blockquote, q { 36 | quotes:none; 37 | } 38 | blockquote:before, blockquote:after, 39 | q:before, q:after { 40 | content:''; 41 | content:none; 42 | } 43 | table { 44 | border-collapse:collapse; 45 | border-spacing:0; 46 | } -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/themes/ribbon/styles/print.scss: -------------------------------------------------------------------------------- 1 | // Ribbon theme for Shower HTML presentation engine: github.com/shower/shower 2 | // Copyright © 2010–2013 Vadim Makeev, pepelsbey.net 3 | // Licensed under MIT license: github.com/shower/shower/wiki/MIT-License 4 | 5 | @import 'defaults.scss'; 6 | 7 | @page { 8 | margin:0; 9 | size:$width $height; 10 | } 11 | 12 | // List 13 | // ------------------------------- 14 | .list { 15 | padding:0; 16 | background:none; 17 | // Magic 18 | * { 19 | -webkit-print-color-adjust:exact; 20 | } 21 | // Caption 22 | .caption, 23 | .badge { 24 | display:none; 25 | } 26 | // Slide 27 | .slide { 28 | float:none; 29 | margin:0; 30 | -webkit-transform:none; 31 | -moz-transform:none; 32 | -ms-transform:none; 33 | -o-transform:none; 34 | transform:none; 35 | &:before { 36 | display:none; 37 | } 38 | &:after, 39 | &:target:after { 40 | bottom:80px; 41 | color:#CCC; 42 | text-shadow:none; 43 | line-height:18px; 44 | font-weight:normal; 45 | @include transform(none); 46 | } 47 | // Notes 48 | footer { 49 | display:none; 50 | } 51 | // Cover Shout 52 | &.cover, 53 | &.shout { 54 | z-index:1; 55 | &:after { 56 | content:''; 57 | } 58 | } 59 | &.cover { 60 | background:#000; 61 | } 62 | } 63 | } -------------------------------------------------------------------------------- /inst/shiny/lazyPlot/eForce/server.R: -------------------------------------------------------------------------------- 1 | # server.R 2 | shinyServer(function(input, output) { 3 | library(recharts) 4 | 5 | options(shiny.transcode.json = FALSE) 6 | 7 | datasetInput <- reactive({ 8 | #mainTitle <- input$mainTitle 9 | #subTitle <- input$subTitle 10 | #titleX <- input$titleX 11 | #titleX <- input$titleY 12 | 13 | titleSetting = list( 14 | title = input$title.title, 15 | subtitle = input$title.subtitle, 16 | x = input$title.x, 17 | y = input$title.y 18 | ) 19 | toolboxSetting = list( 20 | show = input$toolbox.show, 21 | x = input$toolbox.x, 22 | y = input$toolbox.y, 23 | orient = input$toolbox.orient, 24 | readOnly = input$toolbox.readOnly, 25 | mark = input$toolbox.mark, 26 | dataZoom = input$toolbox.dataZoom, 27 | magicType = input$toolbox.magicType, 28 | restore = input$toolbox.restore, 29 | saveAsImage = input$toolbox.saveAsImage 30 | ) 31 | return(list( 32 | titleSetting=titleSetting, 33 | toolboxSetting= toolboxSetting)) 34 | }) 35 | 36 | output$lazePlot <- renderEcharts({ 37 | recharts.init() 38 | titleSetting <<- datasetInput()$titleSetting 39 | toolboxSetting <<- datasetInput()$toolboxSetting 40 | 41 | mm <- recharts:::eTitleSet(tempEchartsObject, optionList=titleSetting) 42 | mm <- recharts:::eToolboxSet(mm, optionList=toolboxSetting) 43 | return(mm) 44 | }) 45 | }) 46 | 47 | # runApp("E:/kuaipan/git/recharts/inst/shiny/lazyPlot/") 48 | 49 | -------------------------------------------------------------------------------- /inst/shiny/lazyPlot/ePie/server.R: -------------------------------------------------------------------------------- 1 | # server.R 2 | shinyServer(function(input, output) { 3 | library(recharts) 4 | 5 | options(shiny.transcode.json = FALSE) 6 | 7 | datasetInput <- reactive({ 8 | #mainTitle <- input$mainTitle 9 | #subTitle <- input$subTitle 10 | #titleX <- input$titleX 11 | #titleX <- input$titleY 12 | 13 | titleSetting = list( 14 | title = input$title.title, 15 | subtitle = input$title.subtitle, 16 | x = input$title.x, 17 | y = input$title.y 18 | ) 19 | toolboxSetting = list( 20 | show = input$toolbox.show, 21 | x = input$toolbox.x, 22 | y = input$toolbox.y, 23 | orient = input$toolbox.orient, 24 | readOnly = input$toolbox.readOnly, 25 | mark = input$toolbox.mark, 26 | dataZoom = input$toolbox.dataZoom, 27 | magicType = input$toolbox.magicType, 28 | restore = input$toolbox.restore, 29 | saveAsImage = input$toolbox.saveAsImage 30 | ) 31 | return(list( 32 | titleSetting=titleSetting, 33 | toolboxSetting= toolboxSetting)) 34 | }) 35 | 36 | output$lazePlot <- renderEcharts({ 37 | recharts.init() 38 | titleSetting <<- datasetInput()$titleSetting 39 | toolboxSetting <<- datasetInput()$toolboxSetting 40 | 41 | mm <- recharts:::eTitleSet(tempEchartsObject, optionList=titleSetting) 42 | mm <- recharts:::eToolboxSet(mm, optionList=toolboxSetting) 43 | return(mm) 44 | }) 45 | }) 46 | 47 | # runApp("E:/kuaipan/git/recharts/inst/shiny/lazyPlot/") 48 | 49 | -------------------------------------------------------------------------------- /inst/shiny/recharts_shiny_eForce/ui.R: -------------------------------------------------------------------------------- 1 | 2 | networkMatrix <- matrix(c( 3 | c(0, 1, 2, 1, 2, 3, 6, 6, 1, 1, 1 ), 4 | c(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), 5 | c(2, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0 ), 6 | c(1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0 ), 7 | c(2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ), 8 | c(3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ), 9 | c(6, 0, 1, 1, 1, 1, 0, 6, 0, 1, 0 ), 10 | c(6, 0, 0, 1, 0, 0, 6, 0, 0, 0, 0 ), 11 | c(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), 12 | c(1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 ), 13 | c(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) 14 | ), ncol=11 15 | ) 16 | 17 | propertyDf <- data.frame( 18 | category = c("A", "B", "B", "B", "B", "C", 19 | "C", "C", "C", "C", "C"), 20 | name = c("Steven Jobs", "Lisa Jobs", "Paul Jobs", " Kalala Jobs", 21 | "Lauren Powell", "Steve woz Ike", "Obama", "Bill Gates", 22 | "Jonathan", "Tim Cook", "Wayne"), 23 | value = c(10, 2, 3, 3, 7, 5, 8, 9, 4, 4, 0) 24 | ) 25 | 26 | rownames(propertyDf) = propertyDf$name 27 | 28 | shinyUI(pageWithSidebar( 29 | headerPanel("recharts on Shiny server"), 30 | sidebarPanel( 31 | selectInput("nameList", "Choose names:", 32 | choices = rownames(propertyDf), 33 | selected = rownames(propertyDf), 34 | multiple =TRUE) 35 | ), 36 | mainPanel( 37 | ### includeHTML(recharts.shiny.init()) is fatal to run apps. 38 | includeHTML(recharts.shiny.init()), 39 | htmlOutput("rechartForce") 40 | ) 41 | )) 42 | 43 | # runApp("E:/kuaipan/recharts/recharts/inst/shiny/recharts_shiny_eForce") 44 | -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/themes/ribbon/styles/defaults.scss: -------------------------------------------------------------------------------- 1 | // Ribbon theme for Shower HTML presentation engine: github.com/shower/shower 2 | // Copyright © 2010–2013 Vadim Makeev, pepelsbey.net 3 | // Licensed under MIT license: github.com/shower/shower/wiki/MIT-License 4 | 5 | // Layout 6 | $width:1024px; // Slide width, permanent in most cases 7 | $height:640px; // Slide height, 640px for 16/10, 768px for 4/3 8 | $top:70px; // Top padding above slide content 9 | $sides:120px; // Left and right paddings around slide content 10 | $break:1324px; // Window width for small thumbnails to appear 11 | $ratio:''; 12 | 13 | // Ratio 14 | @if $height == 640px { 15 | $ratio:'16x10'; 16 | } 17 | @if $height == 768px { 18 | $ratio:'4x3'; 19 | } 20 | 21 | // Mixins 22 | @mixin retina { 23 | @media (-webkit-min-device-pixel-ratio:2), (min-resolution:192dpi) { 24 | @content; 25 | } 26 | } 27 | @mixin tab-size($n) { 28 | -moz-tab-size:$n; 29 | -o-tab-size:$n; 30 | tab-size:$n; 31 | } 32 | @mixin transform($n) { 33 | -webkit-transform:$n; 34 | -moz-transform:$n; 35 | -ms-transform:$n; 36 | -o-transform:$n; 37 | transform:$n; 38 | } 39 | @mixin transform-origin($n) { 40 | -webkit-transform-origin:$n; 41 | -moz-transform-origin:$n; 42 | -ms-transform-origin:$n; 43 | -o-transform-origin:$n; 44 | transform-origin:$n; 45 | } 46 | @mixin transition($n) { 47 | -webkit-transition:$n; 48 | -moz-transition:$n; 49 | -o-transition:$n; 50 | transition:$n; 51 | } -------------------------------------------------------------------------------- /R/zzz.R: -------------------------------------------------------------------------------- 1 | .onAttach <- function(libname, pkgname ){ 2 | 3 | 4 | ## we'd really recommended user to use Chrome browser to display the canvas charts. 5 | chrome_path = file.path(Sys.getenv("LOCALAPPDATA"), "Google\\Chrome\\Application\\chrome.exe", fsep ="\\") 6 | chrome_path_2 = file.path("C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe") 7 | chrome_path_3 = file.path("C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe") 8 | 9 | if( file.exists(chrome_path)){ 10 | options( browser = chrome_path) 11 | }else if(file.exists(chrome_path_2)){ 12 | options( browser = chrome_path_2) 13 | }else if(file.exists(chrome_path_3)){ 14 | options( browser = chrome_path_3) 15 | } 16 | 17 | 18 | ## This function are required to set option in recharts functions, 19 | 20 | #options(recharts.html5.dir = chartr("\\", "/", system.file("html5", package = "recharts"))) 21 | options(recharts.geoData.dir = chartr("\\", "/", system.file("data", package = "recharts"))) 22 | options(recharts.template.dir = chartr("\\", "/", system.file("template", package = "recharts"))) 23 | options(recharts.images.dir = chartr("\\", "/", system.file("images", package = "recharts"))) 24 | 25 | 26 | 27 | options(recharts.plot.tag=NULL) 28 | options(recharts.print.tag="html") 29 | 30 | recharts.tags <- c("type", "chartid", "html", "header", "chart", "jsHeader", "jsData", "jsDrawChart", 31 | "jsDisplayChart", "jsFooter", "jsChart", "divChart", "caption", "footer") 32 | options(recharts.tags = recharts.tags) 33 | 34 | jsLoaderFlag <<- FALSE 35 | 36 | } 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /LICENSE.TXT: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013, Baidu Inc. 2 | All rights reserved. 3 | 4 | Redistribution and use of this software in source and binary forms, with or 5 | without modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 11 | Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | Neither the name of Baidu Inc. nor the names of its contributors may be used 16 | to endorse or promote products derived from this software without specific 17 | prior written permission of Baidu Inc. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 26 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /inst/shiny/lazyPlot/ui.R: -------------------------------------------------------------------------------- 1 | 2 | shinyUI(fluidPage( 3 | titlePanel("lazy plot mode to make user to config recharts arguments online."), 4 | fluidRow( 5 | column(3, wellPanel( 6 | tabsetPanel(id = "inTabset", 7 | tabPanel("eTitle", 8 | h5("Use eTitle to config the title of graph:"), 9 | textInput("title.title", "eTitle(title=)", ""), 10 | textInput("title.subtitle", "eTitle(subtitle=)", ""), 11 | textInput("title.x", "eTitle(x=)", "left"), 12 | textInput("title.y", "eTitle(y=)", "top") 13 | ), 14 | tabPanel("eToolbox", 15 | h5("Use eToolbox to config the title of graph:"), 16 | checkboxInput("toolbox.show", "eToolbox(show=)", TRUE), 17 | textInput("toolbox.x", "eToolbox(x=)", "right"), 18 | textInput("toolbox.y", "eToolbox(y=)", "top"), 19 | selectInput("toolbox.orient", "eToolbox(orient=)", 20 | c("horizontal", "vertical")), 21 | checkboxInput("toolbox.readOnly", "eToolbox(readOnly=)", FALSE), 22 | checkboxInput("toolbox.mark", "eToolbox(mark=)", TRUE), 23 | checkboxInput("toolbox.dataZoom", "eToolbox(dataZoom=)", TRUE), 24 | checkboxInput("toolbox.magicType", "eToolbox(magicType=)", TRUE), 25 | checkboxInput("toolbox.restore", "eToolbox(restore=)", TRUE), 26 | checkboxInput("toolbox.saveAsImage", "eToolbox(saveAsImage=)", TRUE) 27 | ) 28 | ) 29 | ), 30 | submitButton("Update Graph") 31 | ), 32 | 33 | 34 | column(3, 35 | mainPanel( 36 | ### includeHTML(recharts.shiny.init()) is fatal to run apps. 37 | includeHTML(recharts.shiny.init()), 38 | htmlOutput("lazePlot"), 39 | h5(paste("output text:", "tempEchartsObject")) 40 | ) 41 | ) 42 | ))) -------------------------------------------------------------------------------- /inst/shiny/lazyPlot/eForce/ui.R: -------------------------------------------------------------------------------- 1 | 2 | shinyUI(fluidPage( 3 | titlePanel("lazy plot mode to make user to config recharts arguments online."), 4 | fluidRow( 5 | column(3, wellPanel( 6 | tabsetPanel(id = "inTabset", 7 | tabPanel("eTitle", 8 | h5("Use eTitle to config the title of graph:"), 9 | textInput("title.title", "eTitle(title=)", ""), 10 | textInput("title.subtitle", "eTitle(subtitle=)", ""), 11 | textInput("title.x", "eTitle(x=)", "left"), 12 | textInput("title.y", "eTitle(y=)", "top") 13 | ), 14 | tabPanel("eToolbox", 15 | h5("Use eToolbox to config the title of graph:"), 16 | checkboxInput("toolbox.show", "eToolbox(show=)", TRUE), 17 | textInput("toolbox.x", "eToolbox(x=)", "right"), 18 | textInput("toolbox.y", "eToolbox(y=)", "top"), 19 | selectInput("toolbox.orient", "eToolbox(orient=)", 20 | c("horizontal", "vertical")), 21 | checkboxInput("toolbox.readOnly", "eToolbox(readOnly=)", FALSE), 22 | checkboxInput("toolbox.mark", "eToolbox(mark=)", TRUE), 23 | checkboxInput("toolbox.dataZoom", "eToolbox(dataZoom=)", TRUE), 24 | checkboxInput("toolbox.magicType", "eToolbox(magicType=)", TRUE), 25 | checkboxInput("toolbox.restore", "eToolbox(restore=)", TRUE), 26 | checkboxInput("toolbox.saveAsImage", "eToolbox(saveAsImage=)", TRUE) 27 | ) 28 | ) 29 | ), 30 | submitButton("Update Graph") 31 | ), 32 | 33 | 34 | column(3, 35 | mainPanel( 36 | ### includeHTML(recharts.shiny.init()) is fatal to run apps. 37 | includeHTML(recharts.shiny.init()), 38 | htmlOutput("lazePlot"), 39 | h5(paste("output text:", "tempEchartsObject")) 40 | ) 41 | ) 42 | ))) -------------------------------------------------------------------------------- /inst/shiny/lazyPlot/ePie/ui.R: -------------------------------------------------------------------------------- 1 | 2 | shinyUI(fluidPage( 3 | titlePanel("lazy plot mode to make user to config recharts arguments online."), 4 | fluidRow( 5 | column(3, wellPanel( 6 | tabsetPanel(id = "inTabset", 7 | tabPanel("eTitle", 8 | h5("Use eTitle to config the title of graph:"), 9 | textInput("title.title", "eTitle(title=)", ""), 10 | textInput("title.subtitle", "eTitle(subtitle=)", ""), 11 | textInput("title.x", "eTitle(x=)", "left"), 12 | textInput("title.y", "eTitle(y=)", "top") 13 | ), 14 | tabPanel("eToolbox", 15 | h5("Use eToolbox to config the title of graph:"), 16 | checkboxInput("toolbox.show", "eToolbox(show=)", TRUE), 17 | textInput("toolbox.x", "eToolbox(x=)", "right"), 18 | textInput("toolbox.y", "eToolbox(y=)", "top"), 19 | selectInput("toolbox.orient", "eToolbox(orient=)", 20 | c("horizontal", "vertical")), 21 | checkboxInput("toolbox.readOnly", "eToolbox(readOnly=)", FALSE), 22 | checkboxInput("toolbox.mark", "eToolbox(mark=)", TRUE), 23 | checkboxInput("toolbox.dataZoom", "eToolbox(dataZoom=)", TRUE), 24 | checkboxInput("toolbox.magicType", "eToolbox(magicType=)", TRUE), 25 | checkboxInput("toolbox.restore", "eToolbox(restore=)", TRUE), 26 | checkboxInput("toolbox.saveAsImage", "eToolbox(saveAsImage=)", TRUE) 27 | ) 28 | ) 29 | ), 30 | submitButton("Update Graph") 31 | ), 32 | 33 | 34 | column(3, 35 | mainPanel( 36 | ### includeHTML(recharts.shiny.init()) is fatal to run apps. 37 | includeHTML(recharts.shiny.init()), 38 | htmlOutput("lazePlot"), 39 | h5(paste("output text:", "tempEchartsObject")) 40 | ) 41 | ) 42 | ))) -------------------------------------------------------------------------------- /inst/slidify/libraries/highlighters/highlight.js/css/tomorrow.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Theme */ 2 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 3 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 4 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 5 | .tomorrow-comment, pre .comment, pre .title { 6 | color: #8e908c; 7 | } 8 | 9 | .tomorrow-red, pre .variable, pre .attribute, pre .tag, pre .regexp, pre .ruby .constant, pre .xml .tag .title, pre .xml .pi, pre .xml .doctype, pre .html .doctype, pre .css .id, pre .css .class, pre .css .pseudo { 10 | color: #c82829; 11 | } 12 | 13 | .tomorrow-orange, pre .number, pre .preprocessor, pre .built_in, pre .literal, pre .params, pre .constant { 14 | color: #f5871f; 15 | } 16 | 17 | .tomorrow-yellow, pre .class, pre .ruby .class .title, pre .css .rules .attribute { 18 | color: #eab700; 19 | } 20 | 21 | .tomorrow-green, pre .string, pre .value, pre .inheritance, pre .header, pre .ruby .symbol, pre .xml .cdata { 22 | color: #718c00; 23 | } 24 | 25 | .tomorrow-aqua, pre .css .hexcolor { 26 | color: #3e999f; 27 | } 28 | 29 | .tomorrow-blue, pre .function, pre .python .decorator, pre .python .title, pre .ruby .function .title, pre .ruby .title .keyword, pre .perl .sub, pre .javascript .title, pre .coffeescript .title { 30 | color: #4271ae; 31 | } 32 | 33 | .tomorrow-purple, pre .keyword, pre .javascript .function { 34 | color: #8959a8; 35 | } 36 | 37 | pre code { 38 | display: block; 39 | background: white; 40 | color: #4d4d4c; 41 | font-family: Menlo, Monaco, Consolas, monospace; 42 | line-height: 1.5; 43 | border: 1px solid #ccc; 44 | padding: 10px; 45 | } -------------------------------------------------------------------------------- /inst/slidify/libraries/highlighters/highlight.js/css/tomorrow_night.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Night Theme */ 2 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 3 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 4 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 5 | .tomorrow-comment, pre .comment, pre .title { 6 | color: #969896; 7 | } 8 | 9 | .tomorrow-red, pre .variable, pre .attribute, pre .tag, pre .regexp, pre .ruby .constant, pre .xml .tag .title, pre .xml .pi, pre .xml .doctype, pre .html .doctype, pre .css .id, pre .css .class, pre .css .pseudo { 10 | color: #cc6666; 11 | } 12 | 13 | .tomorrow-orange, pre .number, pre .preprocessor, pre .built_in, pre .literal, pre .params, pre .constant { 14 | color: #de935f; 15 | } 16 | 17 | .tomorrow-yellow, pre .class, pre .ruby .class .title, pre .css .rules .attribute { 18 | color: #f0c674; 19 | } 20 | 21 | .tomorrow-green, pre .string, pre .value, pre .inheritance, pre .header, pre .ruby .symbol, pre .xml .cdata { 22 | color: #b5bd68; 23 | } 24 | 25 | .tomorrow-aqua, pre .css .hexcolor { 26 | color: #8abeb7; 27 | } 28 | 29 | .tomorrow-blue, pre .function, pre .python .decorator, pre .python .title, pre .ruby .function .title, pre .ruby .title .keyword, pre .perl .sub, pre .javascript .title, pre .coffeescript .title { 30 | color: #81a2be; 31 | } 32 | 33 | .tomorrow-purple, pre .keyword, pre .javascript .function { 34 | color: #b294bb; 35 | } 36 | 37 | pre code { 38 | display: block; 39 | background: #1d1f21; 40 | color: #c5c8c6; 41 | font-family: Menlo, Monaco, Consolas, monospace; 42 | line-height: 1.5; 43 | border: 1px solid #ccc; 44 | padding: 10px; 45 | } -------------------------------------------------------------------------------- /inst/slidify/libraries/highlighters/highlight.js/css/solarized_dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background: #002b36; color: #839496; 10 | } 11 | 12 | pre .comment, 13 | pre .template_comment, 14 | pre .diff .header, 15 | pre .doctype, 16 | pre .pi, 17 | pre .lisp .string, 18 | pre .javadoc { 19 | color: #586e75; 20 | font-style: italic; 21 | } 22 | 23 | pre .keyword, 24 | pre .winutils, 25 | pre .method, 26 | pre .addition, 27 | pre .css .tag, 28 | pre .request, 29 | pre .status { 30 | color: #859900; 31 | } 32 | 33 | pre .number, 34 | pre .command, 35 | pre .string, 36 | pre .tag .value, 37 | pre .phpdoc, 38 | pre .tex .formula, 39 | pre .regexp, 40 | pre .hexcolor { 41 | color: #2aa198; 42 | } 43 | 44 | pre .title, 45 | pre .localvars, 46 | pre .chunk, 47 | pre .decorator, 48 | pre .builtin, 49 | pre .built_in, 50 | pre .identifier, 51 | pre .title .keymethods, 52 | pre .vhdl .literal, 53 | pre .id { 54 | color: #268bd2; 55 | } 56 | 57 | pre .attribute, 58 | pre .variable, 59 | pre .instancevar, 60 | pre .lisp .body, 61 | pre .smalltalk .number, 62 | pre .constant, 63 | pre .class .title, 64 | pre .parent, 65 | pre .haskell .type { 66 | color: #b58900; 67 | } 68 | 69 | pre .preprocessor, 70 | pre .preprocessor .keyword, 71 | pre .shebang, 72 | pre .symbol, 73 | pre .diff .change, 74 | pre .special, 75 | pre .keymethods, 76 | pre .attr_selector, 77 | pre .important, 78 | pre .subst, 79 | pre .cdata { 80 | color: #cb4b16; 81 | } 82 | 83 | pre .deletion { 84 | color: #dc322f; 85 | } 86 | 87 | pre .tex .formula { 88 | background: #073642; 89 | } 90 | -------------------------------------------------------------------------------- /inst/slidify/libraries/highlighters/highlight.js/css/solarized_light.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background: #fdf6e3; color: #657b83; 10 | } 11 | 12 | pre .comment, 13 | pre .template_comment, 14 | pre .diff .header, 15 | pre .doctype, 16 | pre .pi, 17 | pre .lisp .string, 18 | pre .javadoc { 19 | color: #93a1a1; 20 | font-style: italic; 21 | } 22 | 23 | pre .keyword, 24 | pre .winutils, 25 | pre .method, 26 | pre .addition, 27 | pre .css .tag, 28 | pre .request, 29 | pre .status { 30 | color: #859900; 31 | } 32 | 33 | pre .number, 34 | pre .command, 35 | pre .string, 36 | pre .tag .value, 37 | pre .phpdoc, 38 | pre .tex .formula, 39 | pre .regexp, 40 | pre .hexcolor { 41 | color: #2aa198; 42 | } 43 | 44 | pre .title, 45 | pre .localvars, 46 | pre .chunk, 47 | pre .decorator, 48 | pre .builtin, 49 | pre .built_in, 50 | pre .identifier, 51 | pre .title .keymethods, 52 | pre .vhdl .literal, 53 | pre .id { 54 | color: #268bd2; 55 | } 56 | 57 | pre .attribute, 58 | pre .variable, 59 | pre .instancevar, 60 | pre .lisp .body, 61 | pre .smalltalk .number, 62 | pre .constant, 63 | pre .class .title, 64 | pre .parent, 65 | pre .haskell .type { 66 | color: #b58900; 67 | } 68 | 69 | pre .preprocessor, 70 | pre .preprocessor .keyword, 71 | pre .shebang, 72 | pre .symbol, 73 | pre .diff .change, 74 | pre .special, 75 | pre .keymethods, 76 | pre .attr_selector, 77 | pre .important, 78 | pre .subst, 79 | pre .cdata { 80 | color: #cb4b16; 81 | } 82 | 83 | pre .deletion { 84 | color: #dc322f; 85 | } 86 | 87 | pre .tex .formula { 88 | background: #eee8d5; 89 | } 90 | -------------------------------------------------------------------------------- /inst/shiny/recharts_shiny_eForce/server.R: -------------------------------------------------------------------------------- 1 | # server.R 2 | shinyServer(function(input, output) { 3 | library(recharts) 4 | 5 | options(shiny.transcode.json = FALSE) 6 | 7 | networkMatrix <- matrix(c( 8 | c(0, 1, 2, 1, 2, 3, 6, 6, 1, 1, 1 ), 9 | c(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), 10 | c(2, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0 ), 11 | c(1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0 ), 12 | c(2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ), 13 | c(3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ), 14 | c(6, 0, 1, 1, 1, 1, 0, 6, 0, 1, 0 ), 15 | c(6, 0, 0, 1, 0, 0, 6, 0, 0, 0, 0 ), 16 | c(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), 17 | c(1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 ), 18 | c(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) 19 | ), ncol=11 20 | ) 21 | 22 | propertyDf <- data.frame( 23 | category = c("A", "B", "B", "B", "B", "C", 24 | "C", "C", "C", "C", "C"), 25 | name = c("Steven Jobs", "Lisa Jobs", "Paul Jobs", " Kalala Jobs", 26 | "Lauren Powell", "Steve woz Ike", "Obama", "Bill Gates", 27 | "Jonathan", "Tim Cook", "Wayne"), 28 | value = c(10, 2, 3, 3, 7, 5, 8, 9, 4, 4, 0) 29 | ) 30 | 31 | rownames(propertyDf) = propertyDf$name 32 | 33 | datasetInput <- reactive({ 34 | selectedName <- input$nameList 35 | return(selectedName) 36 | }) 37 | 38 | output$rechartForce <- renderEcharts({ 39 | selectedName <<- datasetInput() 40 | print(selectedName) 41 | #print(networkMatrix) 42 | newMatrix <- networkMatrix[rownames(propertyDf) %in% selectedName, 43 | rownames(propertyDf) %in% selectedName] 44 | newProperDf <- propertyDf[ rownames(propertyDf) %in% selectedName,] 45 | 46 | eForceOutput <- eForce(newMatrix, newProperDf) 47 | return(eForceOutput) 48 | }) 49 | }) 50 | 51 | # runApp("E:/kuaipan/recharts/recharts/inst/shiny/recharts_shiny_eForce/") 52 | 53 | -------------------------------------------------------------------------------- /inst/slidify/libraries/highlighters/highlight.js/css/ir_black.css: -------------------------------------------------------------------------------- 1 | /* 2 | IR_Black style (c) Vasily Mikhailitchenko 3 | */ 4 | 5 | pre code { 6 | display: block; padding: 0.5em; 7 | background: #000; color: #f8f8f8; 8 | } 9 | 10 | pre .shebang, 11 | pre .comment, 12 | pre .template_comment, 13 | pre .javadoc { 14 | color: #7c7c7c; 15 | } 16 | 17 | pre .keyword, 18 | pre .tag, 19 | pre .tex .command, 20 | pre .request, 21 | pre .status { 22 | color: #96CBFE; 23 | } 24 | 25 | pre .sub .keyword, 26 | pre .method, 27 | pre .list .title { 28 | color: #FFFFB6; 29 | } 30 | 31 | pre .string, 32 | pre .tag .value, 33 | pre .cdata, 34 | pre .filter .argument, 35 | pre .attr_selector, 36 | pre .apache .cbracket, 37 | pre .date { 38 | color: #A8FF60; 39 | } 40 | 41 | pre .subst { 42 | color: #DAEFA3; 43 | } 44 | 45 | pre .regexp { 46 | color: #E9C062; 47 | } 48 | 49 | pre .title, 50 | pre .sub .identifier, 51 | pre .pi, 52 | pre .decorator, 53 | pre .tex .special, 54 | pre .haskell .type, 55 | pre .constant, 56 | pre .smalltalk .class, 57 | pre .javadoctag, 58 | pre .yardoctag, 59 | pre .phpdoc, 60 | pre .nginx .built_in { 61 | color: #FFFFB6; 62 | } 63 | 64 | pre .symbol, 65 | pre .ruby .symbol .string, 66 | pre .ruby .symbol .keyword, 67 | pre .ruby .symbol .keymethods, 68 | pre .number, 69 | pre .variable, 70 | pre .vbscript, 71 | pre .literal { 72 | color: #C6C5FE; 73 | } 74 | 75 | pre .css .tag { 76 | color: #96CBFE; 77 | } 78 | 79 | pre .css .rules .property, 80 | pre .css .id { 81 | color: #FFFFB6; 82 | } 83 | 84 | pre .css .class { 85 | color: #FFF; 86 | } 87 | 88 | pre .hexcolor { 89 | color: #C6C5FE; 90 | } 91 | 92 | pre .number { 93 | color:#FF73FD; 94 | } 95 | 96 | pre .tex .formula { 97 | opacity: 0.7; 98 | } 99 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | recharts 2 | ======== 3 | 4 | [![Build Status](https://travis-ci.org/taiyun/recharts.png)](https://travis-ci.org/taiyun/recharts) 5 | 6 | A R interface to [ECharts](https://github.com/ecomfe/echarts) for data visualization. 7 | 8 | 9 | ## Installation 10 | 11 | You can install `recharts` from github using the `devtools` package: 12 | 13 | ```s 14 | require(devtools) 15 | install_github('recharts', 'taiyun') 16 | ``` 17 | 18 | 19 | 20 | ## Examples 21 | 22 | 23 | ### Demo 24 | ```s 25 | require(recharts) 26 | demo(recharts::recharts) 27 | ``` 28 | 29 | ```s 30 | demo(recharts::recharts_shiny) 31 | ``` 32 | 33 | ```s 34 | demo(recharts::recharts_shiny_pie) 35 | ``` 36 | 37 | ### Line Plot 38 | 39 | ```s 40 | plot(eLine(iris[,1:4])) 41 | plot(eLine(iris[,1:4], opt=list(dataZoom=list(show=TRUE,end=35)))) 42 | ``` 43 | 44 | ![Line Plot](screenshots/irisLine.PNG) 45 | 46 | ![Line Zoom Plot](screenshots/irisLineZoom.PNG) 47 | 48 | ### Area Plot 49 | 50 | ```s 51 | plot(eArea(iris[,1:4])) 52 | ``` 53 | 54 | ![Area Plot](screenshots/irisArea.PNG) 55 | 56 | 57 | ### Scatter Plot 58 | 59 | ```s 60 | plot(ePoints(iris[,3:5])) 61 | ``` 62 | 63 | ![Scatter Plot](screenshots/irisPoints.PNG) 64 | 65 | 66 | ### Pie Plot 67 | 68 | ```s 69 | x = sample(4) 70 | names(x) = LETTERS[1:4] 71 | plot(ePie(x)) 72 | ``` 73 | 74 | ![Pie Plot](screenshots/xPie.PNG) 75 | 76 | 77 | ### Bar Plot 78 | 79 | 80 | ```s 81 | plot(eBar(head(iris[,1:4]))) 82 | ``` 83 | 84 | ![Bar Plot](screenshots/irisBar.PNG) 85 | 86 | 87 | ### Map 88 | 89 | ```s 90 | options(encoding="UTF-8") 91 | Sys.setlocale("LC_CTYPE","chs") 92 | load(url('http://yzhou.org/recharts/ChinaGDP.RData')) 93 | plot(eMap(ChinaGDP, opt=list(title=list(text='2008~2010年大陆各省GDP占全国百分数')))) 94 | ``` 95 | 96 | ![Map](screenshots/irisChinaMap.PNG) 97 | -------------------------------------------------------------------------------- /inst/slidify/libraries/highlighters/highlight.js/css/vs.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Visual Studio-like style based on original C# coloring by Jason Diamond 4 | 5 | */ 6 | pre code { 7 | display: block; padding: 0.5em; 8 | } 9 | 10 | pre .comment, 11 | pre .annotation, 12 | pre .template_comment, 13 | pre .diff .header, 14 | pre .chunk, 15 | pre .apache .cbracket { 16 | color: rgb(0, 128, 0); 17 | } 18 | 19 | pre .keyword, 20 | pre .id, 21 | pre .built_in, 22 | pre .smalltalk .class, 23 | pre .winutils, 24 | pre .bash .variable, 25 | pre .tex .command, 26 | pre .request, 27 | pre .status { 28 | color: rgb(0, 0, 255); 29 | } 30 | 31 | pre .string, 32 | pre .title, 33 | pre .parent, 34 | pre .tag .value, 35 | pre .rules .value, 36 | pre .rules .value .number, 37 | pre .ruby .symbol, 38 | pre .ruby .symbol .string, 39 | pre .ruby .symbol .keyword, 40 | pre .ruby .symbol .keymethods, 41 | pre .instancevar, 42 | pre .aggregate, 43 | pre .template_tag, 44 | pre .django .variable, 45 | pre .addition, 46 | pre .flow, 47 | pre .stream, 48 | pre .apache .tag, 49 | pre .date, 50 | pre .tex .formula { 51 | color: rgb(163, 21, 21); 52 | } 53 | 54 | pre .ruby .string, 55 | pre .decorator, 56 | pre .filter .argument, 57 | pre .localvars, 58 | pre .array, 59 | pre .attr_selector, 60 | pre .pseudo, 61 | pre .pi, 62 | pre .doctype, 63 | pre .deletion, 64 | pre .envvar, 65 | pre .shebang, 66 | pre .preprocessor, 67 | pre .userType, 68 | pre .apache .sqbracket, 69 | pre .nginx .built_in, 70 | pre .tex .special, 71 | pre .input_number { 72 | color: rgb(43, 145, 175); 73 | } 74 | 75 | pre .phpdoc, 76 | pre .javadoc, 77 | pre .xmlDocTag { 78 | color: rgb(128, 128, 128); 79 | } 80 | 81 | pre .vhdl .typename { font-weight: bold; } 82 | pre .vhdl .string { color: #666666; } 83 | pre .vhdl .literal { color: rgb(163, 21, 21); } 84 | pre .vhdl .attribute { color: #00B0E8; } 85 | -------------------------------------------------------------------------------- /inst/shiny/lazyPlot/server.R: -------------------------------------------------------------------------------- 1 | # server.R 2 | shinyServer(function(input, output) { 3 | library(recharts) 4 | 5 | options(shiny.transcode.json = FALSE) 6 | 7 | datasetInput <- reactive({ 8 | #mainTitle <- input$mainTitle 9 | #subTitle <- input$subTitle 10 | #titleX <- input$titleX 11 | #titleX <- input$titleY 12 | 13 | titleSetting = list( 14 | title = input$title.title, 15 | subtitle = input$title.subtitle, 16 | x = input$title.x, 17 | y = input$title.y 18 | ) 19 | toolboxSetting = list( 20 | show = input$toolbox.show, 21 | x = input$toolbox.x, 22 | y = input$toolbox.y, 23 | orient = input$toolbox.orient, 24 | readOnly = input$toolbox.readOnly, 25 | mark = input$toolbox.mark, 26 | dataZoom = input$toolbox.dataZoom, 27 | magicType = input$toolbox.magicType, 28 | restore = input$toolbox.restore, 29 | saveAsImage = input$toolbox.saveAsImage 30 | ) 31 | 32 | legendSetting = list( 33 | show = input$legend.show, 34 | x = input$legend.x, 35 | y = input$legend.y, 36 | orient = input$legend.orient, 37 | data = input$toolbox.data 38 | ) 39 | 40 | calculableSetting = list( 41 | calcuable = input$calcuable 42 | ) 43 | 44 | 45 | return(list( 46 | titleSetting =titleSetting, 47 | toolboxSetting = toolboxSetting, 48 | calculableSetting = calculableSetting, 49 | legendSetting = legendSetting 50 | )) 51 | }) 52 | 53 | output$lazePlot <- renderEcharts({ 54 | recharts.init() 55 | titleSetting <<- datasetInput()$titleSetting 56 | toolboxSetting <<- datasetInput()$toolboxSetting 57 | calculableSetting <<- datasetInput()$calculableSetting 58 | legendSetting <<- datasetInput()$legendSetting 59 | 60 | mm <- recharts:::eTitleSet(tempEchartsObject, optionList=titleSetting) 61 | mm <- recharts:::eToolboxSet(mm, optionList=toolboxSetting) 62 | mm <- recharts:::eLegendSet(mm, optionList=legendSetting) 63 | mm <- recharts:::eCalculableSet(mm, optionList=calculableSetting) 64 | return(mm) 65 | }) 66 | }) 67 | 68 | # runApp("D:/kuaipan/git/recharts/inst/shiny/lazyPlot/") 69 | 70 | -------------------------------------------------------------------------------- /inst/slidify/libraries/highlighters/highlight.js/css/pojoaque.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Pojoaque Style by Jason Tate 4 | http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html 5 | Based on Solarized Style from http://ethanschoonover.com/solarized 6 | 7 | */ 8 | 9 | pre code { 10 | display: block; padding: 0.5em; 11 | color: #DCCF8F; 12 | background: url(./pojoaque.jpg) repeat scroll left top #181914; 13 | } 14 | 15 | pre .comment, 16 | pre .template_comment, 17 | pre .diff .header, 18 | pre .doctype, 19 | pre .lisp .string, 20 | pre .javadoc { 21 | color: #586e75; 22 | font-style: italic; 23 | } 24 | 25 | pre .keyword, 26 | pre .css .rule .keyword, 27 | pre .winutils, 28 | pre .javascript .title, 29 | pre .method, 30 | pre .addition, 31 | pre .css .tag, 32 | pre .lisp .title { 33 | color: #B64926; 34 | } 35 | 36 | pre .number, 37 | pre .command, 38 | pre .string, 39 | pre .tag .value, 40 | pre .phpdoc, 41 | pre .tex .formula, 42 | pre .regexp, 43 | pre .hexcolor { 44 | color: #468966; 45 | } 46 | 47 | pre .title, 48 | pre .localvars, 49 | pre .function .title, 50 | pre .chunk, 51 | pre .decorator, 52 | pre .builtin, 53 | pre .built_in, 54 | pre .lisp .title, 55 | pre .identifier, 56 | pre .title .keymethods, 57 | pre .id { 58 | color: #FFB03B; 59 | } 60 | 61 | pre .attribute, 62 | pre .variable, 63 | pre .instancevar, 64 | pre .lisp .body, 65 | pre .smalltalk .number, 66 | pre .constant, 67 | pre .class .title, 68 | pre .parent, 69 | pre .haskell .type { 70 | color: #b58900; 71 | } 72 | 73 | pre .css .attribute { 74 | color: #b89859; 75 | } 76 | 77 | pre .css .number,pre .css .hexcolor{ 78 | color: #DCCF8F; 79 | } 80 | 81 | pre .css .class { 82 | color: #d3a60c; 83 | } 84 | 85 | pre .preprocessor, 86 | pre .pi, 87 | pre .shebang, 88 | pre .symbol, 89 | pre .diff .change, 90 | pre .special, 91 | pre .keymethods, 92 | pre .attr_selector, 93 | pre .important, 94 | pre .subst, 95 | pre .cdata { 96 | color: #cb4b16; 97 | } 98 | 99 | pre .deletion { 100 | color: #dc322f; 101 | } 102 | 103 | pre .tex .formula { 104 | background: #073642; 105 | } 106 | -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/Contributing.md: -------------------------------------------------------------------------------- 1 | # Contributing to Shower 2 | 3 | You're always welcome to contibute! There are three repositories in Shower project: 4 | 5 | - [Ribbon](https://github.com/shower/ribbon) theme for Shower 6 | - [Shower](https://github.com/shower/shower) engine with Ribbon theme 7 | - [Template](https://github.com/shower) for Shower engine and Ribbon theme 8 | 9 | The most important part of the project is the [Shower](https://github.com/shower/shower) repository, containing [shower.js](https://github.com/shower/shower/blob/master/shower.js) file. 10 | 11 | ## Issues 12 | 13 | Before starting to contribute to Shower please read through [Issues](https://github.com/shower/shower/issues?state=open) to see opened bugs and feature requests. If you have any feature to add to Shower, please make sure that you file an issue with your ideas first. If you've found a bug and want to fix it, please file an issue first. It might be a feature! 14 | 15 | 16 | ## Process 17 | 18 | To contribute to Shower fork needed repository and start making changes. Don't forget to add upstream link to original repository and keep your fork updated. When you finished send pull request back to original repository and supply clear description or link to existing issue. 19 | 20 | ## Code style 21 | 22 | Please keep existing code style while contributing to Shower and be ready for code review by Shower authors and contributors. It's strognly recommended to validate your JavaScript changes using [JSHint](http://jshint.com/). 23 | 24 | By historical reasons, Shower project is using tabs instead of spaces for code indentation. It's not a big deal to keep this rule while contributing using you code editor options, even if your code style is 13.4 spaces. 25 | 26 | ## Language 27 | 28 | English is the main language for Shower project. All discussions and commit messages should be in English no matter if it's good or bad. The second language of Shower is Russian. Offical Shower themes are always compatible with Cyrillic and Russian typography. All documentation to Shower is always localized to Russian. 29 | 30 | --- 31 | If you have any question please ask [@shower_me](http://twitter.com/shower_me/) or file an [issue](https://github.com/shower/shower/issues?state=open). -------------------------------------------------------------------------------- /inst/slidify/libraries/highlighters/highlight.js/css/dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Dark style from softwaremaniacs.org (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background: #444; 10 | } 11 | 12 | pre .keyword, 13 | pre .literal, 14 | pre .change, 15 | pre .winutils, 16 | pre .flow, 17 | pre .lisp .title, 18 | pre .tex .special { 19 | color: white; 20 | } 21 | 22 | pre code, 23 | pre .ruby .subst { 24 | color: #DDD; 25 | } 26 | 27 | pre .string, 28 | pre .title, 29 | pre .haskell .type, 30 | pre .ini .title, 31 | pre .tag .value, 32 | pre .css .rules .value, 33 | pre .preprocessor, 34 | pre .ruby .symbol, 35 | pre .ruby .symbol .string, 36 | pre .ruby .symbol .keyword, 37 | pre .ruby .symbol .keymethods, 38 | pre .ruby .instancevar, 39 | pre .ruby .class .parent, 40 | pre .built_in, 41 | pre .sql .aggregate, 42 | pre .django .template_tag, 43 | pre .django .variable, 44 | pre .smalltalk .class, 45 | pre .javadoc, 46 | pre .ruby .string, 47 | pre .django .filter .argument, 48 | pre .smalltalk .localvars, 49 | pre .smalltalk .array, 50 | pre .attr_selector, 51 | pre .pseudo, 52 | pre .addition, 53 | pre .stream, 54 | pre .envvar, 55 | pre .apache .tag, 56 | pre .apache .cbracket, 57 | pre .tex .command, 58 | pre .input_number { 59 | color: #D88; 60 | } 61 | 62 | pre .comment, 63 | pre .java .annotation, 64 | pre .python .decorator, 65 | pre .template_comment, 66 | pre .pi, 67 | pre .doctype, 68 | pre .deletion, 69 | pre .shebang, 70 | pre .apache .sqbracket, 71 | pre .tex .formula { 72 | color: #777; 73 | } 74 | 75 | pre .keyword, 76 | pre .literal, 77 | pre .title, 78 | pre .css .id, 79 | pre .phpdoc, 80 | pre .haskell .type, 81 | pre .vbscript .built_in, 82 | pre .sql .aggregate, 83 | pre .rsl .built_in, 84 | pre .smalltalk .class, 85 | pre .diff .header, 86 | pre .chunk, 87 | pre .winutils, 88 | pre .bash .variable, 89 | pre .apache .tag, 90 | pre .tex .special, 91 | pre .request, 92 | pre .status { 93 | font-weight: bold; 94 | } 95 | 96 | pre .coffeescript .javascript, 97 | pre .xml .css, 98 | pre .xml .javascript, 99 | pre .xml .vbscript, 100 | pre .tex .formula { 101 | opacity: 0.5; 102 | } 103 | -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/themes/ribbon/Contributing.md: -------------------------------------------------------------------------------- 1 | # Contributing to Shower 2 | 3 | You're always welcome to contibute! There are three repositories in Shower project: 4 | 5 | - [Ribbon](https://github.com/shower/ribbon) theme for Shower 6 | - [Shower](https://github.com/shower/shower) engine with Ribbon theme 7 | - [Template](https://github.com/shower) for Shower engine and Ribbon theme 8 | 9 | The most important part of the project is the [Shower](https://github.com/shower/shower) repository, containing [shower.js](https://github.com/shower/shower/blob/master/shower.js) file. 10 | 11 | ## Issues 12 | 13 | Before starting to contribute to Shower please read through [Issues](https://github.com/shower/shower/issues?state=open) to see opened bugs and feature requests. If you have any feature to add to Shower, please make sure that you file an issue with your ideas first. If you've found a bug and want to fix it, please file an issue first. It might be a feature! 14 | 15 | 16 | ## Process 17 | 18 | To contribute to Shower fork needed repository and start making changes. Don't forget to add upstream link to original repository and keep your fork updated. When you finished send pull request back to original repository and supply clear description or link to existing issue. 19 | 20 | ## Code style 21 | 22 | Please keep existing code style while contributing to Shower and be ready for code review by Shower authors and contributors. It's strognly recommended to validate your JavaScript changes using [JSHint](http://jshint.com/) 23 | 24 | By historical reasons, Shower project is using tabs instead of spaces for code indentation. It's not a big deal to keep this rule while contributing using you code editor options, even if your code style is 13.4 spaces. 25 | 26 | ## Language 27 | 28 | English is the main language for Shower project. All discussions and commit messages should be in English no matter if it's good or bad. The second language of Shower is Russian. Offical Shower themes are always compatible with Cyrillic and Russian typography. All documentation to Shower is always localized to Russian. 29 | 30 | --- 31 | If you have any question please ask [@shower_me](http://twitter.com/shower_me/) or file an [issue](https://github.com/shower/shower/issues?state=open). -------------------------------------------------------------------------------- /inst/slidify/libraries/highlighters/highlight.js/css/brown_paper.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Brown Paper style from goldblog.com.ua (c) Zaripov Yura 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background:#b7a68e url(./brown_papersq.png); 10 | } 11 | 12 | pre .keyword, 13 | pre .literal, 14 | pre .change, 15 | pre .winutils, 16 | pre .flow, 17 | pre .lisp .title, 18 | pre .tex .special, 19 | pre .request, 20 | pre .status { 21 | color:#005599; 22 | font-weight:bold; 23 | } 24 | 25 | pre code, 26 | pre .ruby .subst, 27 | pre .tag .keyword { 28 | color: #363C69; 29 | } 30 | 31 | pre .string, 32 | pre .title, 33 | pre .haskell .type, 34 | pre .tag .value, 35 | pre .css .rules .value, 36 | pre .preprocessor, 37 | pre .ruby .symbol, 38 | pre .ruby .symbol .string, 39 | pre .ruby .symbol .keyword, 40 | pre .ruby .symbol .keymethods, 41 | pre .ruby .instancevar, 42 | pre .ruby .class .parent, 43 | pre .built_in, 44 | pre .sql .aggregate, 45 | pre .django .template_tag, 46 | pre .django .variable, 47 | pre .smalltalk .class, 48 | pre .javadoc, 49 | pre .ruby .string, 50 | pre .django .filter .argument, 51 | pre .smalltalk .localvars, 52 | pre .smalltalk .array, 53 | pre .attr_selector, 54 | pre .pseudo, 55 | pre .addition, 56 | pre .stream, 57 | pre .envvar, 58 | pre .apache .tag, 59 | pre .apache .cbracket, 60 | pre .tex .number { 61 | color: #2C009F; 62 | } 63 | 64 | pre .comment, 65 | pre .java .annotation, 66 | pre .python .decorator, 67 | pre .template_comment, 68 | pre .pi, 69 | pre .doctype, 70 | pre .deletion, 71 | pre .shebang, 72 | pre .apache .sqbracket, 73 | pre .nginx .built_in, 74 | pre .tex .formula { 75 | color: #802022; 76 | } 77 | 78 | pre .keyword, 79 | pre .literal, 80 | pre .css .id, 81 | pre .phpdoc, 82 | pre .title, 83 | pre .haskell .type, 84 | pre .vbscript .built_in, 85 | pre .sql .aggregate, 86 | pre .rsl .built_in, 87 | pre .smalltalk .class, 88 | pre .diff .header, 89 | pre .chunk, 90 | pre .winutils, 91 | pre .bash .variable, 92 | pre .apache .tag, 93 | pre .tex .command { 94 | font-weight: bold; 95 | } 96 | 97 | pre .coffeescript .javascript, 98 | pre .xml .css, 99 | pre .xml .javascript, 100 | pre .xml .vbscript, 101 | pre .tex .formula { 102 | opacity: 0.8; 103 | } 104 | -------------------------------------------------------------------------------- /inst/slidify/libraries/highlighters/highlight.js/css/idea.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Intellij Idea-like styling (c) Vasily Polovnyov 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | color: #000; 10 | background: #fff; 11 | } 12 | 13 | pre .subst, 14 | pre .title { 15 | font-weight: normal; 16 | color: #000; 17 | } 18 | 19 | pre .comment, 20 | pre .template_comment, 21 | pre .javadoc, 22 | pre .diff .header { 23 | color: #808080; 24 | font-style: italic; 25 | } 26 | 27 | pre .annotation, 28 | pre .decorator, 29 | pre .preprocessor, 30 | pre .doctype, 31 | pre .pi, 32 | pre .chunk, 33 | pre .shebang, 34 | pre .apache .cbracket, 35 | pre .input_number, 36 | pre .http .title { 37 | color: #808000; 38 | } 39 | 40 | pre .tag, 41 | pre .pi { 42 | background: #efefef; 43 | } 44 | 45 | pre .tag .title, 46 | pre .id, 47 | pre .attr_selector, 48 | pre .pseudo, 49 | pre .literal, 50 | pre .keyword, 51 | pre .hexcolor, 52 | pre .css .function, 53 | pre .ini .title, 54 | pre .css .class, 55 | pre .list .title, 56 | pre .tex .command, 57 | pre .request, 58 | pre .status { 59 | font-weight: bold; 60 | color: #000080; 61 | } 62 | 63 | pre .attribute, 64 | pre .rules .keyword, 65 | pre .number, 66 | pre .date, 67 | pre .regexp, 68 | pre .tex .special { 69 | font-weight: bold; 70 | color: #0000ff; 71 | } 72 | 73 | pre .number, 74 | pre .regexp { 75 | font-weight: normal; 76 | } 77 | 78 | pre .string, 79 | pre .value, 80 | pre .filter .argument, 81 | pre .css .function .params, 82 | pre .apache .tag { 83 | color: #008000; 84 | font-weight: bold; 85 | } 86 | 87 | pre .symbol, 88 | pre .ruby .symbol .string, 89 | pre .ruby .symbol .keyword, 90 | pre .ruby .symbol .keymethods, 91 | pre .char, 92 | pre .tex .formula { 93 | color: #000; 94 | background: #d0eded; 95 | font-style: italic; 96 | } 97 | 98 | pre .phpdoc, 99 | pre .yardoctag, 100 | pre .javadoctag { 101 | text-decoration: underline; 102 | } 103 | 104 | pre .variable, 105 | pre .envvar, 106 | pre .apache .sqbracket, 107 | pre .nginx .built_in { 108 | color: #660e7a; 109 | } 110 | 111 | pre .addition { 112 | background: #baeeba; 113 | } 114 | 115 | pre .deletion { 116 | background: #ffc8bd; 117 | } 118 | 119 | pre .diff .change { 120 | background: #bccff9; 121 | } 122 | -------------------------------------------------------------------------------- /inst/slidify/libraries/highlighters/highlight.js/css/far.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | FAR Style (c) MajestiC 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background: #000080; 10 | } 11 | 12 | pre code, 13 | .ruby .subst { 14 | color: #0FF; 15 | } 16 | 17 | pre .string, 18 | pre .ruby .string, 19 | pre .haskell .type, 20 | pre .tag .value, 21 | pre .css .rules .value, 22 | pre .css .rules .value .number, 23 | pre .preprocessor, 24 | pre .ruby .symbol, 25 | pre .ruby .symbol .string, 26 | pre .ruby .symbol .keyword, 27 | pre .ruby .symbol .keymethods, 28 | pre .built_in, 29 | pre .sql .aggregate, 30 | pre .django .template_tag, 31 | pre .django .variable, 32 | pre .smalltalk .class, 33 | pre .addition, 34 | pre .apache .tag, 35 | pre .apache .cbracket, 36 | pre .tex .command { 37 | color: #FF0; 38 | } 39 | 40 | pre .keyword, 41 | pre .css .id, 42 | pre .title, 43 | pre .haskell .type, 44 | pre .vbscript .built_in, 45 | pre .sql .aggregate, 46 | pre .rsl .built_in, 47 | pre .smalltalk .class, 48 | pre .xml .tag .title, 49 | pre .winutils, 50 | pre .flow, 51 | pre .change, 52 | pre .envvar, 53 | pre .bash .variable, 54 | pre .tex .special { 55 | color: #FFF; 56 | } 57 | 58 | pre .comment, 59 | pre .phpdoc, 60 | pre .javadoc, 61 | pre .java .annotation, 62 | pre .template_comment, 63 | pre .deletion, 64 | pre .apache .sqbracket, 65 | pre .tex .formula { 66 | color: #888; 67 | } 68 | 69 | pre .number, 70 | pre .date, 71 | pre .regexp, 72 | pre .literal, 73 | pre .smalltalk .symbol, 74 | pre .smalltalk .char { 75 | color: #0F0; 76 | } 77 | 78 | pre .python .decorator, 79 | pre .django .filter .argument, 80 | pre .smalltalk .localvars, 81 | pre .smalltalk .array, 82 | pre .attr_selector, 83 | pre .pseudo, 84 | pre .xml .pi, 85 | pre .diff .header, 86 | pre .chunk, 87 | pre .shebang, 88 | pre .nginx .built_in, 89 | pre .input_number { 90 | color: #008080; 91 | } 92 | 93 | pre .keyword, 94 | pre .css .id, 95 | pre .title, 96 | pre .haskell .type, 97 | pre .vbscript .built_in, 98 | pre .sql .aggregate, 99 | pre .rsl .built_in, 100 | pre .smalltalk .class, 101 | pre .winutils, 102 | pre .flow, 103 | pre .apache .tag, 104 | pre .nginx .built_in, 105 | pre .tex .command, 106 | pre .tex .special, 107 | pre .request, 108 | pre .status { 109 | font-weight: bold; 110 | } 111 | -------------------------------------------------------------------------------- /inst/slidify/libraries/highlighters/highlight.js/css/monokai.css: -------------------------------------------------------------------------------- 1 | /* 2 | Monokai style - ported by Luigi Maselli - http://grigio.org 3 | */ 4 | 5 | pre code { 6 | display: block; padding: 0.5em; 7 | background: #272822; 8 | } 9 | 10 | pre .params .identifier .keymethods { 11 | color: #FD971F; 12 | } 13 | 14 | pre .tag, 15 | pre .tag .title, 16 | pre .keyword, 17 | pre .literal, 18 | pre .change, 19 | pre .winutils, 20 | pre .flow, 21 | pre .lisp .title, 22 | pre .tex .special { 23 | color: #F92672; 24 | } 25 | 26 | pre code { 27 | color: #DDD; 28 | } 29 | 30 | pre code .constant { 31 | color: #66D9EF; 32 | } 33 | 34 | pre .class .title { 35 | color: white; 36 | } 37 | 38 | pre .attribute, 39 | pre .symbol, 40 | pre .value, 41 | pre .regexp { 42 | color: #BF79DB; 43 | } 44 | 45 | pre .tag .value, 46 | pre .string, 47 | pre .ruby .subst, 48 | pre .title, 49 | pre .haskell .type, 50 | pre .preprocessor, 51 | pre .ruby .instancevar, 52 | pre .ruby .class .parent, 53 | pre .built_in, 54 | pre .sql .aggregate, 55 | pre .django .template_tag, 56 | pre .django .variable, 57 | pre .smalltalk .class, 58 | pre .javadoc, 59 | pre .ruby .string, 60 | pre .django .filter .argument, 61 | pre .smalltalk .localvars, 62 | pre .smalltalk .array, 63 | pre .attr_selector, 64 | pre .pseudo, 65 | pre .addition, 66 | pre .stream, 67 | pre .envvar, 68 | pre .apache .tag, 69 | pre .apache .cbracket, 70 | pre .tex .command, 71 | pre .input_number { 72 | color: #A6E22E; 73 | } 74 | 75 | pre .comment, 76 | pre .java .annotation, 77 | pre .python .decorator, 78 | pre .template_comment, 79 | pre .pi, 80 | pre .doctype, 81 | pre .deletion, 82 | pre .shebang, 83 | pre .apache .sqbracket, 84 | pre .tex .formula { 85 | color: #75715E; 86 | } 87 | 88 | pre .keyword, 89 | pre .literal, 90 | pre .css .id, 91 | pre .phpdoc, 92 | pre .title, 93 | pre .haskell .type, 94 | pre .vbscript .built_in, 95 | pre .sql .aggregate, 96 | pre .rsl .built_in, 97 | pre .smalltalk .class, 98 | pre .diff .header, 99 | pre .chunk, 100 | pre .winutils, 101 | pre .bash .variable, 102 | pre .apache .tag, 103 | pre .tex .special, 104 | pre .request, 105 | pre .status { 106 | font-weight: bold; 107 | } 108 | 109 | pre .coffeescript .javascript, 110 | pre .xml .css, 111 | pre .xml .javascript, 112 | pre .xml .vbscript, 113 | pre .tex .formula { 114 | opacity: 0.5; 115 | } 116 | -------------------------------------------------------------------------------- /inst/slidify/libraries/highlighters/highlight.js/css/zenburn.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Zenburn style from voldmar.ru (c) Vladimir Epifanov 4 | based on dark.css by Ivan Sagalaev 5 | 6 | */ 7 | 8 | pre code { 9 | display: block; padding: 0.5em; 10 | background: #3F3F3F; 11 | color: #DCDCDC; 12 | } 13 | 14 | pre .keyword, 15 | pre .tag, 16 | pre .css .class, 17 | pre .css .id, 18 | pre .lisp .title, 19 | pre .request, 20 | pre .status { 21 | color: #E3CEAB; 22 | } 23 | 24 | pre .django .template_tag, 25 | pre .django .variable, 26 | pre .django .filter .argument { 27 | color: #DCDCDC; 28 | } 29 | 30 | pre .number, 31 | pre .date { 32 | color: #8CD0D3; 33 | } 34 | 35 | pre .dos .envvar, 36 | pre .dos .stream, 37 | pre .variable, 38 | pre .apache .sqbracket { 39 | color: #EFDCBC; 40 | } 41 | 42 | pre .dos .flow, 43 | pre .diff .change, 44 | pre .python .exception, 45 | pre .python .built_in, 46 | pre .literal, 47 | pre .tex .special { 48 | color: #EFEFAF; 49 | } 50 | 51 | pre .diff .chunk, 52 | pre .ruby .subst { 53 | color: #8F8F8F; 54 | } 55 | 56 | pre .dos .keyword, 57 | pre .python .decorator, 58 | pre .title, 59 | pre .haskell .type, 60 | pre .diff .header, 61 | pre .ruby .class .parent, 62 | pre .apache .tag, 63 | pre .nginx .built_in, 64 | pre .tex .command, 65 | pre .input_number { 66 | color: #efef8f; 67 | } 68 | 69 | pre .dos .winutils, 70 | pre .ruby .symbol, 71 | pre .ruby .symbol .string, 72 | pre .ruby .symbol .keyword, 73 | pre .ruby .symbol .keymethods, 74 | pre .ruby .string, 75 | pre .ruby .instancevar { 76 | color: #DCA3A3; 77 | } 78 | 79 | pre .diff .deletion, 80 | pre .string, 81 | pre .tag .value, 82 | pre .preprocessor, 83 | pre .built_in, 84 | pre .sql .aggregate, 85 | pre .javadoc, 86 | pre .smalltalk .class, 87 | pre .smalltalk .localvars, 88 | pre .smalltalk .array, 89 | pre .css .rules .value, 90 | pre .attr_selector, 91 | pre .pseudo, 92 | pre .apache .cbracket, 93 | pre .tex .formula { 94 | color: #CC9393; 95 | } 96 | 97 | pre .shebang, 98 | pre .diff .addition, 99 | pre .comment, 100 | pre .java .annotation, 101 | pre .template_comment, 102 | pre .pi, 103 | pre .doctype { 104 | color: #7F9F7F; 105 | } 106 | 107 | pre .coffeescript .javascript, 108 | pre .xml .css, 109 | pre .xml .javascript, 110 | pre .xml .vbscript, 111 | pre .tex .formula { 112 | opacity: 0.5; 113 | } 114 | 115 | -------------------------------------------------------------------------------- /inst/slidify/libraries/highlighters/highlight.js/css/github.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | github.com style (c) Vasily Polovnyov 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | color: #000; 10 | background: #f8f8ff 11 | } 12 | 13 | pre .comment, 14 | pre .template_comment, 15 | pre .diff .header, 16 | pre .javadoc { 17 | color: #998; 18 | font-style: italic 19 | } 20 | 21 | pre .keyword, 22 | pre .css .rule .keyword, 23 | pre .winutils, 24 | pre .javascript .title, 25 | pre .lisp .title, 26 | pre .subst, 27 | pre .request, 28 | pre .status { 29 | color: #000; 30 | font-weight: bold 31 | } 32 | 33 | pre .number, 34 | pre .hexcolor { 35 | color: #40a070 36 | } 37 | 38 | pre .string, 39 | pre .tag .value, 40 | pre .phpdoc, 41 | pre .tex .formula { 42 | color: #d14 43 | } 44 | 45 | pre .title, 46 | pre .id { 47 | color: #900; 48 | font-weight: bold 49 | } 50 | 51 | pre .javascript .title, 52 | pre .lisp .title, 53 | pre .subst { 54 | font-weight: normal 55 | } 56 | 57 | pre .class .title, 58 | pre .haskell .type, 59 | pre .vhdl .literal, 60 | pre .tex .command { 61 | color: #458; 62 | font-weight: bold 63 | } 64 | 65 | pre .tag, 66 | pre .tag .title, 67 | pre .rules .property, 68 | pre .django .tag .keyword { 69 | color: #000080; 70 | font-weight: normal 71 | } 72 | 73 | pre .attribute, 74 | pre .variable, 75 | pre .instancevar, 76 | pre .lisp .body { 77 | color: #008080 78 | } 79 | 80 | pre .regexp { 81 | color: #009926 82 | } 83 | 84 | pre .class { 85 | color: #458; 86 | font-weight: bold 87 | } 88 | 89 | pre .symbol, 90 | pre .ruby .symbol .string, 91 | pre .ruby .symbol .keyword, 92 | pre .ruby .symbol .keymethods, 93 | pre .lisp .keyword, 94 | pre .tex .special, 95 | pre .input_number { 96 | color: #990073 97 | } 98 | 99 | pre .builtin, 100 | pre .built_in, 101 | pre .lisp .title { 102 | color: #0086b3 103 | } 104 | 105 | pre .preprocessor, 106 | pre .pi, 107 | pre .doctype, 108 | pre .shebang, 109 | pre .cdata { 110 | color: #999; 111 | font-weight: bold 112 | } 113 | 114 | pre .deletion { 115 | background: #fdd 116 | } 117 | 118 | pre .addition { 119 | background: #dfd 120 | } 121 | 122 | pre .diff .change { 123 | background: #0086b3 124 | } 125 | 126 | pre .chunk { 127 | color: #aaa 128 | } 129 | 130 | pre .tex .formula { 131 | opacity: 0.5; 132 | } 133 | -------------------------------------------------------------------------------- /inst/slidify/libraries/highlighters/highlight.js/css/magula.css: -------------------------------------------------------------------------------- 1 | /* 2 | Description: Magula style for highligh.js 3 | Author: Ruslan Keba 4 | Website: http://rukeba.com/ 5 | Version: 1.0 6 | Date: 2009-01-03 7 | Music: Aphex Twin / Xtal 8 | */ 9 | 10 | pre code { 11 | display: block; padding: 0.5em; 12 | background-color: #f4f4f4; 13 | } 14 | 15 | pre code, 16 | pre .ruby .subst, 17 | pre .lisp .title { 18 | color: black; 19 | } 20 | 21 | pre .string, 22 | pre .title, 23 | pre .parent, 24 | pre .tag .value, 25 | pre .rules .value, 26 | pre .rules .value .number, 27 | pre .preprocessor, 28 | pre .ruby .symbol, 29 | pre .ruby .symbol .string, 30 | pre .ruby .symbol .keyword, 31 | pre .ruby .symbol .keymethods, 32 | pre .instancevar, 33 | pre .aggregate, 34 | pre .template_tag, 35 | pre .django .variable, 36 | pre .smalltalk .class, 37 | pre .addition, 38 | pre .flow, 39 | pre .stream, 40 | pre .bash .variable, 41 | pre .apache .cbracket { 42 | color: #050; 43 | } 44 | 45 | pre .comment, 46 | pre .annotation, 47 | pre .template_comment, 48 | pre .diff .header, 49 | pre .chunk { 50 | color: #777; 51 | } 52 | 53 | pre .number, 54 | pre .date, 55 | pre .regexp, 56 | pre .literal, 57 | pre .smalltalk .symbol, 58 | pre .smalltalk .char, 59 | pre .change, 60 | pre .tex .special { 61 | color: #800; 62 | } 63 | 64 | pre .label, 65 | pre .javadoc, 66 | pre .ruby .string, 67 | pre .decorator, 68 | pre .filter .argument, 69 | pre .localvars, 70 | pre .array, 71 | pre .attr_selector, 72 | pre .pseudo, 73 | pre .pi, 74 | pre .doctype, 75 | pre .deletion, 76 | pre .envvar, 77 | pre .shebang, 78 | pre .apache .sqbracket, 79 | pre .nginx .built_in, 80 | pre .tex .formula, 81 | pre .input_number { 82 | color: #00e; 83 | } 84 | 85 | pre .keyword, 86 | pre .id, 87 | pre .phpdoc, 88 | pre .title, 89 | pre .built_in, 90 | pre .aggregate, 91 | pre .smalltalk .class, 92 | pre .winutils, 93 | pre .bash .variable, 94 | pre .apache .tag, 95 | pre .xml .tag, 96 | pre .tex .command, 97 | pre .request, 98 | pre .status { 99 | font-weight: bold; 100 | color: navy; 101 | } 102 | 103 | pre .nginx .built_in { 104 | font-weight: normal; 105 | } 106 | 107 | pre .coffeescript .javascript, 108 | pre .xml .css, 109 | pre .xml .javascript, 110 | pre .xml .vbscript, 111 | pre .tex .formula { 112 | opacity: 0.5; 113 | } 114 | 115 | /* --- */ 116 | pre .apache .tag { 117 | font-weight: bold; 118 | color: blue; 119 | } 120 | 121 | -------------------------------------------------------------------------------- /inst/slidify/libraries/highlighters/highlight.js/css/school_book.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | School Book style from goldblog.com.ua (c) Zaripov Yura 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 15px 0.5em 0.5em 30px; 9 | font-size: 11px !important; 10 | line-height:16px !important; 11 | } 12 | 13 | pre{ 14 | background:#f6f6ae url(./school_book.png); 15 | border-top: solid 2px #d2e8b9; 16 | border-bottom: solid 1px #d2e8b9; 17 | } 18 | 19 | pre .keyword, 20 | pre .literal, 21 | pre .change, 22 | pre .winutils, 23 | pre .flow, 24 | pre .lisp .title, 25 | pre .tex .special { 26 | color:#005599; 27 | font-weight:bold; 28 | } 29 | 30 | pre code, 31 | pre .ruby .subst, 32 | pre .tag .keyword { 33 | color: #3E5915; 34 | } 35 | 36 | pre .string, 37 | pre .title, 38 | pre .haskell .type, 39 | pre .tag .value, 40 | pre .css .rules .value, 41 | pre .preprocessor, 42 | pre .ruby .symbol, 43 | pre .ruby .symbol .string, 44 | pre .ruby .symbol .keyword, 45 | pre .ruby .symbol .keymethods, 46 | pre .ruby .instancevar, 47 | pre .ruby .class .parent, 48 | pre .built_in, 49 | pre .sql .aggregate, 50 | pre .django .template_tag, 51 | pre .django .variable, 52 | pre .smalltalk .class, 53 | pre .javadoc, 54 | pre .ruby .string, 55 | pre .django .filter .argument, 56 | pre .smalltalk .localvars, 57 | pre .smalltalk .array, 58 | pre .attr_selector, 59 | pre .pseudo, 60 | pre .addition, 61 | pre .stream, 62 | pre .envvar, 63 | pre .apache .tag, 64 | pre .apache .cbracket, 65 | pre .nginx .built_in, 66 | pre .tex .command { 67 | color: #2C009F; 68 | } 69 | 70 | pre .comment, 71 | pre .java .annotation, 72 | pre .python .decorator, 73 | pre .template_comment, 74 | pre .pi, 75 | pre .doctype, 76 | pre .deletion, 77 | pre .shebang, 78 | pre .apache .sqbracket { 79 | color: #E60415; 80 | } 81 | 82 | pre .keyword, 83 | pre .literal, 84 | pre .css .id, 85 | pre .phpdoc, 86 | pre .title, 87 | pre .haskell .type, 88 | pre .vbscript .built_in, 89 | pre .sql .aggregate, 90 | pre .rsl .built_in, 91 | pre .smalltalk .class, 92 | pre .xml .tag .title, 93 | pre .diff .header, 94 | pre .chunk, 95 | pre .winutils, 96 | pre .bash .variable, 97 | pre .apache .tag, 98 | pre .tex .command, 99 | pre .request, 100 | pre .status { 101 | font-weight: bold; 102 | } 103 | 104 | pre .coffeescript .javascript, 105 | pre .xml .css, 106 | pre .xml .javascript, 107 | pre .xml .vbscript, 108 | pre .tex .formula { 109 | opacity: 0.5; 110 | } 111 | -------------------------------------------------------------------------------- /R/config.R: -------------------------------------------------------------------------------- 1 | configHtml = function(opt, outfile, jsdir, style) { 2 | 3 | 4 | id = paste('ID', format(Sys.time(), "%Y%m%d%H%M%S"), proc.time()[3]*100, sep="_") 5 | Sys.sleep(0.02) 6 | 7 | if(is.null(jsdir)) { 8 | jsdir = 'http://echarts.baidu.com/build/dist' 9 | } 10 | 11 | jsdir = gsub('/$', '', jsdir) 12 | eJS = paste(jsdir, 'echarts-map', sep = '/') 13 | esl = paste(jsdir, 'echarts.js', sep = '/') 14 | 15 | 16 | echartsIn = " 17 |
18 | 19 | 47 | " 48 | 49 | echartsOut = echartsIn 50 | 51 | echartsOut = gsub("ID", id, echartsOut) 52 | echartsOut = gsub("eJS", eJS, echartsOut) 53 | echartsOut = gsub("STYLE", style, echartsOut) 54 | echartsOut = gsub("OPT", opt, echartsOut) 55 | 56 | 57 | if(outfile==FALSE) { 58 | cat(echartsOut) 59 | return(echartsOut) 60 | } 61 | 62 | head = " 63 | 64 | 65 | 66 | 67 | ECharts 68 | 69 | 70 | 71 | 72 | 73 | " 74 | foot = " 75 | 76 | 77 | " 78 | head = gsub('esl', esl, head) 79 | echartsOut = paste(head, echartsOut, foot, sep='\n\n\n') 80 | 81 | 82 | outfile = ifelse(is.character(outfile), outfile, id) 83 | outfile = gsub('.html$', '', outfile) 84 | outfile = paste(outfile, '.html' , sep='') 85 | cat(echartsOut, file=outfile) 86 | browseURL(outfile) 87 | cat(paste('Out file: ', '"', getwd(), '/', outfile, '"', '.\n', sep='')) 88 | } 89 | 90 | 91 | unnames = function(x){ 92 | names(x) = NULL 93 | return(x) 94 | } -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/Readme.md: -------------------------------------------------------------------------------- 1 | # Shower 2 | 3 | HTML presentation engine. Follow [@shower_me](http://twitter.com/shower_me/) for support and updates. 4 | 5 | To see Shower in action: 6 | 7 | - Open [shwr.me](http://shwr.me/) 8 | - Click any slide to enter presentation mode 9 | - Use arrow keys to navigate 10 | - Press `Esc` to exit presentation mode 11 | 12 | See more details on [using keyboard](shower/wiki/Shortcuts) to control Shower. 13 | 14 | ## Using Shower 15 | 16 | There are two ways of using Shower: you can get full template [ZIP 1.4 MB](http://shwr.me/template.zip) or just an engine [ZIP 650 KB](http://shwr.me/shower.zip). See more details for beginners and advanced techniques in [Quick Start](shower/wiki/Quick-Start) instructions. 17 | 18 | ## Printing to PDF 19 | 20 | You can print your presentation to PDF using Google Chrome “Print to PDF” option in print dialog, [wkhtmltopdf](http://code.google.com/p/wkhtmltopdf) or [Prince](http://princexml.com). Print styles should be supplied to a theme for proper results. Please see [print styles](https://github.com/shower/ribbon/blob/master/styles/print.scss) for the Ribbon theme as example. 21 | 22 | Example of Shower template printed by Prince: [PDF 435 KB](https://github.com/shower/template/blob/master/index.pdf?raw=true). See more detais on printing in [documentation](shower/wiki/Print). 23 | 24 | ## Usage examples 25 | 26 | - [Clear and Sharp](http://pepelsbey.net/pres/clear-and-sharp/) 27 | - [CSS Management](http://pepelsbey.net/pres/css-management/) 28 | - [Push it!](http://pepelsbey.net/pres/push-it/) 29 | - [Pre-fixes](http://pepelsbey.net/pres/pre-fixes/) 30 | - [Web In Curves](http://pepelsbey.net/pres/web-in-curves/) 31 | - [Sense Coding](http://pepelsbey.net/pres/sense-coding/) 32 | - [Dynamic Graphics](http://pepelsbey.net/pres/dynamic-graphics/) 33 | 34 | ## Browser support 35 | 36 | Supported desktop browsers: Chrome, Internet Explorer, Firefox, Opera, Safari. Only latest stable versions of mentioned browsers are supported. 37 | 38 | ## Contributing 39 | 40 | You're always welcome to contibute. Fork project, make changes and send it as pull request. But it's better to file an [issue](http://github.com/shower/shower/issues) with your idea first. Read [contributing rules](https://github.com/shower/shower/blob/master/Contributing.md) for more details. 41 | 42 | Main contributors: [pepelsbey](http://github.com/pepelsbey), [jahson](http://github.com/jahson), [miripiruni](http://github.com/miripiruni), [kizu](http://github.com/kizu). 43 | 44 | --- 45 | Licensed under [MIT License](http://en.wikipedia.org/wiki/MIT_License), see [license page](shower/wiki/MIT-License) for details. -------------------------------------------------------------------------------- /inst/slidify/libraries/highlighters/highlight.js/css/googlecode.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Google Code style (c) Aahan Krish 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background: white; color: black; 10 | } 11 | 12 | pre .comment, 13 | pre .template_comment, 14 | pre .javadoc, 15 | pre .comment * { 16 | color: #800; 17 | } 18 | 19 | pre .keyword, 20 | pre .method, 21 | pre .list .title, 22 | pre .tag .title, 23 | pre .setting .value, 24 | pre .winutils, 25 | pre .tex .command, 26 | pre .http .title, 27 | pre .request, 28 | pre .status { 29 | color: #008; 30 | } 31 | 32 | pre .envvar, 33 | pre .tex .special { 34 | color: #660; 35 | } 36 | 37 | pre .string, 38 | pre .tag .value, 39 | pre .cdata, 40 | pre .filter .argument, 41 | pre .attr_selector, 42 | pre .apache .cbracket, 43 | pre .date, 44 | pre .regexp { 45 | color: #080; 46 | } 47 | 48 | pre .sub .identifier, 49 | pre .pi, 50 | pre .tag, 51 | pre .tag .keyword, 52 | pre .decorator, 53 | pre .ini .title, 54 | pre .shebang, 55 | pre .input_number, 56 | pre .hexcolor, 57 | pre .rules .value, 58 | pre .css .value .number, 59 | pre .literal, 60 | pre .symbol, 61 | pre .ruby .symbol .string, 62 | pre .ruby .symbol .keyword, 63 | pre .ruby .symbol .keymethods, 64 | pre .number, 65 | pre .css .function { 66 | color: #066; 67 | } 68 | 69 | pre .class .title, 70 | pre .haskell .type, 71 | pre .smalltalk .class, 72 | pre .javadoctag, 73 | pre .yardoctag, 74 | pre .phpdoc, 75 | pre .typename, 76 | pre .tag .attribute, 77 | pre .doctype, 78 | pre .class .id, 79 | pre .built_in, 80 | pre .setting, 81 | pre .params, 82 | pre .variable { 83 | color: #606; 84 | } 85 | 86 | pre .css .tag, 87 | pre .rules .property, 88 | pre .pseudo, 89 | pre .subst { 90 | color: #000; 91 | } 92 | 93 | pre .css .class, pre .css .id { 94 | color: #9B703F; 95 | } 96 | 97 | pre .value .important { 98 | color: #ff7700; 99 | font-weight: bold; 100 | } 101 | 102 | pre .rules .keyword { 103 | color: #C5AF75; 104 | } 105 | 106 | pre .annotation, 107 | pre .apache .sqbracket, 108 | pre .nginx .built_in { 109 | color: #9B859D; 110 | } 111 | 112 | pre .preprocessor, 113 | pre .preprocessor * { 114 | color: #444; 115 | } 116 | 117 | pre .tex .formula { 118 | background-color: #EEE; 119 | font-style: italic; 120 | } 121 | 122 | pre .diff .header, 123 | pre .chunk { 124 | color: #808080; 125 | font-weight: bold; 126 | } 127 | 128 | pre .diff .change { 129 | background-color: #BCCFF9; 130 | } 131 | 132 | pre .addition { 133 | background-color: #BAEEBA; 134 | } 135 | 136 | pre .deletion { 137 | background-color: #FFC8BD; 138 | } 139 | 140 | pre .comment .yardoctag { 141 | font-weight: bold; 142 | } 143 | -------------------------------------------------------------------------------- /inst/slidify/libraries/highlighters/highlight.js/css/sunburst.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Sunburst-like style (c) Vasily Polovnyov 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background: #000; color: #f8f8f8; 10 | } 11 | 12 | pre .comment, 13 | pre .template_comment, 14 | pre .javadoc { 15 | color: #aeaeae; 16 | font-style: italic; 17 | } 18 | 19 | pre .keyword, 20 | pre .ruby .function .keyword, 21 | pre .request, 22 | pre .status { 23 | color: #E28964; 24 | } 25 | 26 | pre .function .keyword, 27 | pre .sub .keyword, 28 | pre .method, 29 | pre .list .title { 30 | color: #99CF50; 31 | } 32 | 33 | pre .string, 34 | pre .tag .value, 35 | pre .cdata, 36 | pre .filter .argument, 37 | pre .attr_selector, 38 | pre .apache .cbracket, 39 | pre .date, 40 | pre .tex .command { 41 | color: #65B042; 42 | } 43 | 44 | pre .subst { 45 | color: #DAEFA3; 46 | } 47 | 48 | pre .regexp { 49 | color: #E9C062; 50 | } 51 | 52 | pre .title, 53 | pre .sub .identifier, 54 | pre .pi, 55 | pre .tag, 56 | pre .tag .keyword, 57 | pre .decorator, 58 | pre .shebang, 59 | pre .input_number { 60 | color: #89BDFF; 61 | } 62 | 63 | pre .class .title, 64 | pre .haskell .type, 65 | pre .smalltalk .class, 66 | pre .javadoctag, 67 | pre .yardoctag, 68 | pre .phpdoc { 69 | text-decoration: underline; 70 | } 71 | 72 | pre .symbol, 73 | pre .ruby .symbol .string, 74 | pre .ruby .symbol .keyword, 75 | pre .ruby .symbol .keymethods, 76 | pre .number { 77 | color: #3387CC; 78 | } 79 | 80 | pre .params, 81 | pre .variable { 82 | color: #3E87E3; 83 | } 84 | 85 | pre .css .tag, 86 | pre .rules .property, 87 | pre .pseudo, 88 | pre .tex .special { 89 | color: #CDA869; 90 | } 91 | 92 | pre .css .class { 93 | color: #9B703F; 94 | } 95 | 96 | pre .rules .keyword { 97 | color: #C5AF75; 98 | } 99 | 100 | pre .rules .value { 101 | color: #CF6A4C; 102 | } 103 | 104 | pre .css .id { 105 | color: #8B98AB; 106 | } 107 | 108 | pre .annotation, 109 | pre .apache .sqbracket, 110 | pre .nginx .built_in { 111 | color: #9B859D; 112 | } 113 | 114 | pre .preprocessor { 115 | color: #8996A8; 116 | } 117 | 118 | pre .hexcolor, 119 | pre .css .value .number { 120 | color: #DD7B3B; 121 | } 122 | 123 | pre .css .function { 124 | color: #DAD085; 125 | } 126 | 127 | pre .diff .header, 128 | pre .chunk, 129 | pre .tex .formula { 130 | background-color: #0E2231; 131 | color: #F8F8F8; 132 | font-style: italic; 133 | } 134 | 135 | pre .diff .change { 136 | background-color: #4A410D; 137 | color: #F8F8F8; 138 | } 139 | 140 | pre .addition { 141 | background-color: #253B22; 142 | color: #F8F8F8; 143 | } 144 | 145 | pre .deletion { 146 | background-color: #420E09; 147 | color: #F8F8F8; 148 | } 149 | -------------------------------------------------------------------------------- /inst/slidify/libraries/highlighters/highlight.js/css/default.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Original style from softwaremaniacs.org (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background: #F0F0F0; 10 | } 11 | 12 | pre code, 13 | pre .ruby .subst, 14 | pre .tag .title, 15 | pre .lisp .title { 16 | color: black; 17 | } 18 | 19 | pre .string, 20 | pre .title, 21 | pre .constant, 22 | pre .parent, 23 | pre .tag .value, 24 | pre .rules .value, 25 | pre .rules .value .number, 26 | pre .preprocessor, 27 | pre .ruby .symbol, 28 | pre .ruby .symbol .string, 29 | pre .ruby .symbol .keyword, 30 | pre .ruby .symbol .keymethods, 31 | pre .instancevar, 32 | pre .aggregate, 33 | pre .template_tag, 34 | pre .django .variable, 35 | pre .smalltalk .class, 36 | pre .addition, 37 | pre .flow, 38 | pre .stream, 39 | pre .bash .variable, 40 | pre .apache .tag, 41 | pre .apache .cbracket, 42 | pre .tex .command, 43 | pre .tex .special, 44 | pre .erlang_repl .function_or_atom, 45 | pre .markdown .header { 46 | color: #800; 47 | } 48 | 49 | pre .comment, 50 | pre .annotation, 51 | pre .template_comment, 52 | pre .diff .header, 53 | pre .chunk, 54 | pre .markdown .blockquote { 55 | color: #888; 56 | } 57 | 58 | pre .number, 59 | pre .date, 60 | pre .regexp, 61 | pre .literal, 62 | pre .smalltalk .symbol, 63 | pre .smalltalk .char, 64 | pre .go .constant, 65 | pre .change, 66 | pre .markdown .bullet, 67 | pre .markdown .link_url { 68 | color: #080; 69 | } 70 | 71 | pre .label, 72 | pre .javadoc, 73 | pre .ruby .string, 74 | pre .decorator, 75 | pre .filter .argument, 76 | pre .localvars, 77 | pre .array, 78 | pre .attr_selector, 79 | pre .important, 80 | pre .pseudo, 81 | pre .pi, 82 | pre .doctype, 83 | pre .deletion, 84 | pre .envvar, 85 | pre .shebang, 86 | pre .apache .sqbracket, 87 | pre .nginx .built_in, 88 | pre .tex .formula, 89 | pre .erlang_repl .reserved, 90 | pre .input_number, 91 | pre .markdown .link_label, 92 | pre .vhdl .attribute { 93 | color: #88F 94 | } 95 | 96 | pre .keyword, 97 | pre .id, 98 | pre .phpdoc, 99 | pre .title, 100 | pre .built_in, 101 | pre .aggregate, 102 | pre .css .tag, 103 | pre .javadoctag, 104 | pre .phpdoc, 105 | pre .yardoctag, 106 | pre .smalltalk .class, 107 | pre .winutils, 108 | pre .bash .variable, 109 | pre .apache .tag, 110 | pre .go .typename, 111 | pre .tex .command, 112 | pre .markdown .strong, 113 | pre .request, 114 | pre .status { 115 | font-weight: bold; 116 | } 117 | 118 | pre .markdown .emphasis { 119 | font-style: italic; 120 | } 121 | 122 | pre .nginx .built_in { 123 | font-weight: normal; 124 | } 125 | 126 | pre .coffeescript .javascript, 127 | pre .xml .css, 128 | pre .xml .javascript, 129 | pre .xml .vbscript, 130 | pre .tex .formula { 131 | opacity: 0.5; 132 | } 133 | -------------------------------------------------------------------------------- /R/eRadar.R: -------------------------------------------------------------------------------- 1 | #' Radar charts 2 | #' 3 | #' ECharts style radar charts. 4 | #' 5 | #' @param dat data.frame or matrix, should have colnames and rownames. 6 | #' @param limit data.frame or matrix, 2 column, indicates the limit of each axis. 7 | #' @param opt option of ECharts. 8 | #' @return The HTML code as a character string. 9 | #' @export 10 | #' @examples 11 | #' require(plyr) 12 | #' dat = ddply(iris, .(Species), colwise(mean)) 13 | #' rownames(dat) = dat[,1] 14 | #' dat = dat[, -1] 15 | #' dat 16 | #' plot(eRadar(dat)) 17 | 18 | eRadar = function(dat, size = c(1024, 768), ymin=vector(), ymax=vector(), 19 | title = NULL, subtitle = NULL, title.x = "center", title.y = "top", 20 | legend = TRUE, legend.data=NULL, legend.x = "left", legend.y= "top", legend.orient="horizontal", 21 | toolbox = TRUE, toolbox.orient = "horizontal", toolbox.x = "right", toolbox.y = "top", 22 | dataView = TRUE, readOnly = FALSE, mark=TRUE, dataZoom=FALSE, magicType=TRUE, 23 | tooltip = TRUE, tooltip.trigger="item", formatter="", axis.scale=TRUE, 24 | xlab=FALSE, ylab=FALSE, calculable=TRUE, showLabel=TRUE, opt = list()) 25 | { 26 | # option$title format. 27 | opt$title = tilteSet(title = title, subtitle=subtitle, 28 | title.x = title.x, title.y = title.y) 29 | 30 | opt$calculable = calculableSet(calculable = calculable) 31 | 32 | # opt$tooltip format, not open to user now. 33 | opt$tooltip = tooltipSet( tooltip=tooltip,trigger=tooltip.trigger, 34 | formatter = "", islandFormatter="") 35 | 36 | opt$toolbox = toolboxSet(toolbox=toolbox, toolbox.x=toolbox.x, toolbox.y=toolbox.y, orient=toolbox.orient, 37 | dataView=dataView, mark=mark, dataZoom = dataZoom, magicType = magicType, restore = TRUE, readOnly = readOnly, 38 | saveAsImage=TRUE) 39 | 40 | if(missing(legend.data) | is.null(legend.data)){legendData = rownames(dat) 41 | }else{legendData = legend.data} 42 | 43 | opt$legend = legendSet( legend=legend, data=legendData, legend.x=legend.x, legend.y=legend.y, orient=legend.orient) 44 | 45 | opt$polar = list(polarSet(name=colnames(dat), ymin=ymin, ymax=ymax)) 46 | 47 | datList = vector("list", nrow(dat)) 48 | for(i in 1:nrow(dat)){ 49 | datList[[i]]$name = rownames(dat)[i] 50 | datList[[i]]$value = unnames(dat[i,]) 51 | } 52 | names(datList) = NULL 53 | 54 | 55 | if(is.null(opt$series)) { 56 | opt$series = vector("list", 1) 57 | } 58 | if(is.null(opt$series[[1]]$type)) { 59 | opt$series[[1]]$type = 'radar' 60 | } 61 | 62 | if(is.null(opt$series[[1]]$data)) { 63 | opt$series[[1]]$data = datList 64 | } 65 | 66 | 67 | jsonStr <- toJSON(opt, pretty=TRUE) 68 | outList <- .rechartsOutput(jsonStr, charttype="eRadar", size=size) 69 | opt$size = size 70 | output <- list(outList=outList, opt=opt) 71 | class(output) <- c("recharts", "eRadar", "list") 72 | 73 | ### output list format 74 | return(output) 75 | 76 | } 77 | -------------------------------------------------------------------------------- /demo/recharts.R: -------------------------------------------------------------------------------- 1 | 2 | # Line Plot 3 | require(recharts) 4 | recharts.eLine <- eLine(WorldPhones) 5 | 6 | bb <- recharts.eLine 7 | plot(bb+ eTitle(title="11", x=10, y=10)) 8 | 9 | plot(recharts.eLine) 10 | pause() 11 | 12 | 13 | # Area Plot 14 | recharts.eArea <- eArea(WorldPhones) 15 | plot(recharts.eArea) 16 | pause() 17 | 18 | 19 | # Scatter Plot 20 | recharts.ePoints <- ePoints(iris[,3:5]) 21 | plot(recharts.ePoints) 22 | pause() 23 | 24 | 25 | # Pie Plot 26 | x = sample(4) 27 | names(x) = LETTERS[1:4] 28 | recharts.ePie <- ePie(x) 29 | plot(recharts.ePie) 30 | pause() 31 | 32 | 33 | 34 | # Bar Plot 35 | require(plyr) 36 | dat = ddply(iris, .(Species), colwise(mean)) 37 | rownames(dat) = dat[,1] 38 | dat = dat[, -1] 39 | dat 40 | recharts.eBar <- eBar(dat) 41 | plot(recharts.eBar) 42 | pause() 43 | 44 | 45 | recharts.eBar2 <- eBar(dat, horiz = TRUE) 46 | plot(recharts.eBar2) 47 | pause() 48 | 49 | 50 | 51 | # Radar PLot 52 | require(plyr) 53 | dat = ddply(iris, .(Species), colwise(mean)) 54 | rownames(dat) = dat[,1] 55 | dat = dat[, -1] 56 | dat 57 | recharts.eRadar <- eRadar(dat) 58 | plot(recharts.eRadar) 59 | pause() 60 | 61 | # Map 62 | recharts_oldLocal <- Sys.getlocale("LC_CTYPE") 63 | Sys.setlocale("LC_CTYPE","chs") 64 | cityDF = read.csv(system.file( "tooltip", "cityDF.csv", package="recharts"), stringsAsFactor=F) 65 | recharts.eMap <- eMap(cityDF, namevar=1, datavar = 2, title='2008~2010 GDP Data Visulization') 66 | plot(recharts.eMap) 67 | Sys.setlocale("LC_CTYPE", recharts_oldLocal) 68 | pause() 69 | 70 | ## recharts demo 71 | pause <- function(){ 72 | invisible(readline("\nPress to continue: ")) 73 | } 74 | 75 | # force Chart 76 | networkMatrix <- matrix(c( 77 | c(0, 1, 2, 1, 2, 3, 6, 6, 1, 1, 1 ), 78 | c(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), 79 | c(2, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0 ), 80 | c(1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0 ), 81 | c(2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ), 82 | c(3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ), 83 | c(6, 0, 1, 1, 1, 1, 0, 6, 0, 1, 0 ), 84 | c(6, 0, 0, 1, 0, 0, 6, 0, 0, 0, 0 ), 85 | c(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), 86 | c(1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 ), 87 | c(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) 88 | ), ncol=11 89 | ) 90 | 91 | propertyDf <- data.frame( 92 | category = c("A", "B", "B", "B", "B", "C", 93 | "C", "C", "C", "C", "C"), 94 | name = c("Steven Jobs", "Lisa Jobs", "Paul Jobs", " Kalala Jobs", 95 | "Lauren Powell", "Steve woz Ike", "Obama", "Bill Gates", 96 | "Jonathan", "Tim Cook", "Wayne"), 97 | value = c(10, 2, 3, 3, 7, 5, 8, 9, 4, 4, 0) 98 | ) 99 | 100 | rownames(propertyDf) = propertyDf$name 101 | 102 | recharts.eForce <- eForce(networkMatrix=networkMatrix, propertyDf=propertyDf) 103 | 104 | plot(recharts.eForce) 105 | pause() 106 | 107 | # force lite demo 108 | testData <- matrix(1:25, nrow=5) 109 | recharts.eForceLite <- eForce(testData) 110 | 111 | plot(recharts.eForceLite) 112 | 113 | -------------------------------------------------------------------------------- /inst/slidify/libraries/highlighters/highlight.js/css/xcode.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | XCode style (c) Angel Garcia 4 | 5 | */ 6 | 7 | pre code { 8 | display: block; padding: 0.5em; 9 | background: #fff; color: black; 10 | } 11 | 12 | pre .comment, 13 | pre .template_comment, 14 | pre .javadoc, 15 | pre .comment * { 16 | color: rgb(0,106,0); 17 | } 18 | 19 | pre .keyword, 20 | pre .literal { 21 | color: rgb(170,13,145); 22 | } 23 | pre .method, 24 | pre .list .title, 25 | pre .tag .title, 26 | pre .setting .value, 27 | pre .winutils, 28 | pre .tex .command, 29 | pre .http .title, 30 | pre .request, 31 | pre .status { 32 | color: #008; 33 | } 34 | 35 | pre .envvar, 36 | pre .tex .special { 37 | color: #660; 38 | } 39 | 40 | pre .string { 41 | color: rgb(196,26,22); 42 | } 43 | pre .tag .value, 44 | pre .cdata, 45 | pre .filter .argument, 46 | pre .attr_selector, 47 | pre .apache .cbracket, 48 | pre .date, 49 | pre .regexp { 50 | color: #080; 51 | } 52 | 53 | pre .sub .identifier, 54 | pre .pi, 55 | pre .tag, 56 | pre .tag .keyword, 57 | pre .decorator, 58 | pre .ini .title, 59 | pre .shebang, 60 | pre .input_number, 61 | pre .hexcolor, 62 | pre .rules .value, 63 | pre .css .value .number, 64 | pre .symbol, 65 | pre .ruby .symbol .string, 66 | pre .ruby .symbol .keyword, 67 | pre .ruby .symbol .keymethods, 68 | pre .number, 69 | pre .css .function { 70 | color: rgb(28,0,207); 71 | } 72 | 73 | pre .class .title, 74 | pre .haskell .type, 75 | pre .smalltalk .class, 76 | pre .javadoctag, 77 | pre .yardoctag, 78 | pre .phpdoc, 79 | pre .typename, 80 | pre .tag .attribute, 81 | pre .doctype, 82 | pre .class .id, 83 | pre .built_in, 84 | pre .setting, 85 | pre .params { 86 | color: rgb(92,38,153); 87 | } 88 | 89 | pre .variable { 90 | color: rgb(63,110,116); 91 | } 92 | pre .css .tag, 93 | pre .rules .property, 94 | pre .pseudo, 95 | pre .subst { 96 | color: #000; 97 | } 98 | 99 | pre .css .class, pre .css .id { 100 | color: #9B703F; 101 | } 102 | 103 | pre .value .important { 104 | color: #ff7700; 105 | font-weight: bold; 106 | } 107 | 108 | pre .rules .keyword { 109 | color: #C5AF75; 110 | } 111 | 112 | pre .annotation, 113 | pre .apache .sqbracket, 114 | pre .nginx .built_in { 115 | color: #9B859D; 116 | } 117 | 118 | pre .preprocessor, 119 | pre .preprocessor * { 120 | color: rgb(100,56,32); 121 | } 122 | 123 | pre .tex .formula { 124 | background-color: #EEE; 125 | font-style: italic; 126 | } 127 | 128 | pre .diff .header, 129 | pre .chunk { 130 | color: #808080; 131 | font-weight: bold; 132 | } 133 | 134 | pre .diff .change { 135 | background-color: #BCCFF9; 136 | } 137 | 138 | pre .addition { 139 | background-color: #BAEEBA; 140 | } 141 | 142 | pre .deletion { 143 | background-color: #FFC8BD; 144 | } 145 | 146 | pre .comment .yardoctag { 147 | font-weight: bold; 148 | } 149 | 150 | pre .method .id { 151 | color: #000; 152 | } 153 | -------------------------------------------------------------------------------- /inst/slidify/libraries/highlighters/highlight.js/css/arta.css: -------------------------------------------------------------------------------- 1 | /* 2 | Date: 17.V.2011 3 | Author: pumbur 4 | */ 5 | 6 | pre code 7 | { 8 | display: block; padding: 0.5em; 9 | background: #222; 10 | } 11 | 12 | pre .profile .header *, 13 | pre .ini .title 14 | { 15 | color: #fff; 16 | } 17 | 18 | pre .comment, 19 | pre .javadoc, 20 | pre .preprocessor, 21 | pre .preprocessor .title, 22 | pre .shebang, 23 | pre .profile .summary, 24 | pre .diff, 25 | pre .pi, 26 | pre .doctype, 27 | pre .tag, 28 | pre .template_comment, 29 | pre .css .rules, 30 | pre .tex .special 31 | { 32 | color: #444; 33 | } 34 | 35 | pre .string, 36 | pre .symbol, 37 | pre .diff .change, 38 | pre .regexp, 39 | pre .xml .attribute, 40 | pre .smalltalk .char, 41 | pre .xml .value, 42 | pre .ini .value 43 | { 44 | color: #ffcc33; 45 | } 46 | 47 | pre .number, 48 | pre .addition 49 | { 50 | color: #00cc66; 51 | } 52 | 53 | pre .built_in, 54 | pre .literal, 55 | pre .vhdl .typename, 56 | pre .go .constant, 57 | pre .go .typename, 58 | pre .ini .keyword, 59 | pre .lua .title, 60 | pre .perl .variable, 61 | pre .php .variable, 62 | pre .mel .variable, 63 | pre .django .variable, 64 | pre .css .funtion, 65 | pre .smalltalk .method, 66 | pre .hexcolor, 67 | pre .important, 68 | pre .flow, 69 | pre .inheritance, 70 | pre .parser3 .variable 71 | { 72 | color: #32AAEE; 73 | } 74 | 75 | pre .keyword, 76 | pre .tag .title, 77 | pre .css .tag, 78 | pre .css .class, 79 | pre .css .id, 80 | pre .css .pseudo, 81 | pre .css .attr_selector, 82 | pre .lisp .title, 83 | pre .winutils, 84 | pre .tex .command, 85 | pre .request, 86 | pre .status 87 | { 88 | color: #6644aa; 89 | } 90 | 91 | pre .title, 92 | pre .ruby .constant, 93 | pre .vala .constant, 94 | pre .parent, 95 | pre .deletion, 96 | pre .template_tag, 97 | pre .css .keyword, 98 | pre .objectivec .class .id, 99 | pre .smalltalk .class, 100 | pre .lisp .keyword, 101 | pre .apache .tag, 102 | pre .nginx .variable, 103 | pre .envvar, 104 | pre .bash .variable, 105 | pre .go .built_in, 106 | pre .vbscript .built_in, 107 | pre .lua .built_in, 108 | pre .rsl .built_in, 109 | pre .tail, 110 | pre .avrasm .label, 111 | pre .tex .formula, 112 | pre .tex .formula * 113 | { 114 | color: #bb1166; 115 | } 116 | 117 | pre .yardoctag, 118 | pre .phpdoc, 119 | pre .profile .header, 120 | pre .ini .title, 121 | pre .apache .tag, 122 | pre .parser3 .title 123 | { 124 | font-weight: bold; 125 | } 126 | 127 | pre .coffeescript .javascript, 128 | pre .xml .javascript, 129 | pre .xml .css, 130 | pre .xml .cdata 131 | { 132 | opacity: 0.6; 133 | } 134 | 135 | pre code, 136 | pre .javascript, 137 | pre .css, 138 | pre .xml, 139 | pre .subst, 140 | pre .diff .chunk, 141 | pre .css .value, 142 | pre .css .attribute, 143 | pre .lisp .string, 144 | pre .lisp .number, 145 | pre .tail .params, 146 | pre .container, 147 | pre .haskell *, 148 | pre .erlang *, 149 | pre .erlang_repl * 150 | { 151 | color: #aaa; 152 | } 153 | -------------------------------------------------------------------------------- /inst/examples/xPie.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ECharts 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /inst/slidify/index.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: html5幻灯片简介 3 | subtitle: 利用slidify 和 knitr创建基于html5 的slides 4 | author: 周扬 5 | github: {user: ramnathv, repo: rCharts, branch: "gh-pages"} 6 | framework: shower 7 | mode: selfcontained 8 | ext_widgets: {rCharts: ["libraries/morris","libraries/nvd3", "libraries/polycharts", "libraries/highcharts","libraries/xcharts", "libraries/leaflet", "libraries/rickshaw"]} 9 | hitheme: solarized_light 10 | logo: libraries/frameworks/minimal/images/rCharts.png 11 | --- 12 | 13 | ## html5幻灯片演示 14 | 15 | 1. slidify 是R语言下利用markdown标记语言生成html5 slides 的包。 16 | 2. 主要的特点包括:可交互、可重复和避免直接使用html标记语言。 17 | 3. 使用三个减号“-” 作为不同页面间的切换。 18 | 4. 可灵活调用第三方的js库和模板。 19 | 20 | --- .class #id 21 | 22 | ## Slide 2 23 | ###当然,最酷的是,我们可以将动态可交互的图形嵌入幻灯片中。 24 | ###就用recharts 来试一试吧? 25 | 26 | --- 27 | ## Slide 3 28 | 29 | ```{r echo = F, message = F, results='asis', tidy=FALSE} 30 | library(recharts) 31 | op <- options(recharts.plot.tag='chart') 32 | recharts.init() 33 | # rForce Chart 34 | # R script here 35 | networkMatrix <- matrix(c( 36 | c(0, 1, 2, 1, 2, 3, 6, 6, 1, 1, 1 ), 37 | c(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), 38 | c(2, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0 ), 39 | c(1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0 ), 40 | c(2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ), 41 | c(3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ), 42 | c(6, 0, 1, 1, 1, 1, 0, 6, 0, 1, 0 ), 43 | c(6, 0, 0, 1, 0, 0, 6, 0, 0, 0, 0 ), 44 | c(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), 45 | c(1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 ), 46 | c(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) 47 | ), ncol=11 48 | ) 49 | 50 | 51 | propertyDf <- data.frame( 52 | category = c("a", "b", "b", "b", "b", "c", 53 | "c", "c", "c", "c", "c"), 54 | name = c("Steven Jobs", "Lisa Jobs", "Paul Jobs", " Kalala Jobs", 55 | "Lauren Powell", "Steve woz Ike", "Obama", "Bill Gates", 56 | "Jonathan", "Tim Cook", "Wayne"), 57 | value = c(10, 2, 3, 3, 7, 5, 8, 9, 4, 4, 0) 58 | ) 59 | 60 | rownames(propertyDf) = propertyDf$name 61 | 62 | recharts.eForce <- eForce(networkMatrix=networkMatrix, propertyDf=propertyDf, size=c(800,400)) 63 | 64 | plot(recharts.eForce) 65 | 66 | ``` 67 | 68 | --- 69 | ## Slide 4 70 | 71 | ```{r echo = F, message = F, results='asis', tidy=FALSE} 72 | op <- options(recharts.plot.tag='chart') 73 | 74 | recharts.eLine <- eLine(WorldPhones, size=c(800,400)) 75 | plot(recharts.eLine) 76 | ``` 77 | --- 78 | 79 | ## Slide 5 80 | 81 | ```{r echo = F, message = F, results='asis', tidy=FALSE} 82 | op <- options(recharts.plot.tag='chart') 83 | 84 | x = sample(4) 85 | names(x) = LETTERS[1:4] 86 | recharts.ePie <- ePie(x, size=c(800,400)) 87 | plot(recharts.ePie) 88 | 89 | ``` 90 | --- 91 | ```{r echo = F, message = F, results='asis', tidy=FALSE} 92 | op <- options(recharts.plot.tag='chart') 93 | 94 | require(plyr) 95 | dat = ddply(iris, .(Species), colwise(mean)) 96 | rownames(dat) = dat[,1] 97 | dat = dat[, -1] 98 | 99 | recharts.eBar <- eBar(dat, size=c(800,400)) 100 | plot(recharts.eBar) 101 | ``` 102 | 103 | --- 104 | 105 | ```{r echo = F, message = F, results='asis', tidy=FALSE} 106 | op <- options(recharts.plot.tag='chart') 107 | 108 | # Map 109 | load(url('http://yzhou.org/recharts/ChinaGDP.RData')) 110 | recharts.eMap <- eMap(ChinaGDP, size=c(800,400)) 111 | plot(recharts.eMap) 112 | 113 | ``` 114 | 115 | 116 | -------------------------------------------------------------------------------- /inst/shiny/lazyPlot/eMap/ui.R: -------------------------------------------------------------------------------- 1 | # eMap function. 2 | shinyUI( 3 | fluidPage( 4 | 5 | titlePanel("lazyPlot 让懒人学会作图"), 6 | fluidRow( 7 | column(3, wellPanel( 8 | tabsetPanel(id = "inTabset", 9 | tabPanel("通用选项", 10 | h5("使用eOption配置Echarts通用选项:"), 11 | textInput("eOption_size", "图像尺寸", paste0(tempEchartsObject$opt$size, collapse = ",")), 12 | textInput("eOption_region", "地图区域", "china") 13 | #,checkboxInput("eOption_calculable", "拖拽重计算", TRUE) 14 | ), 15 | tabPanel("标题", 16 | h5("使用eTitle配置Echarts标题:"), 17 | textInput("title_title", "主标题", ""), 18 | textInput("title_subtitle", "副标题", ""), 19 | textInput("title_x", "标题位置(横向)", "left"), 20 | textInput("title_y", "标题位置(纵向)", "top") 21 | ), 22 | tabPanel("工具箱", 23 | h5("使用eToolbox配置工具箱选项:"), 24 | checkboxInput("toolbox_show", "工具箱是否显示", as.logical(tempEchartsObject$opt$toolbox$show)), 25 | textInput("toolbox_x", "工具箱横向位置", tempEchartsObject$opt$toolbox$x), 26 | textInput("toolbox_y", "工具箱纵向位置", tempEchartsObject$opt$toolbox$y), 27 | selectInput("toolbox_orient", "工具箱方向", 28 | c("horizontal", "vertical"), tempEchartsObject$opt$toolbox$orient), 29 | checkboxInput("toolbox_readOnly", "数据是否可编辑", FALSE), 30 | checkboxInput("toolbox_mark", "辅助线工具", TRUE), 31 | #checkboxInput("toolbox_dataZoom", "区域缩放工具", TRUE), 32 | #checkboxInput("toolbox_magicType", "图形切换工具", TRUE), 33 | checkboxInput("toolbox_restore", "图形还原工具", TRUE), 34 | checkboxInput("toolbox_saveAsImage", "图片输出工具", TRUE) 35 | ), 36 | tabPanel("图例", 37 | h5("使用eLegend配置图例选项"), 38 | checkboxInput("legend_show", "图例是否显示", TRUE), 39 | selectInput("legend_orient", "图例方向", 40 | c("horizontal", "vertical")), 41 | textInput("legend_x", "图例横向位置", "left"), 42 | textInput("legend_y", "图例纵向位置", "top"), 43 | textInput("legend_data", "图例数组(使用','分隔)", paste(tempEchartsObject$opt$legend$data, collapse=",")) 44 | ), 45 | tabPanel("提示框", 46 | h5("使用eTooltip配置提示框选项"), 47 | checkboxInput("eTooltip_show", "是否显示提示框", TRUE), 48 | selectInput("eTooltip_trigger", "提示框触发类型(元素、轴)", c("item", "axis"), selected=tempEchartsObject$opt$tooltip$trigger), 49 | textInput("eTooltip_formatter", "内容格式器", ""), 50 | textInput("eTooltip_islandFormatter", "数据孤岛内容格式器(拖拽重计算独有)", "'{a} < br/>{b} : {c}'") 51 | ), 52 | tabPanel("值域漫游选项", 53 | h5("使用eDataRange配置值域漫游选项"), 54 | checkboxInput("eDataRange_show", "是否显示值域漫游工具", TRUE), 55 | textInput("eDataRange_lim", "值域漫游显示范围(大,小/使用','分隔)", ""), 56 | textInput("eDataRange_text", "文本提示(大,小/使用','分隔)", "high,low"), 57 | selectInput("eDataRange_orient", "图例方向", 58 | c("horizontal", "vertical"), "vertical"), 59 | textInput("eDataRange_x", "值域漫游工具横轴位置", "left"), 60 | textInput("eDataRange_y", "值域漫游工具纵轴位置", "bottom"), 61 | textInput("eDataRange_precision", "值域漫游数值显示精度", 1), 62 | checkboxInput("eDataRange_calculable", "值域漫游是否实时计算", TRUE), 63 | textInput("eDataRange_color", "值域漫游颜色选项", "#1e90ff,#f0ffff") 64 | ) 65 | ) 66 | ), 67 | 68 | submitButton("Update Graph") 69 | ), 70 | 71 | 72 | column(9, 73 | mainPanel( 74 | ### includeHTML(recharts.shiny.init()) is fatal to run apps. 75 | includeHTML(recharts.shiny.init()), 76 | htmlOutput("lazePlot"), 77 | verbatimTextOutput("rechartsCode") 78 | ) 79 | ) 80 | ), 81 | includeScript("www/script.js"), 82 | includeScript("www/tooltip.js") 83 | 84 | 85 | )) -------------------------------------------------------------------------------- /inst/examples/irisBar.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ECharts 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /inst/shiny/recharts_shiny_football/testData.csv: -------------------------------------------------------------------------------- 1 | 球员姓名,位置,上半场1_2011,上半场2_2011,下半场1_2011,下半场2_2011,上半场1_2012,上半场2_2012,下半场1_2012,下半场2_2012,上半场1_2013,上半场2_2013,下半场1_2013,下半场2_2013 2 | 曾诚,GK,102,195,120,180,98,128,130,140,155,198,180,200 3 | 杨智,GK,110,140,180,182,120,180,98,154,98,154,140,180 4 | 王大雷,GK,98,128,130,140,155,198,180,200,102,195,120,180 5 | 武磊,F,2731,2130,2552,1218.031524,3111.864423,2729.629529,2073.082454,1808.236807,3432.056708,2740.568214,2436.433571,1988.047563 6 | 姜宁,F,2669,2331,2845,1473.00285,3166.371332,3047.012873,2846.958325,1705.759994,3381.041066,2473.131856,2789.921435,1840.976183 7 | 曲波,F,2932,2494,2533,1282.080644,2571.53237,2541.080407,2539.686672,1685.777808,3272.489278,2558.555909,2869.21979,1856.349465 8 | 于大宝,F,2576,2241,2547,1566.603576,3580.589428,2471.220953,2571.815871,1922.284201,3271.305998,2726.584791,2547.657086,2157.098877 9 | 于海,F,2813,2395,2328,1466.813031,2410.72257,2104.73551,2877.310482,1761.255552,3518.17706,2571.009412,2656.226467,2170.489569 10 | 孙可,F,2658,1956,2493,1379.937029,3036.629431,2134.706053,2078.943653,1819.611971,3440.15981,2520.025586,2583.489644,1529.101571 11 | 郜林,F,2811,2011,2719,1403.156863,2890.989409,2615.279093,2274.814858,1740.271172,3158.054829,2785.297959,2654.224359,1926.352402 12 | 黄博文,M,3142,2297,2704,1235.297545,2965.009256,1994.796179,2382.564666,1518.946534,3063.694002,2708.985595,2760.650219,1919.556588 13 | 刘建业,M,3155,2366,2491,1311.587971,2848.05388,2835.853025,2870.028661,1673.048294,3040.005693,2594.232473,2273.560414,1565.806999 14 | 郑智,M,3144,2086,2361,1461.064009,2896.632625,2320.535465,3049.227251,1851.27946,3444.30791,2944.834508,2545.724082,1514.981722 15 | 赵旭日,M,2534,2444,2451,1256.145399,3576.585093,2456.833018,2786.379218,1812.719151,3161.749883,2526.178373,2692.847524,2051.409947 16 | 张稀哲,M,2515,2440,2362,1099.415717,3121.428345,1965.845044,2760.802046,1615.625943,3478.441785,2836.151775,2678.079621,1703.138799 17 | 杨昊,M,2483,2063,2788,1185.860334,3082.868786,2467.90196,2765.322526,1742.473752,3452.913864,2387.71935,2405.708544,1820.015509 18 | 于汉超,M,2514,2101,2206,1373.23028,3541.008401,3397.421347,2450.567729,1835.302428,3466.169266,2894.025481,2524.175138,1923.125477 19 | 金敬道,M,3280,2301,2174,1307.216265,3409.911763,2473.778017,2590.833828,1654.84052,2985.614409,2634.125361,2412.603431,1688.845129 20 | 王永珀,M,2451,2045,2249,1262.760693,2868.077274,2461.627598,2280.361737,1781.86027,3494.62129,2846.613697,2840.30195,1775.101536 21 | 刘健,M,2842,2025,2622,1418.043343,3447.313012,2593.03511,1977.435819,1767.52794,3141.067559,2821.221485,2715.043384,1741.854893 22 | 冯潇霆,B,2271,2156,2402,1236.599514,3106.434343,2647.559275,2382.18906,1876.630702,3093.192445,2855.715559,2442.580285,2092.809171 23 | 荣昊,B,2844,2168,2556,1257.514069,2772.846505,2607.286675,2131.117291,1907.90305,3143.349483,2880.869097,2549.254942,1830.385076 24 | 孙祥,B,2660,2409,2433,1326.835737,3267.262484,2699.570612,3246.38809,1870.93505,3413.287645,2419.120577,2605.129245,1637.608314 25 | 张琳芃,B,2432,2268,2757,1225.199611,3212.929483,2983.765691,2565.647135,1845.16369,3518.509827,2451.180823,2970.247512,1842.214648 26 | 吴曦,B,2960,2425,2374,1161.450002,3248.523686,2455.611165,2149.650192,1764.151783,3351.275411,2671.073585,2515.095264,1974.194478 27 | 郎征,B,2486,2297,2958,1424.994834,3055.591266,2616.944189,2149.264263,1858.334037,3518.563035,2448.970583,2998.812719,1759.314856 28 | 杜威,B,2260,2363,2601,1254.307548,3200.125478,2523.326718,2761.085065,1820.975167,3178.667537,2858.969851,2715.817848,1665.3118 29 | -------------------------------------------------------------------------------- /inst/shiny/recharts_shiny_football_en/testData.csv: -------------------------------------------------------------------------------- 1 | 球员姓名,位置,上半场1_2011,上半场2_2011,下半场1_2011,下半场2_2011,上半场1_2012,上半场2_2012,下半场1_2012,下半场2_2012,上半场1_2013,上半场2_2013,下半场1_2013,下半场2_2013 2 | 曾诚,GK,102,195,120,180,98,128,130,140,155,198,180,200 3 | 杨智,GK,110,140,180,182,120,180,98,154,98,154,140,180 4 | 王大雷,GK,98,128,130,140,155,198,180,200,102,195,120,180 5 | 武磊,F,2731,2130,2552,1218.031524,3111.864423,2729.629529,2073.082454,1808.236807,3432.056708,2740.568214,2436.433571,1988.047563 6 | 姜宁,F,2669,2331,2845,1473.00285,3166.371332,3047.012873,2846.958325,1705.759994,3381.041066,2473.131856,2789.921435,1840.976183 7 | 曲波,F,2932,2494,2533,1282.080644,2571.53237,2541.080407,2539.686672,1685.777808,3272.489278,2558.555909,2869.21979,1856.349465 8 | 于大宝,F,2576,2241,2547,1566.603576,3580.589428,2471.220953,2571.815871,1922.284201,3271.305998,2726.584791,2547.657086,2157.098877 9 | 于海,F,2813,2395,2328,1466.813031,2410.72257,2104.73551,2877.310482,1761.255552,3518.17706,2571.009412,2656.226467,2170.489569 10 | 孙可,F,2658,1956,2493,1379.937029,3036.629431,2134.706053,2078.943653,1819.611971,3440.15981,2520.025586,2583.489644,1529.101571 11 | 郜林,F,2811,2011,2719,1403.156863,2890.989409,2615.279093,2274.814858,1740.271172,3158.054829,2785.297959,2654.224359,1926.352402 12 | 黄博文,M,3142,2297,2704,1235.297545,2965.009256,1994.796179,2382.564666,1518.946534,3063.694002,2708.985595,2760.650219,1919.556588 13 | 刘建业,M,3155,2366,2491,1311.587971,2848.05388,2835.853025,2870.028661,1673.048294,3040.005693,2594.232473,2273.560414,1565.806999 14 | 郑智,M,3144,2086,2361,1461.064009,2896.632625,2320.535465,3049.227251,1851.27946,3444.30791,2944.834508,2545.724082,1514.981722 15 | 赵旭日,M,2534,2444,2451,1256.145399,3576.585093,2456.833018,2786.379218,1812.719151,3161.749883,2526.178373,2692.847524,2051.409947 16 | 张稀哲,M,2515,2440,2362,1099.415717,3121.428345,1965.845044,2760.802046,1615.625943,3478.441785,2836.151775,2678.079621,1703.138799 17 | 杨昊,M,2483,2063,2788,1185.860334,3082.868786,2467.90196,2765.322526,1742.473752,3452.913864,2387.71935,2405.708544,1820.015509 18 | 于汉超,M,2514,2101,2206,1373.23028,3541.008401,3397.421347,2450.567729,1835.302428,3466.169266,2894.025481,2524.175138,1923.125477 19 | 金敬道,M,3280,2301,2174,1307.216265,3409.911763,2473.778017,2590.833828,1654.84052,2985.614409,2634.125361,2412.603431,1688.845129 20 | 王永珀,M,2451,2045,2249,1262.760693,2868.077274,2461.627598,2280.361737,1781.86027,3494.62129,2846.613697,2840.30195,1775.101536 21 | 刘健,M,2842,2025,2622,1418.043343,3447.313012,2593.03511,1977.435819,1767.52794,3141.067559,2821.221485,2715.043384,1741.854893 22 | 冯潇霆,B,2271,2156,2402,1236.599514,3106.434343,2647.559275,2382.18906,1876.630702,3093.192445,2855.715559,2442.580285,2092.809171 23 | 荣昊,B,2844,2168,2556,1257.514069,2772.846505,2607.286675,2131.117291,1907.90305,3143.349483,2880.869097,2549.254942,1830.385076 24 | 孙祥,B,2660,2409,2433,1326.835737,3267.262484,2699.570612,3246.38809,1870.93505,3413.287645,2419.120577,2605.129245,1637.608314 25 | 张琳芃,B,2432,2268,2757,1225.199611,3212.929483,2983.765691,2565.647135,1845.16369,3518.509827,2451.180823,2970.247512,1842.214648 26 | 吴曦,B,2960,2425,2374,1161.450002,3248.523686,2455.611165,2149.650192,1764.151783,3351.275411,2671.073585,2515.095264,1974.194478 27 | 郎征,B,2486,2297,2958,1424.994834,3055.591266,2616.944189,2149.264263,1858.334037,3518.563035,2448.970583,2998.812719,1759.314856 28 | 杜威,B,2260,2363,2601,1254.307548,3200.125478,2523.326718,2761.085065,1820.975167,3178.667537,2858.969851,2715.817848,1665.3118 29 | -------------------------------------------------------------------------------- /inst/shiny/recharts_shiny_integrated/server.R: -------------------------------------------------------------------------------- 1 | # server.R 2 | shinyServer(function(input, output) { 3 | library(recharts) 4 | library(tmcn) 5 | options(shiny.transcode.json = FALSE) 6 | # setwd("E:/kuaipan/git/recharts/inst/shiny/recharts_shiny_integrated/") 7 | 8 | #provinceData <- read.csv("testData.csv", stringsAsFactors=F) 9 | 10 | #provinceList <- unique(provinceData[,2]) 11 | #provinceData_new <- lapply(provinceList, function(province){ 12 | # tempArray <- provinceData[provinceData[,2] == province,] 13 | # if (length(tempArray[,1]) == 1){ 14 | # return(tempArray) 15 | # }else{ 16 | # outputArray = tempArray[1,] 17 | # outputArray[7:20] = apply(tempArray[,7:20], 2, sum ) 18 | # return(outputArray) 19 | # } 20 | #}) 21 | # provinceData <- data.frame(t(matrix(unlist(provinceData_new), ncol=29))) 22 | # out <-provinceData 23 | # out[[1]] <- toUTF8(out[[1]]) 24 | # out[[2]] <- toUTF8(out[[2]]) 25 | 26 | 27 | # provinceData <- out 28 | # save(provinceData, file = "testData.rda") 29 | 30 | load("testData.rda") 31 | 32 | 33 | datasetInput <- reactive({ 34 | selectedName <- input$Province 35 | Encoding(selectedName) <- "UTF-8" 36 | provinceNameList <- provinceData[,2] 37 | 38 | year <- input$YearSelector 39 | if(year == 2012){ 40 | outputData <- provinceData[provinceNameList %in% selectedName ,c(1:6,7:13)] 41 | }else{ 42 | outputData <- provinceData[ provinceNameList %in% selectedName ,c(1:6,14:20)] 43 | } 44 | return(outputData) 45 | }) 46 | 47 | output$rechartMap <- renderEcharts({ 48 | plotDf <- datasetInput() 49 | print(plotDf) 50 | colvar = input$Color 51 | #print(colvar) 52 | #Encoding(colvar) <- "UTF-8" 53 | colorArray = c("总体", "男性","女性", "低档", "中低档", "中高档", "高档") 54 | colorIndex = which(colorArray == colvar) 55 | titleText = paste(input$YearSelector, "年全国销售数据--", input$Color) 56 | titleText = toUTF8(titleText) 57 | print(titleText) 58 | 59 | mapDf <- data.frame(value=plotDf[,colorIndex+6]) 60 | rownames(mapDf) = plotDf[,2] 61 | names(mapDf) = toUTF8("值") 62 | mapDf[,1] <- as.numeric(as.character(mapDf[,1])) 63 | eMapOutput <- eMap(mapDf, opt=list(title=list(text= titleText))) 64 | #print(eMapOutput) 65 | return(eMapOutput) 66 | }) 67 | 68 | output$BarPlot <- renderEcharts({ 69 | plotDf_base <- datasetInput() 70 | plotDf_bar <- plotDf_base 71 | if(input$BarType == "性别"){ 72 | plotDf_bar = plotDf_bar[,c(2,11,12)] 73 | names(plotDf_bar) <- toUTF8(c("province", "男性","女性")) 74 | }else{ 75 | plotDf_bar = plotDf_bar[,c(2,7:10)] 76 | names(plotDf_bar) <- toUTF8(c("province", "低档", "中低档", "中高档", "高档")) 77 | } 78 | rownames(plotDf_bar) <- plotDf_base[,2] 79 | 80 | eBarOutput <- eBar(plotDf_bar) 81 | return(eBarOutput) 82 | }) 83 | output$PiePlot <- renderEcharts({ 84 | plotDf_pie <<- datasetInput() 85 | plotDf_pie <- plotDf_pie[,7:10] 86 | plotDf_pie[,1] <- as.numeric(as.character(plotDf_pie[,1])) 87 | plotDf_pie[,2] <- as.numeric(as.character(plotDf_pie[,2])) 88 | plotDf_pie[,3] <- as.numeric(as.character(plotDf_pie[,3])) 89 | plotDf_pie[,4] <- as.numeric(as.character(plotDf_pie[,4])) 90 | outputData <- apply(plotDf_pie, 2, sum) 91 | names(outputData) <- toUTF8( c("低档", "中低档", "中高档", "高档")) 92 | ePieOutput <- ePie(outputData) 93 | 94 | return(ePieOutput) 95 | }) 96 | 97 | 98 | }) 99 | 100 | # runApp("E:/kuaipan/git/recharts/inst/shiny/recharts_shiny_integrated/") 101 | 102 | -------------------------------------------------------------------------------- /demo/recharts_knitr.Rmd: -------------------------------------------------------------------------------- 1 | ** The data visulization for recharts package** 2 | 3 | ** This documents are maintained and developed by Taiyun Wei and Yang Zhou** 4 | 5 | ```{r, echo=FALSE, eval=TRUE, message=FALSE, warning=FALSE} 6 | library(recharts) 7 | library(knitr) 8 | 9 | ``` 10 | test here 11 | 12 | ```{r results='asis', echo=FALSE, eval=TRUE, message=FALSE,tidy=FALSE} 13 | Sys.setlocale("LC_CTYPE", "eng") 14 | op <- options(recharts.plot.tag='chart') 15 | recharts.init() 16 | # rForce Chart 17 | # R script here 18 | networkMatrix <- matrix(c( 19 | c(0, 1, 2, 1, 2, 3, 6, 6, 1, 1, 1 ), 20 | c(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), 21 | c(2, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0 ), 22 | c(1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0 ), 23 | c(2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ), 24 | c(3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ), 25 | c(6, 0, 1, 1, 1, 1, 0, 6, 0, 1, 0 ), 26 | c(6, 0, 0, 1, 0, 0, 6, 0, 0, 0, 0 ), 27 | c(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), 28 | c(1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 ), 29 | c(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) 30 | ), ncol=11 31 | ) 32 | 33 | 34 | propertyDf <- data.frame( 35 | category = c("a", "b", "b", "b", "b", "c", 36 | "c", "c", "c", "c", "c"), 37 | name = c("Steven Jobs", "Lisa Jobs", "Paul Jobs", " Kalala Jobs", 38 | "Lauren Powell", "Steve woz Ike", "Obama", "Bill Gates", 39 | "Jonathan", "Tim Cook", "Wayne"), 40 | value = c(10, 2, 3, 3, 7, 5, 8, 9, 4, 4, 0) 41 | ) 42 | 43 | rownames(propertyDf) = propertyDf$name 44 | 45 | recharts.eForce <- eForce(networkMatrix=networkMatrix, propertyDf=propertyDf) 46 | 47 | plot(recharts.eForce) 48 | 49 | # 50 | #knit2html("E:/kuaipan/recharts/recharts/inst/demo/recharts_knitr.Rmd") 51 | 52 | ``` 53 | 体能好坏跟哪些因素有关?如果说跟人种有关的话,我们不跟欧非美比,韩国,日本,朝鲜。同样是我们东亚的,体能哪一个不比我们强?我就不懂,中国每一次大赛都发现大面积的抽筋,去年对香港,有个球迷调侃说海东那是“战术抽筋!”不管老的小的,体能没有一个棒的,李铁引以为豪的体能优势一去英超就根本体现不出来!有些在26,7岁当打之年的球员也抽筋,简直可笑!我真的很羡慕韩国人02世界杯上的“跑不死”,没有体能做保证也不可能连克诸强!虽然有黑哨嫌疑,不是我看不起我们自己的足球,就是裁判想帮我们忙,恐怕都找不出机会来的! 54 | 中国经常出现黑色3分钟,70分钟以后丢球,这跟体能差有很大关系!中国球员的职业精神实在是不敢恭维,在国内出点小名气就开始享受,消极训练,饱食终日,一点上进心都没有,状态说下划就下划! 55 | 悲哀呀!要想成为世界足球强国,必须从内部做起,自己做起!体能只是一方面,基础! 56 | 这里我想起了蒋委员长的一句话: 57 | 攘外必须先安内! 58 | ```{r results='asis', tidy=FALSE} 59 | op <- options(recharts.plot.tag='chart') 60 | # force lite demo 61 | library(recharts) 62 | library(tmcn) 63 | options(shiny.transcode.json = FALSE) 64 | #setwd("E:/kuaipan/git/recharts/inst/shiny/recharts_shiny_football/") 65 | load("E:/kuaipan/git/recharts/inst/shiny/recharts_shiny_football/football.rda") 66 | stateData <- table_state[,c(1, 10:13 )] 67 | playerData <- table_player[ , c(1, 10:13) ] 68 | names(stateData) <- toUTF8(c("球队名","上半场第一阶段","上半场第二阶段","下半场第一阶段","下半场第二阶段")) 69 | names(playerData) <- toUTF8(c("球员名","上半场第一阶段","上半场第二阶段","下半场第一阶段","下半场第二阶段")) 70 | outputData <- list(stateData=stateData, playerData = playerData) 71 | plotDf <- outputData 72 | stateDf <- plotDf$stateData 73 | rownames(stateDf) <- stateDf[,1] 74 | stateDf <- stateDf[,-1] 75 | 76 | eBarOutput <- eBar(stateDf, size= c(800,648), ylim = c(0,5000)) 77 | plot(eBarOutput) 78 | ``` 79 | 80 | 81 | 那么让我们来看一下2013年中国队的体能分配情况。 82 | ```{r results='asis', tidy=FALSE} 83 | op <- options(recharts.plot.tag='chart') 84 | playerDf <- plotDf$playerData 85 | 86 | outputDf <- apply(playerDf[,2:5], 2, mean) 87 | 88 | #print(playerDf) 89 | names(outputDf) <- toUTF8(c("上半场第一阶段","上半场第二阶段","下半场第一阶段","下半场第二阶段")) 90 | 91 | ePieOutput <- ePie(outputDf, size= c(500,500), title=toUTF8("中国球员体能分配"), title.y=30, legend.y="b") 92 | #ePieOutput$html$chart <- gsub("http://echarts.baidu.com/doc/example/www", ".", ePieOutput$html$chart) 93 | 94 | plot(ePieOutput) 95 | ``` 96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /R/ePie.R: -------------------------------------------------------------------------------- 1 | #' Pie charts 2 | #' 3 | #' ECharts style pie charts. 4 | #' 5 | #' @param dat vector, names will be treated as labels 6 | #' @param opt option of ECharts. 7 | #' @return T he HTML code as a character string. 8 | #' @export 9 | #' @examples 10 | #' x = runif(6) 11 | #' names(x) = LETTERS[1:6] 12 | #' plot(ePie(x)) 13 | 14 | ePie = function(dat, size = c(1024, 768), xvar=NULL, namevar=NULL, type=c("pie", "rose"), roseType=c("radias", "area"), 15 | title = NULL, subtitle = NULL, title.x = "center", title.y = "top", 16 | legend = TRUE, legend.x = "left", legend.y= "top", legend.orient="horizontal", 17 | toolbox = TRUE, toolbox.orient = "horizontal", toolbox.x = "right", toolbox.y = "top", 18 | dataView = TRUE, readOnly = FALSE, mark=TRUE, dataZoom=FALSE, magicType=TRUE, 19 | tooltip = TRUE, tooltip.trigger="item", formatter="", axis.scale=TRUE, 20 | xlab=FALSE, ylab=FALSE, calculable=TRUE, showLabel=TRUE, opt = list()) 21 | { 22 | 23 | type <- match.arg(type) 24 | roseType <- match.arg(roseType) 25 | 26 | # format the dat to data.frame 27 | if (class(dat) != "data.frame") dat <- as.data.frame(dat) 28 | 29 | # if the xvar is null, will use the first column of dat as default. And check the xvar in the dat colnames. 30 | if (is.null(xvar) || !xvar %in% colnames(dat)) xvar = colnames(dat)[1] 31 | 32 | # if the namevar is null, will use rownames of dat as default. And check the xvar in the dat colnames. 33 | if (is.null(namevar) || !namevar %in% colnames(dat)) { 34 | dat[,"NAME"] = rownames(dat) 35 | namevar = "NAME" 36 | } 37 | 38 | # option$title format. 39 | if (is.null(title)){ 40 | if (type == "rose"){ 41 | ifelse(roseType == "area", headerInfo = "Area", headerInfo = "Radius") 42 | title = paste("RoseType_", headerInfo, "Mode") 43 | }else{ 44 | title = "Pie Chart" 45 | } 46 | } 47 | 48 | # option$title format. 49 | opt$title = tilteSet(title = title, subtitle=subtitle, 50 | title.x = title.x, title.y = title.y) 51 | 52 | opt$calculable = calculableSet(calculable = calculable) 53 | 54 | # opt$tooltip format, not open to user now. 55 | opt$tooltip = tooltipSet( tooltip=tooltip,trigger=tooltip.trigger, 56 | formatter = "", islandFormatter="") 57 | 58 | opt$toolbox = toolboxSet(toolbox=toolbox, toolbox.x=toolbox.x, toolbox.y=toolbox.y, orient=toolbox.orient, 59 | dataView=dataView, mark=mark, dataZoom = dataZoom, magicType = magicType, restore = TRUE, readOnly = readOnly, 60 | saveAsImage=TRUE) 61 | 62 | 63 | opt$legend = legendSet( legend=legend, data=dat[[namevar]], legend.x=legend.x, legend.y=legend.y, orient=legend.orient) 64 | 65 | datFrame = data.frame(value=dat[[xvar]], name=dat[[namevar]]) 66 | datList = lapply(split(datFrame, seq_len(nrow(datFrame))), as.list) 67 | names(datList) = NULL 68 | 69 | #showLabelLine=showLabel 70 | #now we don't support the multiple graph in one canvas 71 | opt$series = list( 72 | list( 73 | name = paste(type, "chart"), 74 | type = "pie", 75 | radius = c(20,110), 76 | center = c("50%", 200), 77 | roseType = ifelse(type=="rose", roseType, ""), 78 | itemStyle = list( 79 | normal = list( 80 | label = list( show = showLabel), 81 | labelLine = list( show = showLabel) 82 | ), 83 | emphasis = list( 84 | label = list( show = !showLabel), 85 | labelLine = list( show = !showLabel) 86 | ) 87 | ), 88 | data = datList 89 | ) 90 | ) 91 | 92 | jsonStr <- toJSON(opt, pretty=TRUE) 93 | outList <- .rechartsOutput(jsonStr, charttype="ePie", size=size) 94 | opt$size = size 95 | output <- list(outList=outList, opt=opt) 96 | class(output) <- c("recharts", "ePie", "list") 97 | 98 | ### output list format 99 | return(output) 100 | } 101 | 102 | -------------------------------------------------------------------------------- /inst/examples/irisRadar.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ECharts 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | -------------------------------------------------------------------------------- /R/eBar.R: -------------------------------------------------------------------------------- 1 | #' Bar charts 2 | #' 3 | #' ECharts style bar charts. 4 | #' 5 | #' @param dat data.frame. 6 | #' @param horiz logical. If FALSE, the bars are drawn vertically with the first bar to the left. 7 | #' If TRUE, the bars are drawn horizontally with the first at the bottom. 8 | #' @param opt option of ECharts. 9 | #' @return The HTML code as a character string. 10 | #' @export 11 | #' @examples 12 | #' require(plyr) 13 | #' dat = ddply(iris, .(Species), colwise(mean)) 14 | #' rownames(dat) = dat[,1] 15 | #' dat = dat[, -1] 16 | #' dat 17 | #' plot(eBar(dat)) 18 | #' plot(eBar(dat, horiz = TRUE)) 19 | 20 | eBar = function(dat, size = c(1024, 768), horiz = FALSE, 21 | title = NULL, subtitle = NULL, title.x = "center", title.y = "top", 22 | legend = TRUE, legend.x = "left", legend.y= "top", legend.orient="horizontal", 23 | toolbox = TRUE, toolbox.orient = "horizontal", toolbox.x = "right", toolbox.y = "top", 24 | dataView = TRUE, readOnly = FALSE, mark=TRUE, dataZoom=FALSE, magicType=TRUE, 25 | tooltip = TRUE, tooltip.trigger="item", formatter="", axis.scale=TRUE, 26 | axis.line=TRUE, axis.tick=FALSE, axis.lable=TRUE, axis.splitLine=TRUE, axis.splitArea=FALSE, axis.boundaryGap=TRUE, 27 | xlab=TRUE, xlab.type="category", xlab.data=NULL, xlab.position="bottom", 28 | xlab.name = "", xlab.namePosition="start", xlim=NULL, 29 | ylab=TRUE, ylab.type="value", ylab.data=NULL, ylab.position="left", 30 | ylab.name = "", ylab.namePosition="start", ylim=NULL, 31 | calculable=TRUE, showLabel=TRUE, opt = list()) 32 | { 33 | 34 | # option$title format. 35 | opt$title = tilteSet(title = title, subtitle=subtitle, 36 | title.x = title.x, title.y = title.y) 37 | 38 | opt$calculable = calculableSet(calculable = calculable) 39 | 40 | # opt$tooltip format, not open to user now. 41 | opt$tooltip = tooltipSet( tooltip=tooltip,trigger=tooltip.trigger, 42 | formatter = "", islandFormatter="") 43 | 44 | opt$toolbox = toolboxSet(toolbox=toolbox, toolbox.x=toolbox.x, toolbox.y=toolbox.y, orient=toolbox.orient, 45 | dataView=dataView, mark=mark, dataZoom = dataZoom, magicType = magicType, restore = TRUE, readOnly = readOnly, 46 | saveAsImage=TRUE) 47 | 48 | 49 | opt$legend = legendSet( legend=legend, data=colnames(dat), legend.x=legend.x, legend.y=legend.y, orient=legend.orient) 50 | 51 | if(match.arg(xlab.type, c("category" , "value")) == "category" & is.null(xlab.data)){ 52 | xlab.data = rownames(dat) 53 | } 54 | if(match.arg(ylab.type, c("category" , "value")) == "category" & is.null(ylab.data)){ 55 | ylab.data = colnames(dat) 56 | } 57 | opt$xAxis = xAxisSet(axisShow=xlab, type=xlab.type, data=xlab.data, position=xlab.position, 58 | labelName=xlab.name, label.namePosition=xlab.namePosition, lim=xlim, 59 | axisLine=axis.line, axisTick=axis.tick, axisLable=axis.lable, splitLine=axis.splitLine, 60 | splitArea=axis.splitArea, boundaryGap=axis.boundaryGap, scale=axis.scale) 61 | 62 | opt$yAxis = yAxisSet(axisShow=ylab, type=ylab.type, data=ylab.data, position=ylab.position, 63 | labelName=ylab.name, label.namePosition=ylab.namePosition, lim=ylim, 64 | axisLine=axis.line, axisTick=axis.tick, axisLable=axis.lable, splitLine=axis.splitLine, 65 | splitArea=axis.splitArea, boundaryGap=axis.boundaryGap, scale=axis.scale) 66 | 67 | # data set... 68 | opt$series = vector("list", ncol(dat)) 69 | for(i in 1:dim(dat)[2]) { 70 | if(is.null(opt$series[[i]]$type)) { 71 | opt$series[[i]]$type = 'bar' 72 | } 73 | 74 | if(is.null(opt$series[[i]]$name)) { 75 | opt$series[[i]]$name = colnames(dat)[i] 76 | } else { 77 | warning('You can set series:name with colnames(dat).') 78 | } 79 | 80 | if(is.null(opt$series[[i]]$data)) { 81 | opt$series[[i]]$data = unnames(dat[,i]) 82 | } else { 83 | warning('You can set series:data with dat.') 84 | } 85 | } 86 | 87 | if(horiz==TRUE) { 88 | tmp = opt$xAxis 89 | opt$xAxis = opt$yAxis 90 | opt$yAxis = tmp 91 | } 92 | jsonStr <- toJSON(opt, pretty=TRUE) 93 | outList <- .rechartsOutput(jsonStr, charttype="eBar", size=size) 94 | opt$size = size 95 | output <- list(outList=outList, opt=opt) 96 | class(output) <- c("recharts", "eBar", "list") 97 | 98 | ### output list format 99 | return(output) 100 | 101 | 102 | } 103 | 104 | -------------------------------------------------------------------------------- /inst/shiny/recharts_shiny_integrated/www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | recharts on Shiny server 16 | 17 | 18 |
19 |
20 |
21 |

recharts on Shiny server

22 |
23 |
24 |
25 |
26 |
27 | 28 | 32 | 33 | 64 | 65 | 74 | 75 | 79 |
80 |
81 |
82 | 84 | 85 | 86 | 87 | 88 | 89 |
90 |
91 |
92 |
93 |
94 |
95 | 96 | -------------------------------------------------------------------------------- /inst/shiny/recharts_shiny_football/server.R: -------------------------------------------------------------------------------- 1 | # server.R 2 | shinyServer(function(input, output) { 3 | library(recharts) 4 | library(tmcn) 5 | options(shiny.transcode.json = FALSE) 6 | # setwd("E:/kuaipan/git/recharts/inst/shiny/recharts_shiny_integrated/") 7 | 8 | #provinceData <- read.csv("testData.csv", stringsAsFactors=F) 9 | 10 | #provinceList <- unique(provinceData[,2]) 11 | #provinceData_new <- lapply(provinceList, function(province){ 12 | # tempArray <- provinceData[provinceData[,2] == province,] 13 | # if (length(tempArray[,1]) == 1){ 14 | # return(tempArray) 15 | # }else{ 16 | # outputArray = tempArray[1,] 17 | # outputArray[7:20] = apply(tempArray[,7:20], 2, sum ) 18 | # return(outputArray) 19 | # } 20 | #}) 21 | # provinceData <- data.frame(t(matrix(unlist(provinceData_new), ncol=29))) 22 | # out <-provinceData 23 | # out[[1]] <- toUTF8(out[[1]]) 24 | # out[[2]] <- toUTF8(out[[2]]) 25 | 26 | 27 | # provinceData <- out 28 | # save(provinceData, file = "testData.rda") 29 | 30 | load("football.rda") 31 | 32 | 33 | datasetInput <- reactive({ 34 | selectedState <- input$StateSelector 35 | Encoding(selectedState) <- "UTF-8" 36 | 37 | selectedPlayer <- input$PlayerSelector 38 | Encoding(selectedPlayer) <- "UTF-8" 39 | 40 | stateList <- table_state[,1] 41 | playerList <- table_player[,1] 42 | #provinceNameList <- provinceData[,2] 43 | 44 | year <- input$YearSelector 45 | if(year == 2011){ 46 | stateData <- table_state[stateList %in% selectedState ,c(1, 2:5 )] 47 | playerData <- table_player[ selectedPlayer%in% selectedPlayer , c(1, 2:5) ] 48 | }else if(year == 2012){ 49 | stateData <- table_state[stateList %in% selectedState ,c(1, 6:9 )] 50 | playerData <- table_player[ selectedPlayer%in% selectedPlayer , c(1, 6:9) ] 51 | }else{ 52 | stateData <- table_state[stateList %in% selectedState ,c(1, 10:13 )] 53 | playerData <- table_player[ selectedPlayer%in% selectedPlayer , c(1, 10:13) ] 54 | } 55 | names(stateData) <- toUTF8(c("球队名","上半场第一阶段","上半场第二阶段","下半场第一阶段","下半场第二阶段")) 56 | names(playerData) <- toUTF8(c("球员名","上半场第一阶段","上半场第二阶段","下半场第一阶段","下半场第二阶段")) 57 | outputData <- list(stateData=stateData, playerData = playerData) 58 | return(outputData) 59 | }) 60 | 61 | output$stateBar <- renderEcharts({ 62 | plotDf <- datasetInput() 63 | stateDf <- plotDf$stateData 64 | rownames(stateDf) <- stateDf[,1] 65 | 66 | stateDf <- stateDf[,-1] 67 | 68 | 69 | eBarOutput <- eBar(stateDf, size= c(800,648), ylim = c(0,5000)) 70 | #eMapOutput <- eMap(mapDf, opt=list(title=list(text= titleText))) 71 | #eBarOutput$html$chart <- gsub("http://echarts.baidu.com/doc/example/www", ".", eBarOutput$html$chart) 72 | 73 | #print(eMapOutput) 74 | return(eBarOutput) 75 | }) 76 | 77 | output$playLine <- renderEcharts({ 78 | plotDf <- datasetInput() 79 | stateDf <- plotDf$stateData 80 | 81 | selectedState <- input$StateSelector 82 | Encoding(selectedState) <- "UTF-8" 83 | 84 | selectedPlayer <- input$PlayerSelector 85 | Encoding(selectedPlayer) <- "UTF-8" 86 | 87 | playerList <- toUTF8(table_player[,1]) 88 | #print(playerList%in% selectedPlayer) 89 | stateList <- table_state[,1] 90 | 91 | playerData <- table_player[ playerList%in% selectedPlayer ,] 92 | stateData <- table_state[ stateList%in% selectedState ,] 93 | insertRow <- c("国际平均", apply(stateData[,2:13], 2, mean)) 94 | playerDf <- playerData 95 | #print(playerDf) 96 | playerDf <- rbind(playerData, insertRow) 97 | #print(playerDf) 98 | names(playerDf) <- toUTF8(c("球员名","2011_上半场第一阶段","2011_上半场第二阶段","2011_下半场第一阶段","2011_下半场第二阶段", 99 | "2012_上半场第一阶段","2012_上半场第二阶段","2012_下半场第一阶段","2012_下半场第二阶段", 100 | "2013_上半场第一阶段","2013_上半场第二阶段","2013_下半场第一阶段","2013_下半场第二阶段" 101 | )) 102 | 103 | plotDf <- t(playerDf) 104 | colnames(plotDf) <- toUTF8(plotDf[1,]) 105 | 106 | plotDf <<- plotDf[-1,] 107 | eLineOutput <- eLine(plotDf, size= c(800,648), toolbox.y="b") 108 | #eLineOutput <- eLineOutput + option(size=c(800,600)) 109 | 110 | #eLineOutput$html$chart <- gsub("http://echarts.baidu.com/doc/example/www", ".", eLineOutput$html$chart) 111 | #print(eLineOutput) 112 | return(eLineOutput) 113 | }) 114 | 115 | output$PiePlot <- renderEcharts({ 116 | plotDf <- datasetInput() 117 | playerDf <- plotDf$playerData 118 | 119 | outputDf <- apply(playerDf[,2:5], 2, mean) 120 | 121 | #print(playerDf) 122 | names(outputDf) <- toUTF8(c("上半场第一阶段","上半场第二阶段","下半场第一阶段","下半场第二阶段")) 123 | 124 | ePieOutput <- ePie(outputDf, size= c(500,500), title=toUTF8("中国球员体能分配"), title.y=30, legend.y="b") 125 | #ePieOutput$html$chart <- gsub("http://echarts.baidu.com/doc/example/www", ".", ePieOutput$html$chart) 126 | 127 | return(ePieOutput) 128 | }) 129 | 130 | 131 | }) 132 | 133 | 134 | 135 | 136 | # runApp("E:/kuaipan/git/recharts/inst/shiny/recharts_shiny_football/") 137 | 138 | -------------------------------------------------------------------------------- /inst/shiny/recharts_shiny_football_en/server.R: -------------------------------------------------------------------------------- 1 | # server.R 2 | shinyServer(function(input, output) { 3 | library(recharts) 4 | library(tmcn) 5 | options(shiny.transcode.json = FALSE) 6 | # setwd("E:/kuaipan/git/recharts/inst/shiny/recharts_shiny_integrated/") 7 | 8 | #provinceData <- read.csv("testData.csv", stringsAsFactors=F) 9 | 10 | #provinceList <- unique(provinceData[,2]) 11 | #provinceData_new <- lapply(provinceList, function(province){ 12 | # tempArray <- provinceData[provinceData[,2] == province,] 13 | # if (length(tempArray[,1]) == 1){ 14 | # return(tempArray) 15 | # }else{ 16 | # outputArray = tempArray[1,] 17 | # outputArray[7:20] = apply(tempArray[,7:20], 2, sum ) 18 | # return(outputArray) 19 | # } 20 | #}) 21 | # provinceData <- data.frame(t(matrix(unlist(provinceData_new), ncol=29))) 22 | # out <-provinceData 23 | # out[[1]] <- toUTF8(out[[1]]) 24 | # out[[2]] <- toUTF8(out[[2]]) 25 | 26 | # provinceData <- out 27 | # save(provinceData, file = "testData.rda") 28 | 29 | load("football.rda") 30 | 31 | 32 | datasetInput <- reactive({ 33 | selectedState <- input$StateSelector 34 | Encoding(selectedState) <- "UTF-8" 35 | 36 | selectedPlayer <- input$PlayerSelector 37 | Encoding(selectedPlayer) <- "UTF-8" 38 | 39 | stateList <- table_state[,1] 40 | playerList <- table_player[,1] 41 | #provinceNameList <- provinceData[,2] 42 | 43 | year <- input$YearSelector 44 | if(year == 2011){ 45 | stateData <- table_state[stateList %in% selectedState ,c(1, 2:5 )] 46 | playerData <- table_player[ selectedPlayer%in% selectedPlayer , c(1, 2:5) ] 47 | }else if(year == 2012){ 48 | stateData <- table_state[stateList %in% selectedState ,c(1, 6:9 )] 49 | playerData <- table_player[ selectedPlayer%in% selectedPlayer , c(1, 6:9) ] 50 | }else{ 51 | stateData <- table_state[stateList %in% selectedState ,c(1, 10:13 )] 52 | playerData <- table_player[ selectedPlayer%in% selectedPlayer , c(1, 10:13) ] 53 | } 54 | names(stateData) <- c("Team", "First Stage in first half","Second Stage in first half","First Stage in second half","Second Stage in second half") 55 | names(playerData) <- c("Player", "First Stage in first half","Second Stage in first half","First Stage in second half","Second Stage in second half") 56 | outputData <- list(stateData=stateData, playerData = playerData) 57 | return(outputData) 58 | }) 59 | 60 | output$stateBar <- renderEcharts({ 61 | plotDf <- datasetInput() 62 | stateDf <- plotDf$stateData 63 | rownames(stateDf) <- stateDf[,1] 64 | 65 | stateDf <- stateDf[,-1] 66 | 67 | 68 | eBarOutput <- eBar(stateDf, opt=list(title=list(text=toUTF8("")))) 69 | #eMapOutput <- eMap(mapDf, opt=list(title=list(text= titleText))) 70 | #eBarOutput$html$chart <- gsub("http://echarts.baidu.com/doc/example/www", ".", eBarOutput$html$chart) 71 | 72 | #print(eMapOutput) 73 | return(eBarOutput) 74 | }) 75 | 76 | output$playLine <- renderEcharts({ 77 | plotDf <- datasetInput() 78 | stateDf <- plotDf$stateData 79 | 80 | selectedState <- input$StateSelector 81 | Encoding(selectedState) <- "UTF-8" 82 | 83 | selectedPlayer <- input$PlayerSelector 84 | Encoding(selectedPlayer) <- "UTF-8" 85 | 86 | playerList <- toUTF8(table_player[,1]) 87 | #print(playerList%in% selectedPlayer) 88 | stateList <- table_state[,1] 89 | 90 | playerData <- table_player[ playerList%in% selectedPlayer ,] 91 | stateData <- table_state[ stateList%in% selectedState ,] 92 | insertRow <- c("Global", apply(stateData[,2:13], 2, mean)) 93 | playerDf <- playerData 94 | #print(playerDf) 95 | playerDf <- rbind(playerData, insertRow) 96 | #print(playerDf) 97 | names(playerDf) <- c("Player","2011_First stage in first half","2011_Second stage in first half","2011_First stage in second half","2011_Second stage in second half", 98 | "2012_First stage in first half","2012_Second stage in first half","2012_First stage in second half","2012_Second stage in second half", 99 | "2013_First stage in first half","2013_Second stage in first half","2013_First stage in second half","2013_Second stage in second half" 100 | ) 101 | 102 | plotDf <- t(playerDf) 103 | colnames(plotDf) <- toUTF8(plotDf[1,]) 104 | 105 | plotDf <- plotDf[-1,] 106 | eLineOutput <- eLine(plotDf) 107 | #eLineOutput$html$chart <- gsub("http://echarts.baidu.com/doc/example/www", ".", eLineOutput$html$chart) 108 | #print(eLineOutput) 109 | return(eLineOutput) 110 | }) 111 | 112 | output$PiePlot <- renderEcharts({ 113 | plotDf <- datasetInput() 114 | playerDf <- plotDf$playerData 115 | 116 | outputDf <- apply(playerDf[,2:5], 2, mean) 117 | 118 | #print(playerDf) 119 | names(outputDf) <- c("First Stage in first half","Second Stage in first half","First Stage in second half","Second Stage in second half") 120 | 121 | ePieOutput <- ePie(outputDf, main=toUTF8("distribution of stamina")) 122 | #ePieOutput$html$chart <- gsub("http://echarts.baidu.com/doc/example/www", ".", ePieOutput$html$chart) 123 | 124 | return(ePieOutput) 125 | }) 126 | 127 | 128 | }) 129 | 130 | 131 | 132 | 133 | # runApp("E:/kuaipan/git/recharts/inst/shiny/recharts_shiny_football_en/") 134 | 135 | -------------------------------------------------------------------------------- /R/eMap.R: -------------------------------------------------------------------------------- 1 | #' Map charts 2 | #' 3 | #' ECharts style map charts. Only support CHINA now. 4 | #' 5 | #' @param dat data.frame, rownames are province names. 6 | #' @param opt option of ECharts. 7 | #' @return The HTML code as a character string. 8 | #' @export 9 | #' @examples 10 | #' options(encoding="UTF-8") 11 | #' Sys.setlocale("LC_CTYPE","chs") 12 | #' load(url('http://yzhou.org/recharts/ChinaGDP.RData')) 13 | #' 14 | #' plot(eMap(ChinaGDP)) 15 | 16 | eMap = function(dat, namevar=NULL, datavar=2:ncol(dat), size = c(1024, 768), region="china", color=c("#1e90ff", "#f0ffff"), 17 | title = NULL, subtitle = NULL, title.x = "center", title.y = "top", 18 | legend = TRUE, legend.x = "left", legend.y= "top", legend.orient="horizontal", 19 | toolbox = TRUE, toolbox.orient = "horizontal", toolbox.x = "right", toolbox.y = "top", 20 | dataRange = TRUE, dataRange.x="left", dataRange.y="bottom", dataRange.min=NULL, dataRange.max=NULL, 21 | dataRange.calculable=TRUE, dataRange.text=c("high", "low"), dataRange.orient="horizontal", 22 | dataView = FALSE, readOnly = FALSE, mark=TRUE, dataZoom=FALSE, 23 | tooltip = TRUE, tooltip.trigger="item", formatter="", 24 | calculable=FALSE, xlab = NULL, ylab=NULL, 25 | showLabel=TRUE, opt = list()) { 26 | 27 | region = switch(region, 28 | beijing = "北京", 29 | shanghai = "上海", 30 | tianjin = "天津", 31 | heilongjiang = "黑龙江", 32 | neimenggu = "内蒙古", 33 | jilin = "吉林", 34 | liaoning = "辽宁", 35 | tianjin = "天津", 36 | hebei = "河北", 37 | shandong = "山东", 38 | shanxi = "山西", 39 | shannxi = "陕西", 40 | ningxia = "宁夏", 41 | gansu = "甘肃", 42 | qinghai = "青海", 43 | xizang = "西藏", 44 | xinjiang = "新疆", 45 | sichuan = "四川", 46 | yunnan = "云南", 47 | guizhou = "贵州", 48 | chongqing = "重庆", 49 | guangxi = "广西", 50 | guangdong = "广东", 51 | hainan = "海南", 52 | taiwan = "台湾", 53 | macau = "澳门", 54 | hongkong = "香港", 55 | fujian = "福建", 56 | jiangxi = "江西", 57 | hunan = "湖南", 58 | hunbei = "湖北", 59 | anhui = "安徽", 60 | zhejiang = "浙江", 61 | jiangsu = "江苏", 62 | henan = "河南", 63 | region 64 | ) 65 | 66 | if(class(datavar) == "integer" | class(datavar) == "numeric"){ 67 | datavar = colnames(dat)[datavar] 68 | datavar = datavar[!is.na(datavar)] 69 | }else{ 70 | datavar = datavar[datavar%in%colnames(dat)] 71 | } 72 | print(datavar) 73 | if (missing(namevar)| is.null(namevar)){ 74 | insertColumn <- rownames(dat) 75 | dat <- cbind(insertColumn, dat) 76 | colnames(dat)[1] <- "region" 77 | namevar = "region" 78 | } 79 | 80 | if(length(namevar) > 1) namevar=namevar[1] 81 | if(class(namevar) == "integer" | class(namevar) == "numeric"){ 82 | namevar = colnames(dat)[as.numeric(namevar)] 83 | }else if(!namevar %in% colnames(dat)){ 84 | namevar = colnames(dat)[1] 85 | } 86 | 87 | if(length(datavar) == 0) datavar = colnames(dat)[2] 88 | if(length(namevar) == 0) namevar = colnames(dat)[1] 89 | 90 | validData <- dat[,c(namevar, datavar)] 91 | 92 | # legendData set 93 | legendData <- datavar 94 | opt$legend = recharts:::legendSet(legend=legend, data=legendData, legend.x=legend.x, legend.y=legend.y, orient=legend.orient) 95 | 96 | valueDf <- dat[,datavar] 97 | 98 | # option$title format. 99 | opt$title = recharts:::tilteSet(title = title, subtitle=subtitle, 100 | title.x = title.x, title.y = title.y) 101 | 102 | opt$calculable = recharts:::calculableSet(calculable = calculable) 103 | 104 | # opt$tooltip format, not open to user now. 105 | opt$tooltip = recharts:::tooltipSet( tooltip=tooltip,trigger=tooltip.trigger, 106 | formatter = "", islandFormatter="") 107 | 108 | opt$toolbox = recharts:::toolboxSet(toolbox=toolbox, toolbox.x=toolbox.x, toolbox.y=toolbox.y, orient=toolbox.orient, 109 | dataView=dataView, mark=mark, dataZoom = dataZoom, magicType = FALSE, restore = TRUE, readOnly = readOnly, 110 | saveAsImage=TRUE) 111 | 112 | 113 | if(missing(dataRange.min)|is.null(dataRange.min)){ 114 | dataRange.min=min(validData[,datavar], na.rm = TRUE) 115 | } 116 | 117 | if(missing(dataRange.max)|is.null(dataRange.max)){ 118 | dataRange.max=max(validData[,datavar], na.rm = TRUE) 119 | } 120 | 121 | opt$dataRange = recharts:::dataRangeSet(dataRange=dataRange, calculable=dataRange.calculable, dataRange.x=dataRange.x, dataRange.y=dataRange.y, 122 | dataRange.text = dataRange.text, color=color, precision=1, orient=dataRange.orient, min=dataRange.min, max=dataRange.max) 123 | 124 | opt$series = vector("list", length(datavar)) 125 | for(i in 1:length(datavar)){ 126 | outputData <- list() 127 | #print(datavar[i]) 128 | outputData <- lapply(1:nrow(validData), FUN = function(X){ 129 | list( name= validData[X, namevar], value = validData[X, datavar[i]], selected="false") 130 | }) 131 | 132 | opt$series[[i]] = list( 133 | name = datavar[i], 134 | type = "map", 135 | mapType = region, 136 | itemStyle = list( 137 | normal = list( 138 | label = list(show=showLabel) 139 | ) 140 | ), 141 | data = outputData 142 | ) 143 | } 144 | 145 | 146 | jsonStr <- toJSON(opt, pretty=TRUE) 147 | outList <- .rechartsOutput(jsonStr, charttype="eMap", size=size) 148 | opt$size = size 149 | output <- list(outList=outList, opt=opt) 150 | class(output) <- c("recharts", "eMap", "list") 151 | 152 | ### output list format 153 | return(output) 154 | } -------------------------------------------------------------------------------- /inst/shiny/recharts_shiny_football/www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 中国球员跑动距离 16 | 17 | 18 |
19 |
20 |
21 |

中国球员与其他国家跑动距离

22 |
23 |
24 |
25 |
26 |
27 | 28 | 29 | 30 | 31 | 36 | 37 | 38 | 52 | 53 | 82 | 83 | 84 | 85 | 92 |
93 |
94 |
95 | 97 | 98 | 99 | 100 | 101 | 102 |
103 |
104 |
105 |
106 |
107 |
108 | 109 | -------------------------------------------------------------------------------- /inst/shiny/lazyPlot/eMap/www/script.js: -------------------------------------------------------------------------------- 1 | 2 | $("#eDataZoom_colorSetting").change(dataZoomColorSetting) 3 | function dataZoomColorSetting(){ 4 | 5 | 6 | 7 | if ($("#eDataZoom_colorSetting").prop("checked")){ 8 | $("label[for=eDataZoom_backgroundColor]").show() 9 | $("label[for=eDataZoom_databackgroundColor]").show() 10 | $("label[for=eDataZoom_fillerColor]").show() 11 | $("label[for=eDataZoom_handleColor]").show() 12 | 13 | $("#eDataZoom_backgroundColor").show() 14 | $("#eDataZoom_databackgroundColor").show() 15 | $("#eDataZoom_fillerColor").show() 16 | $("#eDataZoom_handleColor").show() 17 | }else{ 18 | $("label[for=eDataZoom_backgroundColor]").hide() 19 | $("label[for=eDataZoom_databackgroundColor]").hide() 20 | $("label[for=eDataZoom_fillerColor]").hide() 21 | $("label[for=eDataZoom_handleColor]").hide() 22 | 23 | $("#eDataZoom_backgroundColor").hide() 24 | $("#eDataZoom_databackgroundColor").hide() 25 | $("#eDataZoom_fillerColor").hide() 26 | $("#eDataZoom_handleColor").hide() 27 | } 28 | } 29 | dataZoomColorSetting() 30 | 31 | $("#eAxisX_layoutSetting").change(xAxisLayoutSetting) 32 | function xAxisLayoutSetting(){ 33 | if ($("#eAxisX_layoutSetting").prop("checked")){ 34 | $("label[for=eAxisX_valueLabel]").show() 35 | $("label[for=eAxisX_label_color]").show() 36 | $("label[for=eAxisX_label_fontSize]").show() 37 | $("label[for=eAxisX_label_margin]").show() 38 | $("label[for=eAxisX_label_rotate]").show() 39 | $("label[for=eAxisX_label_interval]").show() 40 | $("label[for=eAxisX_tick_show]").show() 41 | $("label[for=eAxisX_tick_color]").show() 42 | $("label[for=eAxisX_tick_width]").show() 43 | $("label[for=eAxisX_tick_length]").show() 44 | $("label[for=eAxisX_splitLine]").show() 45 | $("label[for=eAxisX_splitArea]").show() 46 | 47 | $("#eAxisX_valueLabel").show() 48 | $("#eAxisX_label_color").show() 49 | $("#eAxisX_label_fontSize").show() 50 | $("#eAxisX_label_margin").show() 51 | $("#eAxisX_label_rotate").show() 52 | $("#eAxisX_label_interval").show() 53 | $("#eAxisX_tick_show").show() 54 | $("#eAxisX_tick_color").show() 55 | $("#eAxisX_tick_width").show() 56 | $("#eAxisX_tick_length").show() 57 | $("#eAxisX_splitLine").show() 58 | $("#eAxisX_splitArea").show() 59 | }else{ 60 | $("label[for=eAxisX_valueLabel]").hide() 61 | $("label[for=eAxisX_label_color]").hide() 62 | $("label[for=eAxisX_label_fontSize]").hide() 63 | $("label[for=eAxisX_label_margin]").hide() 64 | $("label[for=eAxisX_label_rotate]").hide() 65 | $("label[for=eAxisX_label_interval]").hide() 66 | $("label[for=eAxisX_tick_show]").hide() 67 | $("label[for=eAxisX_tick_color]").hide() 68 | $("label[for=eAxisX_tick_width]").hide() 69 | $("label[for=eAxisX_tick_length]").hide() 70 | $("label[for=eAxisX_splitLine]").hide() 71 | $("label[for=eAxisX_splitArea]").hide() 72 | 73 | $("#eAxisX_valueLabel").hide() 74 | $("#eAxisX_label_color").hide() 75 | $("#eAxisX_label_fontSize").hide() 76 | $("#eAxisX_label_margin").hide() 77 | $("#eAxisX_label_rotate").hide() 78 | $("#eAxisX_label_interval").hide() 79 | $("#eAxisX_tick_show").hide() 80 | $("#eAxisX_tick_color").hide() 81 | $("#eAxisX_tick_width").hide() 82 | $("#eAxisX_tick_length").hide() 83 | $("#eAxisX_splitLine").hide() 84 | $("#eAxisX_splitArea").hide() 85 | } 86 | 87 | } 88 | 89 | $("#eAxisY_layoutSetting").change(yAxisLayoutSetting) 90 | function yAxisLayoutSetting(){ 91 | if ($("#eAxisY_layoutSetting").prop("checked")){ 92 | $("label[for=eAxisY_valueLabel]").show() 93 | $("label[for=eAxisY_label_color]").show() 94 | $("label[for=eAxisY_label_fontSize]").show() 95 | $("label[for=eAxisY_label_margin]").show() 96 | $("label[for=eAxisY_label_rotate]").show() 97 | $("label[for=eAxisY_label_interval]").show() 98 | $("label[for=eAxisY_tick_show]").show() 99 | $("label[for=eAxisY_tick_color]").show() 100 | $("label[for=eAxisY_tick_width]").show() 101 | $("label[for=eAxisY_tick_length]").show() 102 | $("label[for=eAxisY_splitLine]").show() 103 | $("label[for=eAxisY_splitArea]").show() 104 | 105 | $("#eAxisY_valueLabel").show() 106 | $("#eAxisY_label_color").show() 107 | $("#eAxisY_label_fontSize").show() 108 | $("#eAxisY_label_margin").show() 109 | $("#eAxisY_label_rotate").show() 110 | $("#eAxisY_label_interval").show() 111 | $("#eAxisY_tick_show").show() 112 | $("#eAxisY_tick_color").show() 113 | $("#eAxisY_tick_width").show() 114 | $("#eAxisY_tick_length").show() 115 | $("#eAxisY_splitLine").show() 116 | $("#eAxisY_splitArea").show() 117 | }else{ 118 | $("label[for=eAxisY_valueLabel]").hide() 119 | $("label[for=eAxisY_label_color]").hide() 120 | $("label[for=eAxisY_label_fontSize]").hide() 121 | $("label[for=eAxisY_label_margin]").hide() 122 | $("label[for=eAxisY_label_rotate]").hide() 123 | $("label[for=eAxisY_label_interval]").hide() 124 | $("label[for=eAxisY_tick_show]").hide() 125 | $("label[for=eAxisY_tick_color]").hide() 126 | $("label[for=eAxisY_tick_width]").hide() 127 | $("label[for=eAxisY_tick_length]").hide() 128 | $("label[for=eAxisY_splitLine]").hide() 129 | $("label[for=eAxisY_splitArea]").hide() 130 | 131 | $("#eAxisY_valueLabel").hide() 132 | $("#eAxisY_label_color").hide() 133 | $("#eAxisY_label_fontSize").hide() 134 | $("#eAxisY_label_margin").hide() 135 | $("#eAxisY_label_rotate").hide() 136 | $("#eAxisY_label_interval").hide() 137 | $("#eAxisY_tick_show").hide() 138 | $("#eAxisY_tick_color").hide() 139 | $("#eAxisY_tick_width").hide() 140 | $("#eAxisY_tick_length").hide() 141 | $("#eAxisY_splitLine").hide() 142 | $("#eAxisY_splitArea").hide() 143 | } 144 | 145 | } 146 | xAxisLayoutSetting() 147 | yAxisLayoutSetting() 148 | -------------------------------------------------------------------------------- /inst/shiny/recharts_shiny_football_en/www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | Run distance of football players 16 | 17 | 18 |
19 |
20 |
21 |

Run distance of football players

22 |
23 |
24 |
25 |
26 |
27 | 28 | 29 | 30 | 31 | 36 | 37 | 38 | 52 | 53 | 82 | 83 | 84 | 85 | 92 |
93 |
94 |
95 | 97 | 98 | 99 | 100 | 101 | 102 |
103 |
104 |
105 |
106 |
107 |
108 | 109 | -------------------------------------------------------------------------------- /inst/slidify/libraries/frameworks/shower/themes/ribbon/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Ribbon theme for Shower 5 | 6 | 7 | 8 | 9 | 10 | 11 | 15 |
16 |

Presentation Title

17 |

Author Name

18 |
19 |
20 |

Header

21 |

Typewriter etsy messenger bag fingerstache, aesthetic vinyl semiotics twee DIY forage chillwave. Thundercats ennui messenger bag, squid carles chillwave shoreditch pickled cliche letterpress. DIY beard locavore occupy salvia, whatever single-origin coffee fanny pack 3 wolf moon typewriter gastropub kale chips.

22 |

Secondary footnote.

23 |
24 | Typewriter etsy messenger bag fingerstache. 25 |
26 |
27 |
28 |

Lists in English typography

29 |
    30 |
  • Ennui keffiyeh thundercats
  • 31 |
  • Jean shorts biodiesel
  • 32 |
  • Terry richardson, swag blog 33 |
      34 |
    1. Locavore umami vegan helvetica
    2. 35 |
    3. Fingerstache kale chips
    4. 36 |
    5. Keytar sriracha gluten-free
    6. 37 |
    38 |
  • 39 |
  • Before they sold out master
  • 40 |
41 |
42 | Typewriter etsy messenger bag fingerstache, aesthetic vinyl semiotics twee DIY forage chillwave. Thundercats ennui messenger bag. 43 |
44 |
45 |
46 |

Lists in Russian typography

47 |
    48 |
  • Ennui keffiyeh thundercats
  • 49 |
  • Jean shorts biodiesel
  • 50 |
  • Terry richardson, swag blog 51 |
      52 |
    1. Locavore umami vegan helvetica
    2. 53 |
    3. Fingerstache kale chips
    4. 54 |
    5. Keytar sriracha gluten-free
    6. 55 |
    56 |
  • 57 |
  • Before they sold out master
  • 58 |
59 |
60 |
61 |

Quote

62 |
63 |
64 |

Typewriter etsy messenger bag fingerstache, aesthetic vinyl semiotics twee DIY forage chillwave. Thundercats ennui messenger bag, squid carles chillwave shoreditch pickled cliche letterpress. DIY beard locavore occupy salvia, whatever single-origin coffee fanny pack 3 wolf moon typewriter gastropub kale chips.

65 |
66 |
Author Name
67 |
68 |
69 |
70 |

Code listing

71 |
 72 | 			<html lang="en">
 73 | 			<head> <!--Comment-->
 74 | 			    <title>Shower</title>
 75 | 			    <meta charset="UTF-8">
 76 | 			    <link rel="stylesheet" href="s/screen.css">
 77 | 			    <script src="j/jquery.js"></script>
 78 | 			</head>
 79 | 		
80 |
81 |
82 |

Code listing

83 |
<html lang="en">
 84 | <head> <!--Comment-->
 85 |     <title>Shower</title>
 86 |     <meta charset="UTF-8">
 87 |     <link rel="stylesheet" href="s/screen.css">
 88 |     <script src="j/jquery.js"></script>
 89 | </head>
90 |
91 |
92 |

Shout

93 |
94 |
95 | 96 |
97 |
98 | 99 |
100 |
101 | 102 |
103 | Typewriter etsy messenger bag fingerstache, aesthetic vinyl semiotics twee DIY forage chillwave. Thundercats ennui messenger bag. 104 |
105 |
106 |
107 | 108 |
109 |
110 | 111 |
112 |
113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 |
123 |
124 |

Timer

125 |

Three seconds to go.

126 |
127 |
128 |

List navigation

129 |
    130 |
  1. Ennui keffiyeh thundercats
  2. 131 | 132 | 133 | 134 | 135 | 136 | 137 |
138 |
139 |

Fork me on Github

140 | 144 |
145 | 146 | 147 | 148 | -------------------------------------------------------------------------------- /R/ePoints.R: -------------------------------------------------------------------------------- 1 | #' Points charts 2 | #' 3 | #' ECharts style scatter charts. 4 | #' 5 | #' @param dat data.frame, should have two column or three colume. 6 | #' If three, the third colume should be factor or character, it will be treated as category labels. 7 | #' @param opt option of ECharts. 8 | #' @return The HTML code as a character string. 9 | #' @export 10 | #' @examples 11 | #' plot(ePoints(iris[,3:5])) 12 | 13 | ePoints = function(dat, size = c(1024, 768), xvar=NULL, yvar=NULL, namevar=NULL, power=2, precision=2, 14 | title = NULL, subtitle = NULL, title.x = "center", title.y = "top", 15 | legend = TRUE, legend.data=NULL, legend.x = "left", legend.y= "top", legend.orient="horizontal", 16 | toolbox = TRUE, toolbox.orient = "horizontal", toolbox.x = "right", toolbox.y = "top", 17 | dataView = TRUE, readOnly = FALSE, mark=TRUE, dataZoom=TRUE, magicType=TRUE, 18 | tooltip = TRUE, tooltip.trigger="item", formatter="", axis.scale=TRUE, 19 | axis.line=TRUE, axis.tick=FALSE, axis.lable=TRUE, axis.splitLine=TRUE, axis.splitArea=FALSE, axis.boundaryGap=TRUE, 20 | xlab=TRUE, xlab.type="value", xlab.data=NULL, xlab.position="bottom", 21 | xlab.name = "", xlab.namePosition="start", xlim=NULL, 22 | ylab=TRUE, ylab.type="value", ylab.data=NULL, ylab.position="left", 23 | ylab.name = "", ylab.namePosition="start", ylim=NULL, 24 | calculable=FALSE, showLabel=TRUE, opt = list()) 25 | { 26 | ### ePoint data setting, 27 | # preprocess data to xvar, yvar, namevar. 28 | 29 | # format the dat to data.frame 30 | if (class(dat) != "data.frame") dat <- as.data.frame(dat, stringsAsFactor=F) 31 | 32 | if(ncol(dat)<2) { 33 | stop("dim(dat)[2] should be 2 or 3.") 34 | }else if(ncol(dat) == 2){ 35 | dat[,3] == "default" 36 | colnames(dat)[3] = "name" 37 | namevar = "name" 38 | } 39 | 40 | if(missing(xvar) | is.null(xvar)) xvar = colnames(dat)[1] 41 | if(missing(yvar) | is.null(yvar)) yvar = colnames(dat)[2] 42 | if(missing(namevar) | is.null(namevar)){ 43 | namevar = "defaultName" 44 | dat[,"defaultName"] = "default" 45 | } 46 | 47 | if(length(xvar) > 1) xvar = xvar[1] 48 | if(class(xvar) == "integer" | class(xvar) == "numeric"){ 49 | if (xvar > ncol(dat)){ 50 | stop("wrong xvar input...") 51 | }else{ 52 | xvar = colnames(dat)[xvar] 53 | } 54 | }else if(!xvar %in% colnames(dat)){ 55 | stop("wrong xvar input...") 56 | } 57 | 58 | if(length(yvar) > 1) yvar = yvar[1] 59 | if(class(yvar) == "integer" | class(yvar) == "numeric"){ 60 | if (yvar > ncol(dat)){ 61 | stop("wrong yvar input...") 62 | }else{ 63 | yvar = colnames(dat)[yvar] 64 | } 65 | }else if(!yvar %in% colnames(dat)){ 66 | stop("wrong yvar input...") 67 | } 68 | 69 | if(length(namevar) > 1) namevar = namevar[1] 70 | if(class(namevar) == "integer" | class(namevar) == "numeric"){ 71 | if (namevar > ncol(dat)){ 72 | stop("wrong namevar input...") 73 | }else{ 74 | namevar = colnames(dat)[namevar] 75 | } 76 | }else if(!namevar %in% colnames(dat)){ 77 | stop("wrong namevar input...") 78 | } 79 | 80 | 81 | 82 | # if the xvar/yvar/namevar is null, will use the first column of dat as default. And check the xvar in the dat colnames. 83 | if (is.null(xvar) || !xvar %in% colnames(dat)) xvar = colnames(dat)[1] 84 | if (is.null(yvar) || !yvar %in% colnames(dat)) yvar = colnames(dat)[2] 85 | if (is.null(namevar) || !namevar %in% colnames(dat)) namevar = colnames(dat)[3] 86 | 87 | dat <- dat[,c(xvar, yvar, namevar)] 88 | 89 | group <- unique(dat[,3]) 90 | 91 | # option$title format. 92 | opt$title = tilteSet(title = title, subtitle=subtitle, 93 | title.x = title.x, title.y = title.y) 94 | 95 | opt$calculable = calculableSet(calculable = calculable) 96 | 97 | # opt$tooltip format, not open to user now. 98 | opt$tooltip = tooltipSet( tooltip=tooltip,trigger=tooltip.trigger, 99 | formatter = "", islandFormatter="") 100 | 101 | opt$toolbox = toolboxSet(toolbox=toolbox, toolbox.x=toolbox.x, toolbox.y=toolbox.y, orient=toolbox.orient, 102 | dataView=dataView, mark=mark, dataZoom = dataZoom, magicType = magicType, restore = TRUE, readOnly = readOnly, 103 | saveAsImage=TRUE) 104 | 105 | if(missing(legend.data) | is.null(legend.data)){legendData = group 106 | }else{legendData = legend.data} 107 | 108 | opt$legend = legendSet( legend=legend, data=legendData, legend.x=legend.x, legend.y=legend.y, orient=legend.orient) 109 | 110 | opt$xAxis = xAxisSet(axisShow=xlab, type=xlab.type, data=xlab.data, position=xlab.position, 111 | labelName=xlab.name, label.namePosition=xlab.namePosition, lim=xlim, 112 | axisLine=axis.line, axisTick=axis.tick, axisLable=axis.lable, splitLine=axis.splitLine, 113 | splitArea=axis.splitArea, boundaryGap=axis.boundaryGap, scale=axis.scale, power=power, precision=precision) 114 | 115 | opt$yAxis = yAxisSet(axisShow=ylab, type=ylab.type, data=ylab.data, position=ylab.position, 116 | labelName=ylab.name, label.namePosition=ylab.namePosition, lim=ylim, 117 | axisLine=axis.line, axisTick=axis.tick, axisLable=axis.lable, splitLine=axis.splitLine, 118 | splitArea=axis.splitArea, boundaryGap=axis.boundaryGap, scale=axis.scale, power=power, precision=precision) 119 | 120 | 121 | opt$series = vector("list", length(group)) 122 | for(i in 1:length(group)) { 123 | if(dim(dat)[2]==2) { 124 | mat = as.matrix(dat) 125 | } else { 126 | mat = as.matrix(dat[which(dat[,3]==group[i]), 1:2]) 127 | } 128 | colnames(mat) = NULL 129 | rownames(mat) = NULL 130 | 131 | if(is.null(opt$series[[i]]$type)) { 132 | opt$series[[i]]$type = 'scatter' 133 | } 134 | 135 | if(is.null(opt$series[[i]]$name) & dim(dat)[2]==3) { 136 | opt$series[[i]]$name = group[i] 137 | } else { 138 | warning("You'd better set series:name with y.") 139 | } 140 | 141 | if(is.null(opt$series[[i]]$data)) { 142 | opt$series[[i]]$data = mat 143 | } else { 144 | warning('You can set series:data with y.') 145 | } 146 | } 147 | 148 | jsonStr <- toJSON(opt, pretty=TRUE) 149 | outList <- .rechartsOutput(jsonStr, charttype="ePoints", size=size) 150 | opt$size = size 151 | output <- list(outList=outList, opt=opt) 152 | class(output) <- c("recharts", "ePoints", "list") 153 | 154 | ### output list format 155 | return(output) 156 | } 157 | 158 | --------------------------------------------------------------------------------