From df05988543e9d68f947e9d96cf3cb926eb506cc3 Mon Sep 17 00:00:00 2001 From: Carles Capellas Date: Tue, 16 Sep 2025 11:20:11 +0200 Subject: [PATCH] Fix onPress not being triggered on SVG Circle component --- src/line-chart/LineChart.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/line-chart/LineChart.tsx b/src/line-chart/LineChart.tsx index 895e911a..bd886a0d 100644 --- a/src/line-chart/LineChart.tsx +++ b/src/line-chart/LineChart.tsx @@ -293,7 +293,7 @@ class LineChart extends AbstractChart { ((baseHeight - this.calcHeight(x, datas, height)) / 4) * 3 + paddingTop; - const onPress = () => { + const onPressIn = () => { if (!onDataPointClick || hidePointsAtIndex.includes(i)) { return; } @@ -318,7 +318,7 @@ class LineChart extends AbstractChart { ? getDotColor(x, i) : this.getColor(dataset, 0.9) } - onPress={onPress} + onPressIn={onPressIn} {...this.getPropsForDots(x, i)} />, { r="14" fill="#fff" fillOpacity={0} - onPress={onPress} + onPressIn={onPressIn} />, renderDotContent({ x: cx, y: cy, index: i, indexData: x }) );