Skip to content

fix ios blankย #1015

@qiushui123

Description

@qiushui123

Hi! ๐Ÿ‘‹

Firstly, thanks for your work on this project! ๐Ÿ™‚

Today I used patch-package to patch react-native-charts-wrapper@0.6.0 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-charts-wrapper/ios/ReactNativeCharts/bar/RNBarChartView.swift b/node_modules/react-native-charts-wrapper/ios/ReactNativeCharts/bar/RNBarChartView.swift
index fef1570..723a7e4 100644
--- a/node_modules/react-native-charts-wrapper/ios/ReactNativeCharts/bar/RNBarChartView.swift
+++ b/node_modules/react-native-charts-wrapper/ios/ReactNativeCharts/bar/RNBarChartView.swift
@@ -18,6 +18,11 @@ class RNBarChartView: RNBarChartViewBase {
         return _dataExtract
     }
 
+    override func layoutSubviews() {
+        super.layoutSubviews()
+        _chart.frame = self.bounds // Adjust the chart's frame to fill the entire component's bounds
+    }
+
     override init(frame: CoreGraphics.CGRect) {
 
         self._chart = BarChartView(frame: frame)

This issue body was partially generated by patch-package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions