23 days to give it a try before you buy! Download now. The best deals on licenses are coming soon Download now. The best deals on licenses are coming soon

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",
  });
});