color

defines items colors

string|function color;

Example

webix.ui({
    view:"chart",
    type:"bar",
    value:"#sales#",
    label:"#sales#",
    color:"#66ccff", // fixed color for all items
    data: dataset
});

Related samples

Details

If you want to take a color from your dataset, use the template:

color: "#color#"

color template function takes 4 parameters:

  • item {object} - item data object
  • index {number} - an item index
  • levelIndex {number} - 0 by default, for child items of multi-level pie can be 0,1,2,... depending on branch index
  • parentColor {string} - optional, null for all items except child items of multi-level pie
See also
Back to top
Join Our Forum
We've retired comments here. Visit our forum for faster technical support, connect with other developers, and share your feedback there.
If you have not checked yet, be sure to visit site of our main product Webix js frameworks and page of javascript charting product.