2 Replies Latest reply on Jan 14, 2019 11:09 PM by Jijo Joseph

    Tableau Extension | getSelectedMarksAsync is not responding to dual axis chart

    Jijo Joseph

      I have a stacked barchart+ line chart as a dual axis chart

      and I have added the same to a dashboard along with the getSelectedMarksAsync extension from the Official page(Tutorial_4).

      I am able to capture marks when clicked on a bar chart and not a line. I want to able to listen for line too.

      Note: I found that what ever we keep first in the column shelf only listens to the mark selection and not the second.
      When I rearranged column shelf like below line was responding to selection not the bar.

       

      Any Idea????

        • 1. Re: Tableau Extension | getSelectedMarksAsync is not responding to dual axis chart
          Keshia Rose

          Hi Jijo,

           

          That tutorial is just to help you get started and does not cover all scenarios, as you can see. If you take a look at the javascript for that part of the tutorial (GitHub) specifically at the part where the script is collecting the data to display, you will see a note on line 79 saying: // Get the first DataTable for our selected marks (usually there is just one). This tutorial assumes there is just one DataTable and will therefore only look at the first one. In your case, when you have a dual axis or multiple axes, you will get multiple DataTables. You will need to modify your code to take into account that possibility and check to see which one has the right data based on the selection. Try looking at the results of getSelectedMarksAsync() in the console to see what I mean. Hope this helps!

           

          Take care,

          Keshia

          1 of 1 people found this helpful
          • 2. Re: Tableau Extension | getSelectedMarksAsync is not responding to dual axis chart
            Jijo Joseph

            Hi Keshia,

             

            Thanks for the help.

             

            I am able to get the details from the dual axis now. As mentioned by you i was taking only first Datatable.

             

            Thanks,

            Jijo