5 Replies Latest reply on Jan 27, 2017 12:48 PM by Anthony Lipphardt

    Example of getData for Story?

    Anthony Lipphardt

      I have a Tableau Public visualization (https://public.tableau.com/profile/dataviz8737#!/vizhome/7_U_S_DrugPoisoningMortality/USDrugPoisoningMortality) from which I would like to get the data using the JavaScript API. I have seen the code examples for grabbing data from Worksheets and Dashboards, but not for Stories.

       

      I can get to a list of Worksheets using the following code:

       

      listOfWorksheets = viz.getWorkbook().getActiveSheet().activeSheet.getActiveStoryPoint().getContainedSheet().getWorksheets();

       

      But then if I try to iterate through that array of worksheets I am unable to get the underlying data for those worksheets:

       

      listOfWorksheets[0].getUnderlyingDataAsync(options).then(function(t){ console.log(t.getData()); });

       

      I keep getting an error that getUnderlyingDataAsync is not a function. Is there a good example of using getData() for stories?