Skip to content

activate pointer from outside the chart #383

Closed Answered by Abhinandan-Kushwaha
AkramSyed002 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @AkramSyed002 👋
Thanks for bringing this out. I don't think this is currently supported, but I can suggest you a workaround.

This can be achieved using the dataPointRadius and showVerticalLine properties inside data items, and using onPressIn and onPressOut with your external touchable component.

Here is an example-

The code for the above chart is-

const App = () => {
  const [lineData, setLineData] = useState([
    {value: 0},
    {value: 10},
    {value: 8},
    {value: 58},
    {value: 56},
    {value: 78},
    {value: 74},
    {value: 98},
  ]);

  const days = ['Mon','Tue','Wed','Thu','Fri','Sat','Sun','Mon']

  const showOrHidePointer = (ind, show) => {
    setLineData(
      li…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Abhinandan-Kushwaha
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants