donutInnerText

defines text inside the donut hole

string| function donutInnerText;

Example

webix.ui({
  view: "chart",
  type:"donut",
  innerRadius:70,
  donutInnerText: "Sales";
  },
});

Related samples

Details

Defined as a string, donutInnerText can take plain text or HTML template as its value. When used as a function, it accepts 2 parameters:

  • data (array) - an array with chart data objects
  • sum (number) - sum of all data values.
{
  view: "chart",
  type: "donut",
  donutInnerText: function(data, total) {
    return (
      "<span style='font-size:20px'>"+data[0].type+":</span><br>"+data[0].val
    );
  }
}
See also
Back to top