@urvish-procare/react-native-charts-wrapper 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +258 -0
- package/android/build.gradle +43 -0
- package/android/src/main/AndroidManifest.xml +4 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/MPAndroidChartPackage.java +49 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/charts/BarChartManager.java +46 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/charts/BarLineChartBaseManager.java +415 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/charts/BubbleChartManager.java +32 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/charts/CandleStickChartManager.java +31 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/charts/ChartBaseManager.java +605 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/charts/ChartGroupHolder.java +80 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/charts/CombinedChartManager.java +62 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/charts/ConfigurableMinimumLinePositionFillFormatter.java +19 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/charts/CustomFormatter.java +25 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/charts/DateFormatter.java +34 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/charts/HorizontalBarChartManager.java +23 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/charts/IndexValueFormatter.java +102 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/charts/LabelByXValueFormatter.java +25 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/charts/LineChartManager.java +31 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/charts/PieChartManager.java +147 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/charts/RadarChartManager.java +118 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/charts/ScatterChartManager.java +32 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/charts/YAxisChartBase.java +51 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/data/BarDataExtract.java +106 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/data/BubbleDataExtract.java +74 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/data/CandleDataExtract.java +102 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/data/CombinedDataExtract.java +70 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/data/DataExtract.java +77 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/data/LineDataExtract.java +130 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/data/PieDataExtract.java +101 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/data/RadarDataExtract.java +58 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/data/ScatterDataExtract.java +75 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/listener/RNOnChartGestureListener.java +129 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/listener/RNOnChartValueSelectedListener.java +52 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/markers/RNCircleMarkerView.java +19 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/markers/RNRectangleMarkerView.java +134 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/utils/BridgeUtils.java +52 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/utils/ChartDataSetConfigUtils.java +197 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/utils/ConversionUtil.java +144 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/utils/DrawableUtils.java +51 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/utils/EasingFunctionHelper.java +128 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/utils/EntryToWritableMapUtils.java +147 -0
- package/android/src/main/java/com/github/wuxudong/rncharts/utils/TypefaceUtils.java +47 -0
- package/android/src/main/res/drawable-nodpi/circle_marker.xml +8 -0
- package/android/src/main/res/drawable-nodpi/oval_marker.png +0 -0
- package/android/src/main/res/drawable-nodpi/rectangle_marker.9.png +0 -0
- package/android/src/main/res/drawable-nodpi/rectangle_marker_left.9.png +0 -0
- package/android/src/main/res/drawable-nodpi/rectangle_marker_right.9.png +0 -0
- package/android/src/main/res/drawable-nodpi/rectangle_marker_top.9.png +0 -0
- package/android/src/main/res/drawable-nodpi/rectangle_marker_top_left.9.png +0 -0
- package/android/src/main/res/drawable-nodpi/rectangle_marker_top_right.9.png +0 -0
- package/android/src/main/res/layout/circle_marker.xml +13 -0
- package/android/src/main/res/layout/oval_marker.xml +24 -0
- package/android/src/main/res/layout/rectangle_marker.xml +21 -0
- package/index.js +21 -0
- package/ios/ReactNativeCharts/BalloonMarker.swift +240 -0
- package/ios/ReactNativeCharts/ChartGroupHolder.swift +70 -0
- package/ios/ReactNativeCharts/CircleMarker.swift +108 -0
- package/ios/ReactNativeCharts/ConfigurableMinimumLinePositionFillFormatter.swift +19 -0
- package/ios/ReactNativeCharts/CustomChartDateFormatter.swift +64 -0
- package/ios/ReactNativeCharts/DataExtract.swift +80 -0
- package/ios/ReactNativeCharts/IndexValueFormatter.swift +49 -0
- package/ios/ReactNativeCharts/RNBarLineChartBaseManager.swift +115 -0
- package/ios/ReactNativeCharts/RNBarLineChartManagerBridge.h +40 -0
- package/ios/ReactNativeCharts/RNBarLineChartViewBase.swift +294 -0
- package/ios/ReactNativeCharts/RNChartManagerBridge.h +36 -0
- package/ios/ReactNativeCharts/RNChartViewBase.swift +593 -0
- package/ios/ReactNativeCharts/RNCharts-Bridging-Header.h +9 -0
- package/ios/ReactNativeCharts/RNYAxisChartManagerBridge.h +17 -0
- package/ios/ReactNativeCharts/RNYAxisChartViewBase.swift +53 -0
- package/ios/ReactNativeCharts/ReactNativeCharts.xcodeproj/project.pbxproj +376 -0
- package/ios/ReactNativeCharts/bar/BarDataExtract.swift +89 -0
- package/ios/ReactNativeCharts/bar/RNBarChartManager.swift +53 -0
- package/ios/ReactNativeCharts/bar/RNBarChartManagerBridge.m +17 -0
- package/ios/ReactNativeCharts/bar/RNBarChartView.swift +41 -0
- package/ios/ReactNativeCharts/bar/RNBarChartViewBase.swift +27 -0
- package/ios/ReactNativeCharts/bar/RNHorizontalBarChartManager.swift +45 -0
- package/ios/ReactNativeCharts/bar/RNHorizontalBarChartManagerBridge.m +16 -0
- package/ios/ReactNativeCharts/bar/RNHorizontalBarChartView.swift +41 -0
- package/ios/ReactNativeCharts/bubble/BubbleDataExtract.swift +61 -0
- package/ios/ReactNativeCharts/bubble/RNBubbleChartManager.swift +53 -0
- package/ios/ReactNativeCharts/bubble/RNBubbleChartManagerBridge.m +15 -0
- package/ios/ReactNativeCharts/bubble/RNBubbleChartView.swift +39 -0
- package/ios/ReactNativeCharts/candlestick/CandleDataExtract.swift +101 -0
- package/ios/ReactNativeCharts/candlestick/RNCandleStickChartManager.swift +53 -0
- package/ios/ReactNativeCharts/candlestick/RNCandleStickChartManagerBridge.m +16 -0
- package/ios/ReactNativeCharts/candlestick/RNCandleStickChartView.swift +44 -0
- package/ios/ReactNativeCharts/combine/CombinedDataExtract.swift +81 -0
- package/ios/ReactNativeCharts/combine/RNCombinedChartManager.swift +53 -0
- package/ios/ReactNativeCharts/combine/RNCombinedChartManagerBridge.m +19 -0
- package/ios/ReactNativeCharts/combine/RNCombinedChartView.swift +61 -0
- package/ios/ReactNativeCharts/formatters/ChartDateFormatter.swift +38 -0
- package/ios/ReactNativeCharts/formatters/LabelByXValueFormatter.swift +35 -0
- package/ios/ReactNativeCharts/formatters/LargeValueFormatter.swift +72 -0
- package/ios/ReactNativeCharts/line/LineDataExtract.swift +178 -0
- package/ios/ReactNativeCharts/line/RNLineChartManager.swift +53 -0
- package/ios/ReactNativeCharts/line/RNLineChartManagerBridge.m +14 -0
- package/ios/ReactNativeCharts/line/RNLineChartView.swift +41 -0
- package/ios/ReactNativeCharts/pie/PieDataExtract.swift +97 -0
- package/ios/ReactNativeCharts/pie/RNPieChartManager.swift +19 -0
- package/ios/ReactNativeCharts/pie/RNPieChartManagerBridge.m +30 -0
- package/ios/ReactNativeCharts/pie/RNPieChartView.swift +192 -0
- package/ios/ReactNativeCharts/radar/RNRadarChartManager.swift +19 -0
- package/ios/ReactNativeCharts/radar/RNRadarChartManagerBridge.m +25 -0
- package/ios/ReactNativeCharts/radar/RNRadarChartView.swift +99 -0
- package/ios/ReactNativeCharts/radar/RadarDataExtract.swift +50 -0
- package/ios/ReactNativeCharts/scatter/RNScatterChartManager.swift +53 -0
- package/ios/ReactNativeCharts/scatter/RNScatterChartManagerBridge.m +15 -0
- package/ios/ReactNativeCharts/scatter/RNScatterChartView.swift +43 -0
- package/ios/ReactNativeCharts/scatter/ScatterDataExtract.swift +76 -0
- package/ios/ReactNativeCharts/utils/BridgeUtils.swift +333 -0
- package/ios/ReactNativeCharts/utils/ChartDataSetConfigUtils.swift +147 -0
- package/ios/ReactNativeCharts/utils/EntryToDictionaryUtils.swift +66 -0
- package/ios/ReactNativeCharts/utils/FontUtils.swift +29 -0
- package/ios/ReactNativeCharts/utils/HighlightUtils.swift +41 -0
- package/lib/AxisIface.js +102 -0
- package/lib/BarChart.js +43 -0
- package/lib/BarLineChartBase.js +86 -0
- package/lib/BubbleChart.js +40 -0
- package/lib/CandleStickChart.js +40 -0
- package/lib/ChartBase.js +131 -0
- package/lib/ChartDataConfig.js +263 -0
- package/lib/ChartDataSetConfig.js +80 -0
- package/lib/CombinedChart.js +43 -0
- package/lib/HighlightEnhancer.js +15 -0
- package/lib/HorizontalBarChart.js +43 -0
- package/lib/LineChart.js +39 -0
- package/lib/MoveEnhancer.js +49 -0
- package/lib/PieChart.js +64 -0
- package/lib/PieRadarChartBase.js +18 -0
- package/lib/RadarChart.js +52 -0
- package/lib/ScaleEnhancer.js +16 -0
- package/lib/ScatterChart.js +38 -0
- package/lib/ScrollEnhancer.js +15 -0
- package/package.json +40 -0
- package/react-native-charts-wrapper.podspec +26 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// Created by xudong wu on 02/03/2017.
|
|
2
|
+
// Copyright © 2017 wuxudong. All rights reserved.
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import Foundation
|
|
6
|
+
import DGCharts
|
|
7
|
+
import SwiftyJSON
|
|
8
|
+
|
|
9
|
+
open class DataExtract {
|
|
10
|
+
func extract(_ data: JSON) -> ChartData? {
|
|
11
|
+
if data["dataSets"].array == nil {
|
|
12
|
+
return nil;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
let chartData = createData();
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
let dataSets = data["dataSets"].arrayValue;
|
|
19
|
+
|
|
20
|
+
for (_, dataSet) in dataSets.enumerated() {
|
|
21
|
+
|
|
22
|
+
let values = dataSet["values"].arrayValue;
|
|
23
|
+
let label = dataSet["label"].stringValue;
|
|
24
|
+
|
|
25
|
+
if values != nil && label != nil {
|
|
26
|
+
let entries = createEntries(values);
|
|
27
|
+
|
|
28
|
+
let chartDataSet = createDataSet(entries, label: label);
|
|
29
|
+
|
|
30
|
+
if dataSet["config"].dictionary != nil {
|
|
31
|
+
dataSetConfig(chartDataSet, config: dataSet["config"])
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
chartData.append(chartDataSet);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if data["config"].dictionary != nil {
|
|
39
|
+
dataConfig(chartData, config: data["config"])
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
return chartData
|
|
44
|
+
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
func createEntries(_ values: [JSON]) -> [ChartDataEntry] {
|
|
48
|
+
var entries = [ChartDataEntry]();
|
|
49
|
+
|
|
50
|
+
for (index, value) in values.enumerated() {
|
|
51
|
+
if value.null == nil {
|
|
52
|
+
entries.append(createEntry(values, index: index))
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return entries;
|
|
57
|
+
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
func createData() -> ChartData {
|
|
62
|
+
fatalError("subclass should override this function")
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
func dataConfig(_ data: ChartData, config: JSON) {}
|
|
66
|
+
|
|
67
|
+
func createDataSet(_ entries: [ChartDataEntry], label: String) -> ChartDataSetProtocol {
|
|
68
|
+
fatalError("subclass should override this function")
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
func dataSetConfig(_ dataSet: ChartDataSetProtocol, config: JSON) {
|
|
72
|
+
fatalError("subclass should override this function")
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
func createEntry(_ values: [JSON], index: Int) -> ChartDataEntry {
|
|
76
|
+
fatalError("subclass should override this function")
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
//
|
|
2
|
+
// IndexValueFormatter.swift
|
|
3
|
+
// Example
|
|
4
|
+
//
|
|
5
|
+
// Created by wuxudong on 2018/7/26.
|
|
6
|
+
// Copyright © 2018 wuxudong. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
import Foundation
|
|
10
|
+
|
|
11
|
+
import DGCharts
|
|
12
|
+
|
|
13
|
+
open class IndexValueFormatter: NSObject, ValueFormatter {
|
|
14
|
+
|
|
15
|
+
private var _values: [String] = [String]()
|
|
16
|
+
private var _valueCount: Int = 0
|
|
17
|
+
|
|
18
|
+
public var values: [String]
|
|
19
|
+
{
|
|
20
|
+
get
|
|
21
|
+
{
|
|
22
|
+
return _values
|
|
23
|
+
}
|
|
24
|
+
set
|
|
25
|
+
{
|
|
26
|
+
_values = newValue
|
|
27
|
+
_valueCount = _values.count
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
public override init()
|
|
32
|
+
{
|
|
33
|
+
super.init()
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@objc public init(values: [String])
|
|
37
|
+
{
|
|
38
|
+
super.init()
|
|
39
|
+
|
|
40
|
+
self.values = values
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
open func stringForValue(_ value: Double, entry: ChartDataEntry, dataSetIndex: Int, viewPortHandler: ViewPortHandler?) -> String {
|
|
44
|
+
let index = Int(entry.x.rounded())
|
|
45
|
+
guard values.indices.contains(index), index == Int(entry.x.rounded()) else { return "" }
|
|
46
|
+
return _values[index]
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Created by wuxudong on 14/12/2017.
|
|
3
|
+
// Copyright © 2017 wuxudong. All rights reserved.
|
|
4
|
+
//
|
|
5
|
+
|
|
6
|
+
import Foundation
|
|
7
|
+
import DGCharts
|
|
8
|
+
|
|
9
|
+
protocol RNBarLineChartBaseManager {
|
|
10
|
+
var _bridge : RCTBridge? {get}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
extension RNBarLineChartBaseManager {
|
|
14
|
+
func _moveViewToX(_ reactTag: NSNumber, xValue: NSNumber) {
|
|
15
|
+
_bridge?.uiManager.addUIBlock { (uiManager: RCTUIManager?, viewRegistry:[NSNumber : UIView]?) in
|
|
16
|
+
|
|
17
|
+
guard let view: RNBarLineChartViewBase = viewRegistry?[reactTag] as? RNBarLineChartViewBase,
|
|
18
|
+
let barLineChart = view.chart as? BarLineChartViewBase
|
|
19
|
+
else {
|
|
20
|
+
return
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
barLineChart.moveViewToX(xValue.doubleValue);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
func _moveViewTo(_ reactTag: NSNumber, xValue: NSNumber, yValue: NSNumber, axisDependency: NSString) {
|
|
28
|
+
_bridge?.uiManager.addUIBlock { (uiManager: RCTUIManager?, viewRegistry:[NSNumber : UIView]?) in
|
|
29
|
+
|
|
30
|
+
guard let view: RNBarLineChartViewBase = viewRegistry?[reactTag] as? RNBarLineChartViewBase,
|
|
31
|
+
let barLineChart = view.chart as? BarLineChartViewBase
|
|
32
|
+
else {
|
|
33
|
+
return
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
barLineChart.moveViewTo(xValue: xValue.doubleValue, yValue: yValue.doubleValue, axis: BridgeUtils.parseAxisDependency(axisDependency as String));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
func _moveViewToAnimated(_ reactTag: NSNumber, xValue: NSNumber, yValue: NSNumber, axisDependency: NSString, duration: NSNumber) {
|
|
41
|
+
_bridge?.uiManager.addUIBlock { (uiManager: RCTUIManager?, viewRegistry:[NSNumber : UIView]?) in
|
|
42
|
+
|
|
43
|
+
guard let view: RNBarLineChartViewBase = viewRegistry?[reactTag] as? RNBarLineChartViewBase,
|
|
44
|
+
let barLineChart = view.chart as? BarLineChartViewBase
|
|
45
|
+
else {
|
|
46
|
+
return
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
barLineChart.moveViewToAnimated(xValue: xValue.doubleValue, yValue: yValue.doubleValue, axis: BridgeUtils.parseAxisDependency(axisDependency as String), duration: duration.doubleValue / 1000.0);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
func _centerViewTo(_ reactTag: NSNumber, xValue: NSNumber, yValue: NSNumber, axisDependency: NSString) {
|
|
54
|
+
_bridge?.uiManager.addUIBlock { (uiManager: RCTUIManager?, viewRegistry:[NSNumber : UIView]?) in
|
|
55
|
+
|
|
56
|
+
guard let view: RNBarLineChartViewBase = viewRegistry?[reactTag] as? RNBarLineChartViewBase,
|
|
57
|
+
let barLineChart = view.chart as? BarLineChartViewBase
|
|
58
|
+
else {
|
|
59
|
+
return
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
barLineChart.centerViewTo(xValue: xValue.doubleValue, yValue: yValue.doubleValue, axis: BridgeUtils.parseAxisDependency(axisDependency as String));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
func _centerViewToAnimated(_ reactTag: NSNumber, xValue: NSNumber, yValue: NSNumber, axisDependency: NSString, duration: NSNumber) {
|
|
67
|
+
_bridge?.uiManager.addUIBlock { (uiManager: RCTUIManager?, viewRegistry:[NSNumber : UIView]?) in
|
|
68
|
+
|
|
69
|
+
guard let view: RNBarLineChartViewBase = viewRegistry?[reactTag] as? RNBarLineChartViewBase,
|
|
70
|
+
let barLineChart = view.chart as? BarLineChartViewBase
|
|
71
|
+
else {
|
|
72
|
+
return
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
barLineChart.centerViewToAnimated(xValue: xValue.doubleValue, yValue: yValue.doubleValue, axis: BridgeUtils.parseAxisDependency(axisDependency as String), duration: duration.doubleValue / 1000.0);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
func _fitScreen(_ reactTag: NSNumber) {
|
|
80
|
+
_bridge?.uiManager.addUIBlock { (uiManager: RCTUIManager?, viewRegistry:[NSNumber : UIView]?) in
|
|
81
|
+
guard let view: RNBarLineChartViewBase = viewRegistry?[reactTag] as? RNBarLineChartViewBase,
|
|
82
|
+
let barLineChart = view.chart as? BarLineChartViewBase
|
|
83
|
+
else {
|
|
84
|
+
return
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
barLineChart.fitScreen();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
func _highlights(_ reactTag: NSNumber, config: NSArray) {
|
|
92
|
+
_bridge?.uiManager.addUIBlock { (uiManager: RCTUIManager?, viewRegistry:[NSNumber : UIView]?) in
|
|
93
|
+
guard let view: RNBarLineChartViewBase = viewRegistry?[reactTag] as? RNBarLineChartViewBase,
|
|
94
|
+
let barLineChart = view.chart as? BarLineChartViewBase
|
|
95
|
+
else {
|
|
96
|
+
return
|
|
97
|
+
}
|
|
98
|
+
barLineChart.highlightValues(HighlightUtils.getHighlights(config));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
func _setDataAndLockIndex(_ reactTag: NSNumber, data: NSDictionary) {
|
|
103
|
+
_bridge?.uiManager.addUIBlock { (uiManager: RCTUIManager?, viewRegistry:[NSNumber : UIView]?) in
|
|
104
|
+
guard
|
|
105
|
+
let view = viewRegistry?[reactTag] as? RNBarLineChartViewBase
|
|
106
|
+
else {
|
|
107
|
+
return
|
|
108
|
+
}
|
|
109
|
+
view.setDataAndLockIndex(data);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Created by xudong wu on 26/02/2017.
|
|
2
|
+
// Copyright wuxudong
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
#ifndef RNBarLineChartManagerBridge_h
|
|
6
|
+
#define RNBarLineChartManagerBridge_h
|
|
7
|
+
|
|
8
|
+
#define EXPORT_BAR_LINE_CHART_BASE_PROPERTIES \
|
|
9
|
+
EXPORT_Y_AXIS_CHART_BASE_PROPERTIES \
|
|
10
|
+
RCT_EXPORT_VIEW_PROPERTY(drawGridBackground, BOOL) \
|
|
11
|
+
RCT_EXPORT_VIEW_PROPERTY(maxHighlightDistance, CGFloat) \
|
|
12
|
+
RCT_EXPORT_VIEW_PROPERTY(gridBackgroundColor, NSInteger) \
|
|
13
|
+
RCT_EXPORT_VIEW_PROPERTY(drawBorders, BOOL) \
|
|
14
|
+
RCT_EXPORT_VIEW_PROPERTY(borderColor, NSInteger) \
|
|
15
|
+
RCT_EXPORT_VIEW_PROPERTY(borderWidth, CGFloat) \
|
|
16
|
+
RCT_EXPORT_VIEW_PROPERTY(maxVisibleValueCount, NSInteger) \
|
|
17
|
+
RCT_EXPORT_VIEW_PROPERTY(visibleRange, NSDictionary) \
|
|
18
|
+
RCT_EXPORT_VIEW_PROPERTY(maxScale, NSDictionary) \
|
|
19
|
+
RCT_EXPORT_VIEW_PROPERTY(autoScaleMinMaxEnabled, BOOL) \
|
|
20
|
+
RCT_EXPORT_VIEW_PROPERTY(keepPositionOnRotation, BOOL) \
|
|
21
|
+
RCT_EXPORT_VIEW_PROPERTY(scaleEnabled, BOOL) \
|
|
22
|
+
RCT_EXPORT_VIEW_PROPERTY(dragEnabled, BOOL) \
|
|
23
|
+
RCT_EXPORT_VIEW_PROPERTY(scaleXEnabled, BOOL) \
|
|
24
|
+
RCT_EXPORT_VIEW_PROPERTY(scaleYEnabled, BOOL) \
|
|
25
|
+
RCT_EXPORT_VIEW_PROPERTY(pinchZoom, BOOL) \
|
|
26
|
+
RCT_EXPORT_VIEW_PROPERTY(highlightPerDragEnabled, BOOL) \
|
|
27
|
+
RCT_EXPORT_VIEW_PROPERTY(doubleTapToZoomEnabled, BOOL) \
|
|
28
|
+
RCT_EXPORT_VIEW_PROPERTY(zoom, NSDictionary) \
|
|
29
|
+
RCT_EXPORT_VIEW_PROPERTY(viewPortOffsets, NSDictionary) \
|
|
30
|
+
RCT_EXPORT_VIEW_PROPERTY(extraOffsets, NSDictionary) \
|
|
31
|
+
RCT_EXPORT_VIEW_PROPERTY(onYaxisMinMaxChange, RCTBubblingEventBlock) \
|
|
32
|
+
RCT_EXTERN_METHOD(moveViewToX:(nonnull NSNumber *)node xValue:(nonnull NSNumber *)xValue) \
|
|
33
|
+
RCT_EXTERN_METHOD(moveViewTo:(nonnull NSNumber *)node xValue:(nonnull NSNumber *)xValue yValue:(nonnull NSNumber *)yValue axisDependency:(nonnull NSString *)axisDependency) \
|
|
34
|
+
RCT_EXTERN_METHOD(moveViewToAnimated:(nonnull NSNumber *)node xValue:(nonnull NSNumber *)xValue yValue:(nonnull NSNumber *)yValue axisDependency:(nonnull NSString *)axisDependency duration:(nonnull NSNumber *)duration) \
|
|
35
|
+
RCT_EXTERN_METHOD(centerViewTo:(nonnull NSNumber *)node xValue:(nonnull NSNumber *)xValue yValue:(nonnull NSNumber *)yValue axisDependency:(nonnull NSString *)axisDependency) \
|
|
36
|
+
RCT_EXTERN_METHOD(centerViewToAnimated:(nonnull NSNumber *)node xValue:(nonnull NSNumber *)xValue yValue:(nonnull NSNumber *)yValue axisDependency:(nonnull NSString *)axisDependency duration:(nonnull NSNumber *)duration) \
|
|
37
|
+
RCT_EXTERN_METHOD(highlights:(nonnull NSNumber *)node config:(nonnull NSArray *)config) \
|
|
38
|
+
RCT_EXTERN_METHOD(fitScreen:(nonnull NSNumber *)node) \
|
|
39
|
+
RCT_EXTERN_METHOD(setDataAndLockIndex:(nonnull NSNumber *)node data:(nonnull NSDictionary *)data)
|
|
40
|
+
#endif /* RNBarLineChartManagerBridge_h */
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Created by xudong wu on 26/02/2017.
|
|
3
|
+
// Copyright (c) wuxudong. All rights reserved.
|
|
4
|
+
//
|
|
5
|
+
|
|
6
|
+
import Foundation
|
|
7
|
+
import DGCharts
|
|
8
|
+
import SwiftyJSON
|
|
9
|
+
|
|
10
|
+
class RNBarLineChartViewBase: RNYAxisChartViewBase {
|
|
11
|
+
fileprivate var barLineChart: BarLineChartViewBase {
|
|
12
|
+
get {
|
|
13
|
+
return chart as! BarLineChartViewBase
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
var savedVisibleRange : NSDictionary?
|
|
18
|
+
|
|
19
|
+
var savedZoom : NSDictionary?
|
|
20
|
+
|
|
21
|
+
var _onYaxisMinMaxChange : RCTBubblingEventBlock?
|
|
22
|
+
var timer : Timer?
|
|
23
|
+
|
|
24
|
+
override func setYAxis(_ config: NSDictionary) {
|
|
25
|
+
let json = BridgeUtils.toJson(config)
|
|
26
|
+
|
|
27
|
+
if json["left"].exists() {
|
|
28
|
+
let leftYAxis = barLineChart.leftAxis
|
|
29
|
+
setCommonAxisConfig(leftYAxis, config: json["left"]);
|
|
30
|
+
setYAxisConfig(leftYAxis, config: json["left"]);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
if json["right"].exists() {
|
|
35
|
+
let rightAxis = barLineChart.rightAxis
|
|
36
|
+
setCommonAxisConfig(rightAxis, config: json["right"]);
|
|
37
|
+
setYAxisConfig(rightAxis, config: json["right"]);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
func setOnYaxisMinMaxChange(_ callback: RCTBubblingEventBlock?) {
|
|
42
|
+
self._onYaxisMinMaxChange = callback;
|
|
43
|
+
self.timer?.invalidate();
|
|
44
|
+
if callback == nil {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
var lastMin: Double = 0;
|
|
49
|
+
var lastMax: Double = 0;
|
|
50
|
+
|
|
51
|
+
let axis = (self.chart as! BarLineChartViewBase).getAxis(.right);
|
|
52
|
+
|
|
53
|
+
if #available(iOS 10.0, *) {
|
|
54
|
+
// Interval for 16ms
|
|
55
|
+
self.timer = Timer.scheduledTimer(withTimeInterval: 1/60, repeats: true) { timer in
|
|
56
|
+
let minimum = axis.axisMinimum;
|
|
57
|
+
let maximum = axis.axisMaximum;
|
|
58
|
+
if lastMin != minimum || lastMax != maximum {
|
|
59
|
+
print("Update the view", minimum, lastMin, maximum, lastMax)
|
|
60
|
+
|
|
61
|
+
guard let callback = self._onYaxisMinMaxChange else {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
callback([
|
|
65
|
+
"minY": minimum,
|
|
66
|
+
"maxY": maximum,
|
|
67
|
+
]);
|
|
68
|
+
}
|
|
69
|
+
lastMin = minimum;
|
|
70
|
+
lastMax = maximum;
|
|
71
|
+
}
|
|
72
|
+
} else {
|
|
73
|
+
// Fallback on earlier versions
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
func setMaxHighlightDistance(_ maxHighlightDistance: CGFloat) {
|
|
78
|
+
barLineChart.maxHighlightDistance = maxHighlightDistance;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
func setDrawGridBackground(_ enabled: Bool) {
|
|
82
|
+
barLineChart.drawGridBackgroundEnabled = enabled;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
func setGridBackgroundColor(_ color: Int) {
|
|
87
|
+
barLineChart.gridBackgroundColor = RCTConvert.uiColor(color);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
func setDrawBorders(_ enabled: Bool) {
|
|
92
|
+
barLineChart.drawBordersEnabled = enabled;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
func setBorderColor(_ color: Int) {
|
|
96
|
+
|
|
97
|
+
barLineChart.borderColor = RCTConvert.uiColor(color);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
func setBorderWidth(_ width: CGFloat) {
|
|
101
|
+
barLineChart.borderLineWidth = width;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
func setMaxVisibleValueCount(_ count: NSInteger) {
|
|
106
|
+
barLineChart.maxVisibleCount = count;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
func setVisibleRange(_ config: NSDictionary) {
|
|
110
|
+
// delay visibleRange handling until chart data is set
|
|
111
|
+
savedVisibleRange = config
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
func updateVisibleRange(_ config: NSDictionary) {
|
|
115
|
+
let json = BridgeUtils.toJson(config)
|
|
116
|
+
|
|
117
|
+
let x = json["x"]
|
|
118
|
+
if x["min"].double != nil {
|
|
119
|
+
barLineChart.setVisibleXRangeMinimum(x["min"].doubleValue)
|
|
120
|
+
}
|
|
121
|
+
if x["max"].double != nil {
|
|
122
|
+
barLineChart.setVisibleXRangeMaximum(x["max"].doubleValue)
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
let y = json["y"]
|
|
126
|
+
if y["left"]["min"].double != nil {
|
|
127
|
+
barLineChart.setVisibleYRangeMinimum(y["left"]["min"].doubleValue, axis: YAxis.AxisDependency.left)
|
|
128
|
+
}
|
|
129
|
+
if y["left"]["max"].double != nil {
|
|
130
|
+
barLineChart.setVisibleYRangeMaximum(y["left"]["max"].doubleValue, axis: YAxis.AxisDependency.left)
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if y["right"]["min"].double != nil {
|
|
134
|
+
barLineChart.setVisibleYRangeMinimum(y["right"]["min"].doubleValue, axis: YAxis.AxisDependency.right)
|
|
135
|
+
}
|
|
136
|
+
if y["right"]["max"].double != nil {
|
|
137
|
+
barLineChart.setVisibleYRangeMaximum(y["right"]["max"].doubleValue, axis: YAxis.AxisDependency.right)
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
func setMaxScale(_ config: NSDictionary) {
|
|
142
|
+
let json = BridgeUtils.toJson(config)
|
|
143
|
+
|
|
144
|
+
let maxScaleX = json["x"]
|
|
145
|
+
if maxScaleX.double != nil {
|
|
146
|
+
barLineChart.viewPortHandler.setMaximumScaleX(maxScaleX.doubleValue)
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
let maxScaleY = json["y"]
|
|
150
|
+
if maxScaleY.double != nil {
|
|
151
|
+
barLineChart.viewPortHandler.setMaximumScaleY(maxScaleY.doubleValue)
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
func setAutoScaleMinMaxEnabled(_ enabled: Bool) {
|
|
156
|
+
barLineChart.autoScaleMinMaxEnabled = enabled
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
func setKeepPositionOnRotation(_ enabled: Bool) {
|
|
160
|
+
barLineChart.keepPositionOnRotation = enabled
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
func setScaleEnabled(_ enabled: Bool) {
|
|
164
|
+
barLineChart.setScaleEnabled(enabled)
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
func setDragEnabled(_ enabled: Bool) {
|
|
168
|
+
barLineChart.dragEnabled = enabled
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
func setScaleXEnabled(_ enabled: Bool) {
|
|
173
|
+
barLineChart.scaleXEnabled = enabled
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
func setScaleYEnabled(_ enabled: Bool) {
|
|
177
|
+
barLineChart.scaleYEnabled = enabled
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
func setPinchZoom(_ enabled: Bool) {
|
|
181
|
+
barLineChart.pinchZoomEnabled = enabled
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
func setHighlightPerDragEnabled(_ enabled: Bool) {
|
|
185
|
+
barLineChart.highlightPerDragEnabled = enabled
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
func setDoubleTapToZoomEnabled(_ enabled: Bool) {
|
|
189
|
+
barLineChart.doubleTapToZoomEnabled = enabled
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
func setZoom(_ config: NSDictionary) {
|
|
193
|
+
self.savedZoom = config
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
func updateZoom(_ config: NSDictionary) {
|
|
197
|
+
let json = BridgeUtils.toJson(config)
|
|
198
|
+
|
|
199
|
+
if json["scaleX"].float != nil && json["scaleY"].float != nil && json["xValue"].double != nil && json["yValue"].double != nil {
|
|
200
|
+
var axisDependency = YAxis.AxisDependency.left
|
|
201
|
+
|
|
202
|
+
if json["axisDependency"].string != nil && json["axisDependency"].stringValue == "RIGHT" {
|
|
203
|
+
axisDependency = YAxis.AxisDependency.right
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
barLineChart.zoom(scaleX: CGFloat(json["scaleX"].floatValue),
|
|
207
|
+
scaleY: CGFloat(json["scaleY"].floatValue),
|
|
208
|
+
xValue: json["xValue"].doubleValue,
|
|
209
|
+
yValue: json["yValue"].doubleValue,
|
|
210
|
+
axis: axisDependency)
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
func setViewPortOffsets(_ config: NSDictionary) {
|
|
215
|
+
let json = BridgeUtils.toJson(config)
|
|
216
|
+
|
|
217
|
+
let left = json["left"].double != nil ? CGFloat(json["left"].doubleValue) : 0
|
|
218
|
+
let top = json["top"].double != nil ? CGFloat(json["top"].doubleValue) : 0
|
|
219
|
+
let right = json["right"].double != nil ? CGFloat(json["right"].doubleValue) : 0
|
|
220
|
+
let bottom = json["bottom"].double != nil ? CGFloat(json["bottom"].doubleValue) : 0
|
|
221
|
+
|
|
222
|
+
barLineChart.setViewPortOffsets(left: left, top: top, right: right, bottom: bottom)
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
func setExtraOffsets(_ config: NSDictionary) {
|
|
226
|
+
let json = BridgeUtils.toJson(config)
|
|
227
|
+
|
|
228
|
+
let left = json["left"].double != nil ? CGFloat(json["left"].doubleValue) : 0
|
|
229
|
+
let top = json["top"].double != nil ? CGFloat(json["top"].doubleValue) : 0
|
|
230
|
+
let right = json["right"].double != nil ? CGFloat(json["right"].doubleValue) : 0
|
|
231
|
+
let bottom = json["bottom"].double != nil ? CGFloat(json["bottom"].doubleValue) : 0
|
|
232
|
+
|
|
233
|
+
barLineChart.setExtraOffsets(left: left, top: top, right: right, bottom: bottom)
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
override func onAfterDataSetChanged() {
|
|
237
|
+
super.onAfterDataSetChanged()
|
|
238
|
+
|
|
239
|
+
// clear zoom after applied, but keep visibleRange
|
|
240
|
+
if let visibleRange = savedVisibleRange {
|
|
241
|
+
updateVisibleRange(visibleRange)
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
if let zoom = savedZoom {
|
|
245
|
+
updateZoom(zoom)
|
|
246
|
+
savedZoom = nil
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
func setDataAndLockIndex(_ data: NSDictionary) {
|
|
251
|
+
let json = BridgeUtils.toJson(data)
|
|
252
|
+
|
|
253
|
+
let axis = barLineChart.getAxis(YAxis.AxisDependency.left).enabled ? YAxis.AxisDependency.left : YAxis.AxisDependency.right
|
|
254
|
+
|
|
255
|
+
let contentRect = barLineChart.contentRect
|
|
256
|
+
|
|
257
|
+
let originCenterValue = barLineChart.valueForTouchPoint(point: CGPoint(x: contentRect.midX, y: contentRect.midY), axis: axis)
|
|
258
|
+
|
|
259
|
+
let originalVisibleXRange = barLineChart.visibleXRange
|
|
260
|
+
let originalVisibleYRange = getVisibleYRange(axis)
|
|
261
|
+
|
|
262
|
+
barLineChart.fitScreen()
|
|
263
|
+
|
|
264
|
+
barLineChart.data = dataExtract.extract(json)
|
|
265
|
+
barLineChart.notifyDataSetChanged()
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
let newVisibleXRange = barLineChart.visibleXRange
|
|
269
|
+
let newVisibleYRange = getVisibleYRange(axis)
|
|
270
|
+
|
|
271
|
+
let scaleX = newVisibleXRange / originalVisibleXRange
|
|
272
|
+
let scaleY = newVisibleYRange / originalVisibleYRange
|
|
273
|
+
|
|
274
|
+
// in iOS Charts chart.zoom scaleX: CGFloat, scaleY: CGFloat, xValue: Double, yValue: Double, axis: YAxis.AxisDependency)
|
|
275
|
+
// the scale is absolute scale, it will overwrite touchMatrix scale directly
|
|
276
|
+
// but in android MpAndroidChart, ZoomJob getInstance(viewPortHandler, scaleX, scaleY, xValue, yValue, trans, axis, v)
|
|
277
|
+
// the scale is relative scale, touchMatrix.scaleX = touchMatrix.scaleX * scaleX
|
|
278
|
+
// so in iOS, we updateVisibleRange after zoom
|
|
279
|
+
|
|
280
|
+
barLineChart.zoom(scaleX: CGFloat(scaleX), scaleY: CGFloat(scaleY), xValue: Double(originCenterValue.x), yValue: Double(originCenterValue.y), axis: axis)
|
|
281
|
+
|
|
282
|
+
if let config = savedVisibleRange {
|
|
283
|
+
updateVisibleRange(config)
|
|
284
|
+
}
|
|
285
|
+
barLineChart.notifyDataSetChanged()
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
func getVisibleYRange(_ axis: YAxis.AxisDependency) -> CGFloat {
|
|
289
|
+
let contentRect = barLineChart.contentRect
|
|
290
|
+
|
|
291
|
+
return barLineChart.valueForTouchPoint(point: CGPoint(x: contentRect.maxX, y:contentRect.minY), axis: axis).y - barLineChart.valueForTouchPoint(point: CGPoint(x: contentRect.minX, y:contentRect.maxY), axis: axis).y
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//
|
|
2
|
+
// RNChartManagerBridge.h
|
|
3
|
+
// reactNativeCharts
|
|
4
|
+
//
|
|
5
|
+
// Created by xudong wu on 25/02/2017.
|
|
6
|
+
// Copyright wuxudong
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#ifndef RNChartManagerBridge_h
|
|
10
|
+
#define RNChartManagerBridge_h
|
|
11
|
+
|
|
12
|
+
#define EXPORT_CHART_BASE_PROPERTIES \
|
|
13
|
+
RCT_EXPORT_VIEW_PROPERTY(data, NSDictionary) \
|
|
14
|
+
RCT_EXPORT_VIEW_PROPERTY(highlights, NSArray) \
|
|
15
|
+
RCT_EXPORT_VIEW_PROPERTY(legend, NSDictionary) \
|
|
16
|
+
RCT_EXPORT_VIEW_PROPERTY(chartBackgroundColor, NSInteger) \
|
|
17
|
+
RCT_EXPORT_VIEW_PROPERTY(chartDescription, NSDictionary) \
|
|
18
|
+
RCT_EXPORT_VIEW_PROPERTY(noDataText, NSString) \
|
|
19
|
+
RCT_EXPORT_VIEW_PROPERTY(noDataTextColor, NSInteger) \
|
|
20
|
+
RCT_EXPORT_VIEW_PROPERTY(touchEnabled, BOOL) \
|
|
21
|
+
RCT_EXPORT_VIEW_PROPERTY(highlightPerTapEnabled, BOOL) \
|
|
22
|
+
RCT_EXPORT_VIEW_PROPERTY(dragDecelerationEnabled, BOOL) \
|
|
23
|
+
RCT_EXPORT_VIEW_PROPERTY(dragDecelerationFrictionCoef, NSNumber) \
|
|
24
|
+
RCT_EXPORT_VIEW_PROPERTY(animation, NSDictionary) \
|
|
25
|
+
RCT_EXPORT_VIEW_PROPERTY(xAxis, NSDictionary) \
|
|
26
|
+
RCT_EXPORT_VIEW_PROPERTY(marker, NSDictionary) \
|
|
27
|
+
RCT_EXPORT_VIEW_PROPERTY(onSelect, RCTDirectEventBlock) \
|
|
28
|
+
RCT_EXPORT_VIEW_PROPERTY(onChange, RCTBubblingEventBlock) \
|
|
29
|
+
RCT_EXPORT_VIEW_PROPERTY(group, NSString) \
|
|
30
|
+
RCT_EXPORT_VIEW_PROPERTY(identifier, NSString) \
|
|
31
|
+
RCT_EXPORT_VIEW_PROPERTY(syncX, BOOL) \
|
|
32
|
+
RCT_EXPORT_VIEW_PROPERTY(syncY, BOOL)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
#endif /* RNChartManagerBridge_h */
|