Giter Club home page Giter Club logo

recharts's Issues

图的尺寸

请问如何控制图的尺寸, 如: width, height?

用recharts制作混搭图,yAxis参数如何设置才能得到2个数轴?

代码如下:
eBar(as.data.frame(temp),opt=list(yAxis=list(list(name='a',type='value'),list(name='b',type='value',splitNumber=0.5)),series=list(list(stack='c'),list(stack='c'),list(type='line',yAxisIndex=1))))
得到的HTML code 如下:
"yAxis" : {
"" : {
"name" : "a",
"type" : "value"
},
"" : {
"name" : "b",
"type" : "value",
"splitNumber" : 0.5
},
"type" : "value"
},
yAxis参数该如何设置才能得到如下结果:
"yAxis" : [
{"name" : "a",
"type" : "value"
},
{"name" : "b",
"type" : "value",
"splitNumber" : 0.5
},
使用上述格式设置series参数可以得到希望的结果,为什么yAxis参数不行?

eCharts

@yihui @taiyun I am already working on an eCharts integration in rCharts. Let me know if you guys want to work together.

eForce 无法画图

eForce里面的例子 没画成功过,一片空白
networkMatrix <- matrix(c( c(0, 1, 2, 1, 2, 3, 6, 6, 1, 1, 1 ), c(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), c(2, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0 ), c(1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0 ), c(2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ), c(3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ), c(6, 0, 1, 1, 1, 1, 0, 6, 0, 1, 0 ), c(6, 0, 0, 1, 0, 0, 6, 0, 0, 0, 0 ), c(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), c(1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 ), c(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) ), ncol=11 ); propertyDf <- data.frame( category = c("人物", "家人", "家人", "家人", "家人", "朋友","朋友", "朋友", "朋友", "朋友", "朋友"), name = c("Steven Jobs", "Lisa Jobs", "Paul Jobs", " Kalala Jobs","Lauren Powell", "Steve woz Ike", "Obama", "Bill Gates","Jonathan", "Tim Cook", "Wayne"), value = c(10, 2, 3, 3, 7, 5, 8, 9, 4, 4, 0) ); rownames(propertyDf) = propertyDf$name; eForce(networkMatrix=networkMatrix, propertyDf=propertyDf)

ERROR: unable to collate and parse R files for package ‘recharts’

install_github(‘taiyun/recharts’)
Downloading github repo taiyun/recharts@master
Installing recharts
“C:/PROGRA1/R/R-311.2/bin/i386/R” –vanilla CMD
INSTALL
“C:\Users\AppData\Local\Temp\RtmpYPKjOV\devtools1cc8a6d5719\taiyun-recharts-8e4da23″
–library=”C:/Program Files/R/R-3.1.2/library”
–install-tests

  • installing source package ‘recharts’ …
    ** R
    Error in parse(outFile) : 句法分析器31行里不能有多字节字符
    ERROR: unable to collate and parse R files for package ‘recharts’
  • removing ‘C:/Program Files/R/R-3.1.2/library/recharts’
    Error: Command failed (1)

shiny 里面地图不显示

麻烦帮忙看一下
library(recharts)
library(shiny)
app = shinyApp(
ui = fluidPage(eChartOutput('myChart')),
server = function(input, output) {
mapData <- head(mapTestData_chs, 5)
chart= eMap(mapData, namevar=~stdName, datavar = ~val1 + val2)
output$myChart = renderEChart(chart) }
)

if (interactive()) runApp(app)

Error: Sys.setlocale("LC_CTYPE","chs")

警告信息:
In Sys.setlocale("LC_CTYPE", "chs") :
操作系统报告说无法执行将本地化设成"chs"的请求.

本地系统本身就是中文的.
在Map例子里的代码跑出来地图全灰无着色,图例的中文不显示,鼠标放在某一区域只显示区域名,三个指标显示不出来

环境:国产Linuxdeepin系统,基于Ubuntu的,32位.R3.0.1

Build failure?

Sadly I am not successful in building the rechart. I am using RStudio and with R 2.15.2 in win7.

Here what I did and what I got:

> install_github('recharts','taiyun')
Installing github repo(s) recharts/master from taiyun
Downloading recharts.zip from https://github.com/taiyun/recharts/archive/master.zip
Installing package from C:\Users\ADMINI~1\AppData\Local\Temp\RtmpOAbRk5/recharts.zip
Installing recharts
"C:/PROGRA~1/R/R-215~1.2/bin/i386/R" --vanilla  \
  CMD INSTALL  \
  "C:\Users\Administrator\AppData\Local\Temp\RtmpOAbRk5\recharts-master"  \
  --library="C:/Program  \
  Files/R/R-2.15.2/library" --with-keep.source  \
  --install-tests 

* installing *source* package 'recharts' ...
** R
** demo
** inst
** preparing package for lazy loading
Warning: package 'RJSONIO' was built under R version 2.15.3
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Warning: package 'RJSONIO' was built under R version 2.15.3

* DONE (recharts)


> demo(recharts::recharts)
错误于demo(recharts::recharts) : 没有与題目‘recharts’有关的演示

So do you have any suggestions?

thanks,

Sigma

Can't see echarts plot in shiny

I can't see echarts plot when I use recharts in shiny app. Here is a reproducible example:

# server.R
library(shiny)

shinyServer(function(input, output) {
  library(recharts)
  option(shiny.transcode.json = FALSE)

  output$res <- renderEcharts({
    recharts.init()
    eBarOutput <- eBar(iris[1:6, 1:4])
    return(eBarOutput)
  })
})
# ui.R
library(shiny)
library(recharts)

shinyUI(fluidPage(
  titlePanel('test recharts shiny'),
  sidebarLayout(
    sidebarPanel(),
    mainPanel(
      includeHTML(recharts.shiny.init()),
      htmlOutput('res')
    )
  )
))

And I tried demo(recharts::recharts_shiny), still couldn't see the results.
However, plot(eBar(iris[1:6, 1:4])) will show echarts plot correctly.

I got the same result in both Ubuntu(12.04) and OS X(10.10). See sessioninfo below:

> sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-apple-darwin13.4.0 (64-bit)

locale:
[1] zh_CN.UTF-8/zh_CN.UTF-8/zh_CN.UTF-8/C/zh_CN.UTF-8/zh_CN.UTF-8

attached base packages:
[1] tools     stats     graphics  grDevices utils     datasets  methods  
[8] base     

other attached packages:
[1] recharts_0.01  shiny_0.11     RJSONIO_1.3-0  colorout_1.0-3

loaded via a namespace (and not attached):
[1] digest_0.6.8    htmltools_0.2.6 httpuv_1.3.2    mime_0.2       
[5] R6_2.0.1        Rcpp_0.11.3     xtable_1.7-4
> sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=zh_CN.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=zh_CN.UTF-8        LC_COLLATE=zh_CN.UTF-8    
 [5] LC_MONETARY=zh_CN.UTF-8    LC_MESSAGES=zh_CN.UTF-8   
 [7] LC_PAPER=zh_CN.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=zh_CN.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] tools     stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] recharts_0.01   RJSONIO_1.2-0.2 shiny_0.9.1    

loaded via a namespace (and not attached):
[1] bitops_1.0-6 caTools_1.17 digest_0.6.4 httpuv_1.3.0 Rcpp_0.11.3  xtable_1.7-3

多个图合并

在一个坐标系统中绘制多个图形,比如一个柱状图一个折线图,如何绘制?

在flexdashboard的编码问题

x = data.frame(dt=1:6, buymoney=1:6, ordertype=c('充值','充值','充值','提现','提现', '提现'))
eBar(dat= x, xvar=~dt, yvar=~buymoney, series=~ordertype)

同一段代码在Rstudio的viewer中正常显示中文,但是在rmarkdown的flexdashboard格式里中文乱码了

title: 'test'
output: 
  flexdashboard::flex_dashboard:
    orientation: rows
    source_code: embed
runtime: shiny

调用eMap时出现incorrect number of dimesions的错误

好吧我又来了....
image

还有两个小问题:

  • bar chart要用plyr,是不是可以把需要用这个包的前提加到文档里?
  • 装好package以后第一次运行demo,eForce和eLine画图比较慢。画好以后退出,然后再次运行demo又很快了。这是因为第一次要build一些东西吗?

无法安装recharts

您好,
我在安装的时候报错
require(devtools) devtools::install_github('taiyun/recharts')

Error in curl::curl_fetch_disk(url, x$path, handle = handle) :
Problem with the SSL CA cert (path? access rights?)
请问这个是怎么回事?

和flexdashboard结合有问题

我用这个包在Rmarkdown的flexdashboard框架,单页的时候无任何问题,但是多页的时候,除了第一页后面的页面图都变得特别小。后来改成plotly包试了一下,就没有这个问题,有解决方案么?

Open list option for title like the API

Hi,

I am working with this wonderful package, thank you very much for this.

I am working and I wanna use the title options like the app in ePlot iniside the opt parameter, i think that this behaivor is more naturally for the user.

Thanks for your atention

ePie的用法和R包里的文档不一样?

用?ePie查使用方法:
Usage

ePie(dat, opt = list())

但是实际用的时候说不存在opt这个argument,而是下面这样...请问这一个opt是不是还没开发...

image

Refactor this package based on CRAN htmlwidgets

Dear Maintainers,

I notice that some active R package developers publish this package for integrating html/js library with R.

Currently, rechrats does not work on shiny application, so maybe it is a time to refactor this package based on this framework.

How do you think?

recharts更新计划

以下是recharts更新计划, 将会按照功能逐步补齐代码, 文档等内容
~~内容将会在dev分支进行更新, 欢迎大家贡献代码. ~~
已经更新至master分支

文档结构已更新, 见:

http://recharts.cosx.org

结构问题

  • htmlwidgets结构
    • 基础Htmlwidgets
    • 自动resize
    • 更新Echarts内核
  • 在线文档结构

基础功能

  • JSON/List对象绘图

    • 对象绘图 函数开发
    • 对象绘图 帮助文档
    • 对象绘图 在线文档
  • 散点图

    • 散点图 函数开发
    • 散点图 帮助文档
    • 散点图 在线文档
  • 折线图

    • 折线图 函数开发
    • 折线图 帮助文档
    • 折线图 在线文档
  • 柱状图

    • 柱状图 函数开发
    • 柱状图 帮助文档
    • 柱状图 在线文档
  • 地图

    • 地图 函数开发
    • 地图 帮助文档
    • 地图 在线文档
  • 饼图

    • 饼图 函数开发
    • 饼图 帮助文档
    • 饼图 在线文档
  • 雷达图

    • 雷达图 函数开发
    • 雷达图 帮助文档
    • 雷达图 在线文档
  • K线图

    • K线图 函数开发
    • K线图 帮助文档
    • K线图 在线文档
  • 箱线图

    • 箱线图 函数开发
    • 箱线图 帮助文档
    • 箱线图 在线文档
  • 热力图

    • 热力图 函数开发
    • 热力图 帮助文档
    • 热力图 在线文档
  • 关系图

    • 关系图 函数开发
    • 关系图 帮助文档
    • 关系图 在线文档
  • 矩形树图

    • 矩形树图 函数开发
    • 矩形树图 帮助文档
    • 矩形树图 在线文档
  • 平行坐标

    • 平行坐标 函数开发
    • 平行坐标 帮助文档
    • 平行坐标 在线文档
  • 桑基图

    • 桑基图 函数开发
    • 桑基图 帮助文档
    • 桑基图 在线文档
  • 漏斗图

    • 漏斗图 函数开发
    • 漏斗图 帮助文档
    • 漏斗图 在线文档
  • 仪表盘

    • 仪表盘 函数开发
    • 仪表盘 帮助文档
    • 仪表盘 在线文档
  • 象形柱图

    • 象形柱图 函数开发
    • 象形柱图 帮助文档
    • 象形柱图 在线文档
  • 主题河流图

    • 主题河流图 函数开发
    • 主题河流图 帮助文档
    • 主题河流图 在线文档
  • 日历图

    • 日历图 函数开发
    • 日历图 帮助文档
    • 日历图 在线文档

辅助功能

  • 工具箱修改

    • 工具箱修改 函数开发
    • 工具箱修改 帮助文档
    • 工具箱修改 在线文档
  • 截图功能

    • 截图功能 函数开发
    • 截图功能 帮助文档
    • 截图功能 在线文档
  • 图例修改

    • 图例修改 函数开发
    • 图例修改 帮助文档
    • 图例修改 在线文档
  • 坐标轴修改

    • 坐标轴修改 函数开发
    • 坐标轴修改 帮助文档
    • 坐标轴修改 在线文档
  • tooltip修改

    • tooltip修改 函数开发
    • tooltip修改 帮助文档
    • tooltip修改 在线文档

高级功能

  • 图表联动

    • 图表联动 函数开发
    • 图表联动 帮助文档
    • 图表联动 在线文档
  • shiny

    • shiny 函数开发
    • shiny 帮助文档
    • shiny 在线文档
  • knitr

    • knitr 函数开发
    • knitr 帮助文档
    • knitr 在线文档

与shiny结合不能直接显示图形

demo(recharts::recharts_shiny)
跑这个demo,跳出浏览器后初始状态是不显示图形的,要重新设置参数才能激活显出图形来.

自己做了一个小例子也是这样的:
https://gitcafe.com/badbye/shiny-recharts/blob/master/ui.R
里边设置了参数默认值是5,但运行出来没有图形,需要滑动sidebarPanel才能激活显示出来.如果在ui设置里没有那个sidebarPanel,那就永远没法激活了.

问题产生于用shiny做应用时,个别图形调用echarts,但又不需要shiny的ui交互的情况.

could not find function "mergeList"

source("~/echartR.R")
library(recharts)
names(iris) = gsub(".", "", names(iris))
echartR(data=iris,x=~SepalLength,y=~PetalWidth,series = ~Species,

  •     type = 'scatter')
    
    Error in echartR(data = iris, x = ~SepalLength, y = ~PetalWidth, series = ~Species, :
    could not find function "mergeList"

双Y轴

在下查看R中帮助文档好久,似乎没有发现如何绘制双Y轴的图形。如果可以,作者可否给一示例?谢啦~~~

eBar横坐标显示不全

用eBar画堆叠图横坐标显示不全,有没有完整的参数说明?我看到eBar.R里面有一些参数,这些是所有的参数吗?想问具体的API文档有没有,

eMap画出来的图变量少了一个

load(url('http://yzhou.org/recharts/ChinaGDP.RData'))
plot(eMap(ChinaGDP, opt=list(title=list(text='2008~2010年大陆各省GDP占全国百分数'))))

在R3.1.0环境下,运行
ChinaGDP 数据集有三个变量,只画出来两个,第一个变量丢失。
另外在鼠标移动过去的时候 ,里面的有一个变量的值没有显示 :)

customize color and shape

I can't find a way to customize the color and shape in scatter plot. I haven't try other plot but I wonder if you can show to how to do it? Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.