Pivot row custom text

Hi there!
I already know how to change text for column header. Like in this example from your docs:

        onBeforeRender: function(config){
            var columns = config.header;
            for(var i=1; i < columns.length; i++){
                var h = columns[i].header;
                var text = h[h.length-1].text.replace(/(\\w+)\\s\\((\\w+)\\)/,'$2 of $1');
                h[h.length-1].text = text;
            }
        }

But is there any way to change text for the first column (row titles)? For example in this sample: Customize popup structure
I want to change each country name (Argentina, Australia …) to something custom. How can I do it. Thank you

Hello!
Pivot’s first column of the grid has the same id - name.

There are two ways to solve your issue:

  • change data in the first column by scheme (rarely used for pivot)
datatable:{
    scheme:{				
      $init:function(obj){
         obj.name = obj.name+"_test"
      }
    }
  }
  • to render data with a customization by template of the first column
onBeforeRender: function(config){
       var columns = config.header;
       columns[0].template = function(obj, common, value, col, ind){
         return common.treetable(obj, common)+value+"_test"
       }
     } 

Here is an example: https://snippet.webix.com/qe1stqqe