Forum Discussion

rahuldhomane's avatar
02-09-2022
Solved

Adding symbol in Pivot table

Hi,

Is there a way to add symbols like Tickmark and Cross in one particular column in  pivot chart instead of binary values like 0 or 1?

  • Hi rahuldhomane ,

    if you already have column with 0 and 1, you can use widget script to replace values.

     

    const myTarget = {
     type: ['value'],
     values: [
      {
       title: 'Total Cost' // put here desired column
      }
     ]
    };
    
    
    widget.transformPivot(myTarget, function(metadata, cell) {
            if (cell.value = 1) {
         cell.content = "✔";
           } 
            else if (cell.value = 0) {
         cell.content = "✖";
           } 
    });

    this script uses pivot2 api  - Pivot 2.0 API 

    - Alek



     

4 Replies

Replies have been turned off for this discussion