react-native-charts-wrapper icon indicating copy to clipboard operation
react-native-charts-wrapper copied to clipboard

Can we add highlight position to onSelect callback?

Open farwayer opened this issue 6 years ago • 3 comments

Marker views is not very customizable now. Best what we do is using our own React Native view and show it in onSelect() callback. But the problem is we don't know position of highlighted chart point. So what about adding this information to onSelect event? It should be not very hard because we already has this information in chartValueSelected handler.

If I'm not wrong xPx and yPx in Highlight class.

farwayer avatar Oct 16 '19 16:10 farwayer

any approach regarding this?

ibnukipa avatar Jun 09 '20 03:06 ibnukipa

From Docs

onSelect

Triggered when a chart value is selected. The event passed back will include the coordinates of the touch as well as the data (including marker label) selected.

But the data i get from onSelect is


{
    data: {
        y: [1, 7, 0],
    },
    target: 4303,
    x: 1,
    yValues: [1, 7, 0]
}

May I know where to get the "coordinates f the touch" and "including marker label"?

nolife08021 avatar Sep 19 '21 06:09 nolife08021

Did anyone ever make any progress on this?

llaver avatar Nov 20 '21 02:11 llaver