Qlik Community

Suggest an Idea

Vote for your favorite Qlik product ideas and add your own suggestions.

Alternate row shading for tables

ieydis
Contributor III
Contributor III

Alternate row shading for tables

Suggesting an option for tables have a feature to alternate row shading.  This would make the data easier to read and process, especially for numerical values having many rows.

10 Comments
adaniels22
Contributor
Contributor

Agreed 

mmarchese
Creator II
Creator II

+1 This is a good idea.  I would think Qlik could just update the included themes ever so slightly to implement it, but what do I know.

In the meantime, you can use the theme I made, which is just the regular "Classic" theme but with the following CSS to get alternating white and green backgrounds.  I don't see a button to attach it, so here are the contents of the 3 files that you need to zip up and import.

theme-sense-classic-with-green-bars.qext:

{
	"name": "Sense Classic with Green Bars",
	"description": "This theme is the same as the Sense Classic theme but with
	alternating row colors in straight tables.",
	"type": "theme",
	"version": "1.0.0",
	"author": "Mike Marchese"
}

theme.css

.qv-object-table .qv-inner-object .qv-object-content-container .qv-grid-object-scroll-area table tr:nth-child(even) {
    background: rgb(212, 255, 215)
}

.qv-object-table .qv-inner-object .qv-object-content-container .qv-grid-object-scroll-area table tr:nth-child(odd) {
    background: #ffffff
}

theme.json

{
  "_inherit": true,
  "customStyles": [
    {
      "cssRef": "theme.css",
      "classRef": "my-theme"
    }
  ]
}

 

Patric_Nordstrom
Employee
Employee

Thank you for your feedback on ways to improve our product. While this is something we understand would be useful, it's not on the short-term roadmap. Please continue to show your support for this idea.

It is possible today using a formula, set the bg color to =if(mod(rowno(total),2)=0,'lightgray')

For an example see sheet "Pajama striping" https://community.qlik.com/t5/Qlik-Sense-Documents-Videos/Top-10-Viz-tricks-Qonnections-2019/ta-p/15...

Thanks,

Patric

Status changed to: Open - Collecting Feedback
mmarchese
Creator II
Creator II

@Patric_Nordstrom Thanks for the suggestion.  Unfortunately, when using that approach, you have to set the bg color to that formula for every column, in every table, on every sheet, in every app.  That's a whole lot of busywork, so I don't recommend it.

Sajid_Mahmood
Creator
Creator
This is a must feature
ieydis
Contributor III
Contributor III

@mmarchese  Thanks for the suggestion on the theme.  I will try this out!

SGV
Creator
Creator

@Patric_Nordstrom  Unfortunately, with your formula approach, sorting on Y- Value will be affected. 

See here: 

SGV_0-1601663082372.png

 

Patric_Nordstrom
Employee
Employee

@SGV  true, a possible workaround is to use/create another numeric field with order to use instead of rowno().

Thanks,

Patric

Patric_Nordstrom
Employee
Employee

@SGV , @mmarchese  or to use rank() instead of rowno().

charshea
Contributor
Contributor

@Patric_Nordstrom Hello! We do use the mod rowno technique for shading. Usually it works fine; however,  we run into problems (where the shading is NOT every other row) when we are excluding zeros from a table. (In Data Handling, we have unchecked "Include zero values".) Do you have a way to address this issue? Your help would be greatly appreciated!

Thanks,

Charlotte Shea