Replacing values with text: Pivot 2 script
👋 Hello,
I have clients doing this in Windows...
They might end up with a script like this:
widget.on('ready', () => {
$('td.p-value[val="1"][fidx="2"]').text("First-Time Donor")
$('td.p-value[val="0"][fidx="2"]').text("Recurring Donor")
})
widget.on('ready', function(sender, ev){
$('td[fidx=2]',element).css('text-align','left')
$('td[fidx=2]',element).css('padding-left','5px')
$('td[fidx=2]',element).css('vertical-align','middle')
});Can you help me convert this to Pivot 2?
Chris Wallingford
Posted 8 months ago·Last reply 8 months ago
1 comment
Assaf Hanina
·8 months ago · Editedhey wallingfordce​ ,
Pivot table in Linux is using the Pivot 2.0 APIÂ .which has different syntax compare to the Windows Version.Â
The requirement is to transform Value into Text and apply Style for the target cell.
Please find an example script which transform value into text and apply style. (Follow the documentation above for the Cell.Style properties)
Example of the Indicator_value converted to Indicator text
fyi DRay​Â
best regards