NEW VERSION RELEASED! Webix 11 Read More Core Updates, Extended Functionalities in SpreadSheet and File Manager and more

Value Formatting, JavaScript Programming Example of Value Formatting

Value Formatting, JavaScript Programming Example of Value Formatting

Check out the programming example below for formatting values in Pivot. Don't miss the chance to use our free coding samples or a snippet tool below for your web development projects.

JS Code

webix.ready(function() {
  webix.CustomScroll.init();

  webix.ui({
    view: "pivot",
    structure: {
      rows: ["form", "name"],
      columns: ["year"],
      values: [
        //default formatting
        {
          name: "oil",
          operation: ["min", "sum"],
        },
        //custom formatting
        {
          name: "gdp",
          operation: ["min", "sum"],
          format: webix.Number.format,
        },
      ],
    },
    url: "https://cdn.webix.com/demodata/pivot.json",
  });
});