Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown event handler property onPress #704

Open
mykelcodes opened this issue Oct 2, 2023 · 1 comment
Open

Unknown event handler property onPress #704

mykelcodes opened this issue Oct 2, 2023 · 1 comment

Comments

@mykelcodes
Copy link

Hi! 馃憢

Firstly, thanks for your work on this project! 馃檪

Today I used patch-package to patch [email protected] for the project I'm working on.

Using this library in an Expo project that requires a chart. On web, I ran into an issue where onDataPointClick was not working for LineChart.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-chart-kit/dist/line-chart/LineChart.js b/node_modules/react-native-chart-kit/dist/line-chart/LineChart.js
index 1ac4227..0aeda86 100644
--- a/node_modules/react-native-chart-kit/dist/line-chart/LineChart.js
+++ b/node_modules/react-native-chart-kit/dist/line-chart/LineChart.js
@@ -94,7 +94,7 @@ var LineChart = /** @class */ (function (_super) {
                     };
                     output.push(<Circle key={Math.random()} cx={cx} cy={cy} fill={typeof getDotColor === "function"
                         ? getDotColor(x, i)
-                        : _this.getColor(dataset, 0.9)} onPress={onPress} {..._this.getPropsForDots(x, i)}/>, <Circle key={Math.random()} cx={cx} cy={cy} r="14" fill="#fff" fillOpacity={0} onPress={onPress}/>, renderDotContent({ x: cx, y: cy, index: i, indexData: x }));
+                        : _this.getColor(dataset, 0.9)} onPress={onPress} onClick={onPress} {..._this.getPropsForDots(x, i)}/>, <Circle key={Math.random()} cx={cx} cy={cy} r="14" fill="#fff" fillOpacity={0} onPress={onPress} onClick={onPress}/>, renderDotContent({ x: cx, y: cy, index: i, indexData: x }));
                 });
             });
             return output;
@Demven
Copy link

Demven commented Nov 26, 2023

I have the same issue on Web. Please make a patch with the proposed solution. I love your library, but I can't move forward with adapting it to work on Web.... Any estimates when this can be released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants