chart back button has actions

  • 5
  • Idea
  • Updated 3 months ago
This is a question but I think it's an idea too.

We have a chart and a table showing similar data a bunch of records with category and subcategory fields. The chart has columns with number of records per category, and the table shows all the records. When you click a column it drills down to a chart of all the records for that category grouped by subcategory. It also filters the table. 

We now need to figure out how to get the table to filter yet again when the Back button is pressed, or rather to un-filter. When you click Back, table stays to where it's just showing records from one category instead of again showing all records from all categories. 

I think we could do this if we reworked our chart and table to use the same model, but is there another way? If not, I'm proposing an idea to Add Actions to Chart Back Button. 
Photo of Jack Sanford

Jack Sanford, Champion

  • 9,766 Points 5k badge 2x thumb

Posted 3 years ago

  • 5
Photo of Linus Twizell

Linus Twizell

  • 324 Points 250 badge 2x thumb

I agree this is sorely needed!

I get round the issue by having a beforerender snippet on the first chart that unsets the condition on the table model and requeries it - so when you click back from the second chart it gets executed.

var params = arguments[0], $ = skuid.$;
    var tableModel = skuid.model.getModel('TableModelName');
    var tableCondition = tableModel.getConditionByName('TableFilterConditionName');

Hope this helps,
Photo of Pat Vachon

Pat Vachon, Champion

  • 44,426 Points 20k badge 2x thumb
Just came across this requirement with a client. Simple use of displaying records table below chart and drilling into chart using action framework further filters table.
Photo of Jack Sanford

Jack Sanford, Champion

  • 9,766 Points 5k badge 2x thumb
beforeRender snippets work great at this, until you start loading page includes elsewhere and all your charts refresh.

my new favorite workaround is to avoid using chart sets and instead just have multiple standalone charts, with actions on the series to populate a ui field to render the right chart. 

Then you get to add your own back button!!
Photo of Arne-Per Heurberg

Arne-Per Heurberg

  • 2,866 Points 2k badge 2x thumb
you can also override the back button which is just Highcharts anyway. Though you need to add logic to track where you are in the chart tree. lol