Is it possible to apply conditional formatting in the new tables?

The new tables (https://mode.com/blog/sorting-and-filtering-tables) don't seem to allow for conditional formatting because the table object is treated as a chart, not a table. Is there a way to get around this?

9replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Hi Jess V , we have created a conditional formatting alamode function for the new tables. You can follow this gallery guide: https://mode.com/example-gallery/conditional-formatting/, and let us know if you have additional questions. 

    Like
  • Leqi Long Perfect! Thank you :) 

    Like
  • Leqi Long Actually, could you advise on how to format things if you have more than one column you'd want to format? 

    Like
  • Jess V  For each additional column, you can add another object into the "columns" array, like below

    <script> alamode.customizeTable([
      { vizId: 'cec574afc590',
        formatByColumn: {
          columns: [
           { name: 'sales',
             rules: [
               { type: '<', value: 50000, color: '#DA364A' },
               { type: '>', value: 200000, color: '#37B067' },
               { type: '===', value: 115344, color: '#EFDC05' }]
           },
           { name: 'another_column',
             rules: [
                { type: '<', value: 50000, color: '#DA364A' },
                { type: '>', value: 200000, color: '#37B067' },
                { type: '===', value: 115344, color: '#EFDC05' }]
            }]
          }
       }])
    </script>
    Like 1
  • Sorry, one more question! 🙈

    Can you add links in the new tables like you used to be able to (https://mode.com/example-gallery/table-links/)?

    Like
  • Hey Jess V , this function is now supported natively in the chart editor for the new tables:

    Like
  • Hey  Leqi Long ,

    I see how the new tables allow for accomplishing the `Add links to a table` section of https://mode.com/example-gallery/table-links/, but is there a way to accomplish `Add links to a table by inserting additional text around table results`? It was nice to be able to add a hyperlink to a column that didn't have values that were complete URLs. Ideally, I could reuse the same snippet in that section but pass it a `chart_id` (pointing to the new tables) and it would work the exact same way as passing it a `table_id`

    Like
  • Hi Steven Wu , currently there isn't an existing alamode function that would support links in new tables the same way it would with the legacy display tables. As for inserting additional text like the alamode, a workaround here is you can prepend and/or append those additional text in the SQL, to turn the returned data into complete URLs. Can definitely submit what you're asking here as a feature request for the new tables URL formatting. 

    Like
  • Ah ok thanks for confirming that. A submitted feature request would be great (either in the native editor or for that alamode function to accept a chart_id of the new type of table). I know that I can manipulate a column's values to return a complete URL and if I was a consumer with a report I'd be fine with that but feedback from users of my reports (especially making the switch over from the old tables to these tables) is that they hate the wasted space the URL column takes, compared to the old behaviour of being able to clicking a column showing useful metadata (like a title/tldr) which had a hyperlink

    Like
Like Follow
  • 3 mths agoLast active
  • 9Replies
  • 38Views
  • 3 Following