Author Topic: Coloured cells for pivot grid  (Read 1793 times)

kadyrsizov

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 8
    • View Profile
Coloured cells for pivot grid
« on: August 31, 2019, 04:29:17 pm »
Hello there

I can't figure out how to colorize cells. Usually I do it with cell render event

Code: [Select]
col.render = function(ui) {
    console.log('ui',ui);
};

but this event doesn't fire when a pivot mode is enabled.

Advise me please, how to paint cells?

Code: [Select]
dataModel: [
{id:1, year: 2019, name: 'name1', color: '#ccc'},
{id:2, year: 2019, name: 'name2', color: '#444'}
]

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Coloured cells for pivot grid
« Reply #1 on: September 02, 2019, 08:51:58 am »
New colModel is generated for pivoting which can be accessed in pivotCM event and required columns can be customized.

colModel is customized in pivotCM event in all pivot examples:

https://paramquery.com/pro/demos/pivot

https://paramquery.com/pro/demos/pivot_total

https://paramquery.com/pro/demos/pivot_custom
« Last Edit: September 02, 2019, 09:21:23 am by paramvir »