hongyin163 / react-native-chart-android

react native chart modules come from mpandroidchart.
206 stars 81 forks source link

有什么文档之类的吗? #75

Open cxy200927099 opened 7 years ago

cxy200927099 commented 7 years ago

在查看demo的时候,很多props的含义没有相关的文档,请问一下能从哪里查询到这些prop的说明吗?

hongyin163 commented 7 years ago

是和mpAndroidchart的库的api是对应的

cxy200927099 commented 7 years ago

嗯,看了一下午只能看您封装的库对应的android源码库去找,但是发现有的属性貌似不管用 比如在MPBarLineChartManager.java中,setAxisInfo()函数中有个设置虚线的prop: if(v.hasKey("gridDashedLine")) { ReadableMap gdl=v.getMap("gridDashedLine"); axis.enableGridDashedLine((float)gdl.getDouble("lineLength"), (float)gdl.getDouble("spaceLength"), (float)gdl.getDouble("phase")); } 在js端我按照下面的属性设置,却不起作用,还报错说找不到属性 <LineChart style={{height:200,}} data={this.getLineData()} visibleXRange={[0,100]} maxVisibleValueCount={50} xAxis={{ drawGridLines:true, gridLineWidth:1, position:"BOTTOM", }} yAxisRight={{enable:false}} yAxis={{ startAtZero:false, drawGridLines:true, position:"OUTSIDE_CHART", gridDashedLine:{ lineLength:3, spaceLength:3, phase:3, }, }} drawGridBackground={false} backgroundColor={"WHITE"} description={""} legend={{ enable:false, position:'BELOW_CHART_LEFT', direction:"LEFT_TO_RIGHT" }} />

android报错找不到lineLength

hongyin163 commented 7 years ago

这个真是要用android studio调试下