Ryan Taylor

  • Content count

  • Joined

  • Last visited

About Ryan Taylor

  • Rank
    Forum Newbie
  1. Load linkeddata chart async on click react-native charts

    Is there another way to ask my question that would prompt a response?
  2. Hello, I have a chart of data and I'm trying to asynchronously load data for a linked chart on click of a column2d data point. Specifically, the main chart returns data by year, and I want to, on click of the bar chart item for a given year, make a server call to load the next set of data for the year clicked. I've tried to tap into dataPlotClick, beforeRender, beforeLinkedItemOpen, linkedChartInvoked, linkedItemOpened and more events to try and update dataSource.linkeddata before the linked graph loads, with no success. I know that the update works, however, because, if I click the back button on the linkedchart, and then click into the dataplot again, it will show up on subsequent linkedchart clicks, just not the first time I click into the linked chart. What am I doing wrong? Is what I want to achieve possible with this charting functionality? Additional details: I'm using the react-native modules and my initial chart data loads from the fetch command without issue. The essence of my code is that on click (let's go with dataPlotClick), make the fetch call with the relevant .then() statements and populate this.state.dataSource.linkeddata with the new data before the graph renders. To remove variables, I tried to just populate linkeddata from a hard coded array (no api call) in the dataPlotClick callback (plus all the other events listed above) and it still doesn't show the chart the first time you drill down. Help would be greatly appreciated! Thanks! Ryan