tomauty / react-native-chart Goto Github PK
View Code? Open in Web Editor NEW[NOT MAINTAINED] :bar_chart: Add line, area, pie, and bar charts to your React Native app
Home Page: http://tomauty.github.io/react-native-chart
License: MIT License
[NOT MAINTAINED] :bar_chart: Add line, area, pie, and bar charts to your React Native app
Home Page: http://tomauty.github.io/react-native-chart
License: MIT License
I am getting following error while adding onefold react native chart in my application . It is a linking error but i have already added all library .
Ld /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/AwesomeProject1.app/AwesomeProject1 normal x86_64
cd /Users/shanba6/AwesomeProject1/ios
export IPHONEOS_DEPLOYMENT_TARGET=7.1
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -L/Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator -F/Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator -filelist /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Intermediates/AwesomeProject1.build/Debug-iphonesimulator/AwesomeProject1.build/Objects-normal/x86_64/AwesomeProject1.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=7.1 -Xlinker -objc_abi_version -Xlinker 2 -ObjC -fobjc-arc -fobjc-link-runtime /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libRNChart.a /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libReact.a /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libRCTActionSheet.a /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libRCTGeolocation.a /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libRCTImage.a /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libRCTLinking.a /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libRCTNetwork.a /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libRCTSettings.a /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libRCTText.a /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libRCTVibration.a /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libRCTWebSocket.a -Xlinker -dependency_info -Xlinker /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Intermediates/AwesomeProject1.build/Debug-iphonesimulator/AwesomeProject1.build/Objects-normal/x86_64/AwesomeProject1_dependency_info.dat -o /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/AwesomeProject1.app/AwesomeProject1
ld: warning: object file (/Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libRNChart.a(RNChartAxisView.o)) was built for newer iOS version (9.0) than being linked (7.1)
ld: warning: object file (/Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libRNChart.a(RNChartView.o)) was built for newer iOS version (9.0) than being linked (7.1)
ld: warning: object file (/Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libRNChart.a(RNChartPlotAreaView.o)) was built for newer iOS version (9.0) than being linked (7.1)
ld: warning: object file (/Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libRNChart.a(RNChartViewManager.o)) was built for newer iOS version (9.0) than being linked (7.1)
Undefined symbols for architecture x86_64:
"_RCTCopyProperty", referenced from:
-[RNChartViewManager set_chartData:forView:withDefaultView:] in libRNChart.a(RNChartViewManager.o)
-[RNChartViewManager set_verticalGridStep:forView:withDefaultView:] in libRNChart.a(RNChartViewManager.o)
-[RNChartViewManager set_animationDuration:forView:withDefaultView:] in libRNChart.a(RNChartViewManager.o)
-[RNChartViewManager set_showGrid:forView:withDefaultView:] in libRNChart.a(RNChartViewManager.o)
-[RNChartViewManager set_gridColor:forView:withDefaultView:] in libRNChart.a(RNChartViewManager.o)
-[RNChartViewManager set_gridLineWidth:forView:withDefaultView:] in libRNChart.a(RNChartViewManager.o)
-[RNChartViewManager set_showAxis:forView:withDefaultView:] in libRNChart.a(RNChartViewManager.o)
...
"_RCTSetProperty", referenced from:
-[RNChartViewManager set_chartData:forView:withDefaultView:] in libRNChart.a(RNChartViewManager.o)
-[RNChartViewManager set_verticalGridStep:forView:withDefaultView:] in libRNChart.a(RNChartViewManager.o)
-[RNChartViewManager set_animationDuration:forView:withDefaultView:] in libRNChart.a(RNChartViewManager.o)
-[RNChartViewManager set_showGrid:forView:withDefaultView:] in libRNChart.a(RNChartViewManager.o)
-[RNChartViewManager set_gridColor:forView:withDefaultView:] in libRNChart.a(RNChartViewManager.o)
-[RNChartViewManager set_gridLineWidth:forView:withDefaultView:] in libRNChart.a(RNChartViewManager.o)
-[RNChartViewManager set_showAxis:forView:withDefaultView:] in libRNChart.a(RNChartViewManager.o)
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Ld /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/AwesomeProject1.app/AwesomeProject1 normal x86_64
cd /Users/shanba6/AwesomeProject1/ios
export IPHONEOS_DEPLOYMENT_TARGET=7.1
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -L/Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator -F/Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator -filelist /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Intermediates/AwesomeProject1.build/Debug-iphonesimulator/AwesomeProject1.build/Objects-normal/x86_64/AwesomeProject1.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=7.1 -Xlinker -objc_abi_version -Xlinker 2 -ObjC -fobjc-arc -fobjc-link-runtime /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libRNChart.a /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libReact.a /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libRCTActionSheet.a /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libRCTGeolocation.a /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libRCTImage.a /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libRCTLinking.a /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libRCTNetwork.a /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libRCTSettings.a /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libRCTText.a /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libRCTVibration.a /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libRCTWebSocket.a -Xlinker -dependency_info -Xlinker /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Intermediates/AwesomeProject1.build/Debug-iphonesimulator/AwesomeProject1.build/Objects-normal/x86_64/AwesomeProject1_dependency_info.dat -o /Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/AwesomeProject1.app/AwesomeProject1
ld: warning: object file (/Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libRNChart.a(RNChartAxisView.o)) was built for newer iOS version (9.0) than being linked (7.1)
ld: warning: object file (/Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libRNChart.a(RNChartView.o)) was built for newer iOS version (9.0) than being linked (7.1)
ld: warning: object file (/Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libRNChart.a(RNChartPlotAreaView.o)) was built for newer iOS version (9.0) than being linked (7.1)
ld: warning: object file (/Users/shanba6/Library/Developer/Xcode/DerivedData/AwesomeProject1-ezoxvgkiizqjhsftoxrkntfykjsp/Build/Products/Debug-iphonesimulator/libRNChart.a(RNChartViewManager.o)) was built for newer iOS version (9.0) than being linked (7.1)
Undefined symbols for architecture x86_64:
"_RCTCopyProperty", referenced from:
-[RNChartViewManager set_chartData:forView:withDefaultView:] in libRNChart.a(RNChartViewManager.o)
-[RNChartViewManager set_verticalGridStep:forView:withDefaultView:] in libRNChart.a(RNChartViewManager.o)
-[RNChartViewManager set_animationDuration:forView:withDefaultView:] in libRNChart.a(RNChartViewManager.o)
-[RNChartViewManager set_showGrid:forView:withDefaultView:] in libRNChart.a(RNChartViewManager.o)
-[RNChartViewManager set_gridColor:forView:withDefaultView:] in libRNChart.a(RNChartViewManager.o)
-[RNChartViewManager set_gridLineWidth:forView:withDefaultView:] in libRNChart.a(RNChartViewManager.o)
-[RNChartViewManager set_showAxis:forView:withDefaultView:] in libRNChart.a(RNChartViewManager.o)
...
"_RCTSetProperty", referenced from:
-[RNChartViewManager set_chartData:forView:withDefaultView:] in libRNChart.a(RNChartViewManager.o)
-[RNChartViewManager set_verticalGridStep:forView:withDefaultView:] in libRNChart.a(RNChartViewManager.o)
-[RNChartViewManager set_animationDuration:forView:withDefaultView:] in libRNChart.a(RNChartViewManager.o)
-[RNChartViewManager set_showGrid:forView:withDefaultView:] in libRNChart.a(RNChartViewManager.o)
-[RNChartViewManager set_gridColor:forView:withDefaultView:] in libRNChart.a(RNChartViewManager.o)
-[RNChartViewManager set_gridLineWidth:forView:withDefaultView:] in libRNChart.a(RNChartViewManager.o)
-[RNChartViewManager set_showAxis:forView:withDefaultView:] in libRNChart.a(RNChartViewManager.o)
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Hi.. While using this API, I wanted to redraw the graph with updated values of the array.. But once it is plotted it gives me the error saying "Attempt to write read only values.'
I guess it would be awesome to implement your library in a way compatible to https://github.com/jhudson8/react-chartjs, so developers can reuse their code on both platforms.
Would make it easier to evaluate this module.
Is it possible to make the chart more interactive , by say tapping on a data point to show a modal with the values.
Thanks
A single chart with all zero data is fine.
If data series is all zero, and showDataPoint is true, I always get a crash in iOS 6s simulator
let willCrash = true;
const charts = [{
type: 'line',
showDataPoint: crash,
data: [0, 0],
}];
It is something to do with zero and showDataPoint because matching data: [1,1] does not crash.
dladdr(0x1, 0x7fda7dbab270)
dyld_image_header_containing_address(0x1064aeefa)
_dyld_get_image_slide(0x106168000)
_dyld_get_image_slide(0x106168000)
2016-03-25 12:58:20.954 FieldPlanner[41520:372927] *** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [111.5 nan]'
*** First throw call stack:
(
0 CoreFoundation 0x00000001062b4d85 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x00000001054a8deb objc_exception_throw + 48
2 CoreFoundation 0x00000001062b4cbd +[NSException raise:format:] + 205
3 QuartzCore 0x0000000107fd8e4a _ZN2CA5Layer12set_positionERKNS_4Vec2IdEEb + 152
4 QuartzCore 0x0000000107fd8fbd -[CALayer setPosition:] + 44
5 QuartzCore 0x0000000107fd9624 -[CALayer setFrame:] + 650
6 FieldPlanner 0x000000010476b41a -[RNChartPlotAreaView drawDataPoints:] + 3050
7 FieldPlanner 0x0000000104767906 -[RNChartPlotAreaView drawCharts] + 854
8 FieldPlanner 0x000000010476fc77 -[RNChartView buildChart] + 5527
9 FieldPlanner 0x000000010476e5cc -[RNChartView layoutSubviews] + 92
10 UIKit 0x000000010832d980 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 703
11 QuartzCore 0x0000000107fe1c00 -[CALayer layoutSublayers] + 146
12 QuartzCore 0x0000000107fd608e _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
13 QuartzCore 0x0000000107fd5f0c _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
14 QuartzCore 0x0000000107fca3c9 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277
15 QuartzCore 0x0000000107ff8086 _ZN2CA11Transaction6commitEv + 486
16 QuartzCore 0x0000000107ff87f8 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
17 CoreFoundation 0x00000001061d9c37 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
18 CoreFoundation 0x00000001061d9ba7 __CFRunLoopDoObservers + 391
19 CoreFoundation 0x00000001061cf7fb __CFRunLoopRun + 1147
20 CoreFoundation 0x00000001061cf0f8 CFRunLoopRunSpecific + 488
21 GraphicsServices 0x000000010b7b3ad2 GSEventRunModal + 161
22 UIKit 0x0000000108272f09 UIApplicationMain + 171
23 FieldPlanner 0x0000000104634f8f main + 111
24 libdyld.dylib 0x000000010a2c592d start + 1
25 ??? 0x0000000000000001 0x0 + 1
)
This would fundamentally change the API, but I don't understand the need for an array of chart data vs one chart per component. Could someone enlighten me on the use case for this? It's becoming more complicated to support new chart types when it's possible to have more than one per component (e.g. Pie chart)
'color' is one of these, as seen in #26
Title should explain. Will appear horizontal. This might behave strangely with another chart that isn't a horizontalBar
, so will have to investigate a solution. Any suggestions for how to handle this would be appreciated.
this chart only use in ios ?
Support an array of two color values such that it will create a gradient starting at [0]
, ending at [1]
.
Hi, I think you specify using the version react native 0.4.0, which is not able to use under my 0.6.0, can you make it like > 0.4.0 so we can use your component?
When running on ios 7/8, the app will crash.
Hi, I can't get the chart to update/redraw when the chartData state of the component is updated. Thanks.
I 'd like to know is there someone maintain it ~
labelFontSize
isn't working.
<RNChart style={styles.chart}
chartData={chartData}
verticalGridStep={5}
xLabels={xLabels}
labelFontSize={7}>
</RNChart>
<RNChart style={styles.chart}
chartData={chartData}
verticalGridStep={5}
xLabels={xLabels}
labelFontSize={12}>
</RNChart>
Regardless of the labelFontSize
setting, the font size remains the same.
Are you looking for a maintainer for this project? I'm willing to put in some work if you are. This is a project that the community is dying to use.
Hi,
I get a strange error while i am trying to render a chart with all 0s in y-axis. I would expect a straight line on the x-axis but get the following error. Is this caused due to my misuse of the lib or to some bugs?
2016-03-25 13:10:53.784 [info][tid:com.facebook.React.JavaScript] [ 'Thu Mar 24 2016 13:00:00',
'Thu Mar 24 2016 14:00:00',
'Thu Mar 24 2016 15:00:00',
'Thu Mar 24 2016 16:00:00',
'Thu Mar 24 2016 17:00:00',
'Thu Mar 24 2016 18:00:00',
'Thu Mar 24 2016 19:00:00',
'Thu Mar 24 2016 20:00:00',
'Thu Mar 24 2016 21:00:00',
'Thu Mar 24 2016 22:00:00',
'Thu Mar 24 2016 23:00:00',
'Fri Mar 25 2016 00:00:00',
'Fri Mar 25 2016 01:00:00',
'Fri Mar 25 2016 02:00:00',
'Fri Mar 25 2016 03:00:00',
'Fri Mar 25 2016 04:00:00',
'Fri Mar 25 2016 05:00:00',
'Fri Mar 25 2016 06:00:00',
'Fri Mar 25 2016 07:00:00',
'Fri Mar 25 2016 08:00:00',
'Fri Mar 25 2016 09:00:00',
'Fri Mar 25 2016 10:00:00',
'Fri Mar 25 2016 11:00:00',
'Fri Mar 25 2016 12:00:00',
'Fri Mar 25 2016 13:00:00' ]
2016-03-25 13:10:53.785 [info][tid:com.facebook.React.JavaScript] [ { name: 'LineChart',
color: 'gray',
lineWidth: 2,
showDataPoint: true,
data: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] } ]
2016-03-25 13:10:53.811 Sentry[12583:439969] *** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [6.9 nan]'
*** First throw call stack:
(
0 CoreFoundation 0x0000000107ba2e65 exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000106da6deb objc_exception_throw + 48
2 CoreFoundation 0x0000000107ba2d9d +[NSException raise:format:] + 205
3 QuartzCore 0x0000000109238a86 _ZN2CA5Layer12set_positionERKNS_4Vec2IdEEb + 152
4 QuartzCore 0x0000000109238bf9 -[CALayer setPosition:] + 44
5 QuartzCore 0x000000010923925d -[CALayer setFrame:] + 650
6 Sentry 0x0000000106747f3a -[RNChartPlotAreaView drawDataPoints:] + 3130
7 Sentry 0x0000000106743f0b -[RNChartPlotAreaView drawCharts] + 859
8 Sentry 0x000000010674cb58 -[RNChartView buildChart] + 5960
9 Sentry 0x000000010674b2fc -[RNChartView layoutSubviews] + 92
10 UIKit 0x00000001095774a3 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 703
11 QuartzCore 0x000000010924159a -[CALayer layoutSublayers] + 146
12 QuartzCore 0x0000000109235e70 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
13 QuartzCore 0x0000000109235cee _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
14 QuartzCore 0x000000010922a475 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277
15 QuartzCore 0x0000000109257c0a _ZN2CA11Transaction6commitEv + 486
16 QuartzCore 0x000000010925837c _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
17 CoreFoundation 0x0000000107ace367 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 23
18 CoreFoundation 0x0000000107ace2d7 __CFRunLoopDoObservers + 391
19 CoreFoundation 0x0000000107ac3f2b __CFRunLoopRun + 1147
20 CoreFoundation 0x0000000107ac3828 CFRunLoopRunSpecific + 488
21 GraphicsServices 0x000000010b928ad2 GSEventRunModal + 161
22 UIKit 0x00000001094c0610 UIApplicationMain + 171
23 Sentry 0x000000010662be2f main + 111
24 libdyld.dylib 0x000000010b17a92d start + 1
25 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Right now you can just create a donut by appending a white circle over the piechart, but it would be nice to have that included in this lib as well.
From all I can see in the docs, there isn't a way to customize the display of specific bars in the chart- only the styles of the chart as a whole.
This becomes problematic when trying to display a bar chart containing only a single data point (e.g. chart data being something like [30]
) - it's showing the data from the very left, instead of getting centered on the chart. I set xLabels
to ['0'].
From a bar chart taken from the example in the readme and slightly modified to contain a single data point, I'm getting something like this:
Is there any way to center the data?
Awesome lib,
I'm using tightBounds
with a vertical range about 1500-1520 and i realize that lines doesn't start at the bottom (1500), It starts in a long way down, instead of the minBounds
of the tightBounds
.
I've slow down the animationDuration to show it, you can also see the fillColor
ended much higher than expected.
It's only occurs when sets fillColor
property.
I've played a little bit on the path scale, but no success yet, any progress i'd pull request, any help would be appreciated.
I got:
Requiring unknown module "ReactIOSViewAttributes". If you are sure the module is there, try restarting the packager.
However, here I saw the module is removed in React Native 0.4.3 and the current release candidate is 0.5.0
.
For example 3 data points that are not evenly spaced on the distance X axis; at 0m, 16m, and 139m.
Plot as evenly spaced because the X value is not part of the data series. This is not what is needed.
Does your API have a way to plot X and Y values?
X | Y |
---|---|
00.00 | 1.00 |
16.13 | 3.00 |
139.59 | 6.00 |
It seems like I need to create a data series with 150 null points to cover 150 meters, then round up to nearest, and set the non-null data points at locations
data[0]= 1
data[16] = 3
data[140] = 6.00
Thanks in advance,
Does this work for Android?
I don't know how to change dataPointFillColor
at js side, when I directly specify string value #98E489
below error occured,
maybe I'll call processColor()
somewhere?,
could you help me? thanks..
JSON value '#98E489' of type NSString cannot be converted to a UIColor. Did you forget to call processColor() on the JS side?
I've followed the first three steps and stuck at the fourth step. Can't find "libRNChart.a" in the list of "Link Binary with Libraries" or in the source folder.
In XCode, in the project navigator, select your project. Add libRNChart.a to your project's Build Phases ➜ Link Binary With Libraries
https://github.com/onefold/react-native-chart/blob/master/package.json#L9
It's more advantageous to use peerDependencies
as opposed to dependencies
for the react-native
depedency - it saves us from re-downloading react-native for each module when we already have it installed.
Looking through the source I didn't find a way, but I wanted to make sure I'm not missing something.
I don't believe there is but do you plan on having Android support?
Thanks so much
I was unable to do npm install due to the following error with my react-native 0.12.0. I appears that the dependency of the react-native-chart prevent npm from going forward. It looks like this repository is still stuck in the old react-native 0.4.0
$ npm install react-native-chart --save
npm WARN peerDependencies The peer dependency react-native@^0.4.0 included from react-native-chart will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm ERR! Darwin 15.0.0
npm ERR! argv "/Users/Eric/.nvm/versions/node/v4.1.2/bin/node" "/Users/Eric/.nvm/versions/node/v4.1.2/bin/npm" "install" "react-native-chart" "--save"
npm ERR! node v4.1.2
npm ERR! npm v2.14.4
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package [email protected] does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants react-native@^0.4.0
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Eric/GitHub/Mi-KPI/npm-debug.log
• Uses outdated requires
• Uses createNativeComponentClass
instead of requireNativeComponent
and setNativeProps
• Uses NativeMethodsMixin
Throws errors like:
2015-12-15 10:20:02.399 [error][tid:main] Unable to resolve module ReactPropTypes
from /Workspace/NameOfProject/node_modules/react-native-chart/Chart.ios.js:
Invalid directory /node_modules/ReactPropTypes
2015-12-15 10:24:31.510 [error][tid:main] Unable to resolve module
ReactNativeViewAttributes from /Workspace/NameOfProject/node_modules/
react-native-chart/Chart.ios.js:
Invalid directory /node_modules/ReactNativeViewAttributes
Here's my first draft of what an interactive chart might be comprised of:
The press event
{
coordinates: {
x: number, // X-coordinate on the device
y: number, // Y-coordinate on the device
},
didPressDataPoint: boolean, // to help you decide whether or not to show a view or some such thing
closestDataPoint: DataPoint // this will make more sense as 2.0 gets fleshed out, but an instance of a DataPoint object
}
The events
onPressIn
onPressOut
The Chart
will emit these events, and as such you will be able to attach listeners to them via the ref
.
Please feel free to comment about feedback, questions, etc. I want this to be as community-involved as possible.
2015-05-25 17:11:20.941 [warn][tid:com.facebook.React.ShadowQueue][RCTUIManager.m:776] No manager class found for view with module name "RNChartView"
I can not see anything in the position of RNChart. Thanks.
<View style = { styles.container }>
<Text style = { styles.city_day }>
{ this.state.current.city } / { this.state.current.date }
</Text>
<Text style = { styles.status }>
{ this.state.current.weather } { this.state.current.temp }°
</Text>
<Text style = { styles.current }>
{ this.state.current.icon }
</Text>
<RNChart style={styles.chart}
chartData={chartData}
verticalGridStep="5"
xLabels={xLabels}
chartTitle="My Simple Chart"
chartFontSize="22"
xAxisTitle="X Axis"
yAxisTitle="Y Axis"
onTouchEnd={this._onTouchEnd}>
</RNChart>
</View>
I get this issue with below description
Unable to resolve module ReactPropTypes from /Users/jovi/AwesomeProject/node_modules/react-native-chart/Chart.ios.js: Invalid directory /Users/node_modules/ReactPropTypes
but I indeed follow step from getting-started
could anybody help me ?
thanks..
Hi, Do you plan to provide a xaxis label angle props that allowed labels display in a certain angle? because if i put a long x axis label, it will overlapped to each other, any idea of it?
Hi, I install the module by npm install https://github.com/onefold/react-native-chart --save
,and the version of react-native I installed is 0.13.0-rc. The console now shows as below and I have a runtime error in RNChartView.m line 55. The message is Error setting property 'verticalGridStep' of RNChartView with tag #8: JSON value '5' of type NSString cannot be converted to NSNumber
.
Unable to resolve module ReactPropTypes from /Users/MLS/mls/biz/dc_native/SexyDc/node_modules/react-native-chart/Chart.ios.js
Unable to resolve module ReactNativeViewAttributes from /Users/MLS/mls/biz/dc_native/SexyDc/node_modules/react-native-chart/Chart.ios.js
Unable to resolve module createReactNativeComponentClass from /Users/MLS/mls/biz/dc_native/SexyDc/node_modules/react-native-chart/Chart.ios.js
Unable to resolve module StyleSheet from /Users/MLS/mls/biz/dc_native/SexyDc/node_modules/react-native-chart/Chart.ios.js
Unable to resolve module NativeMethodsMixin from /Users/MLS/mls/biz/dc_native/SexyDc/node_modules/react-native-chart/Chart.ios.js
Unable to resolve module flattenStyle from /Users/MLS/mls/biz/dc_native/SexyDc/node_modules/react-native-chart/Chart.ios.js
Unable to resolve module merge from /Users/MLS/mls/biz/dc_native/SexyDc/node_modules/react-native-chart/Chart.ios.js
How can I solve the problem? Thanks.
Can the chart fire a event when click on the data point?
Hello thanks for this awesome component! I have a quick question about the coming features.
Do you have plan implementing the above features? Thanks for the help!
Are there plans to add Android support?
Hi, I'm having some trouble getting the readme example to work. I'm only seeing a red border around where the chart should be displayed. I'm using react native 0.21.0 and iOS 9.2.
highlightIndices
will specify which data points in the array will be highlighted, such that they will be of color highlightColor
.
very smart project, may I have two suggestion here?
type: 'bar'
thanks for your time..
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.