defines the chart legend
webix.ui({
view:"chart",
...
legend:{
width:90,
values:[{text:"Type A",color:"#58dccd"},{text:"Type B",color:"#a7ee70"}],
align:"right"
}
})
The available attributes of the property are:
width | (number) the legend block's width (by default, 150) |
height | (number) the legend block's height (by default, 18) |
layout | ('x' or 'y') defines whether items should be placed vertically or horizontally (by default, y) |
align | ('left', 'right', 'center') the horizontal alignment of the block (by default, "left") |
valign | ('top', 'bottom, 'middle') the vertical alignment of the block (by default, 'bottom') |
margin | (number) sets all four margins of the legend block to the specified value (by default, 4) |
padding | (number) sets all four paddings of the legend block to the specified value (by default, 3) |
template | (string) the template for legend items. Creates an individual legend item for each object the data source. If you want to present just specific data objects (not all of them), use the values attribute |
toggle | (boolean) enables/disables the possibility to hide/show a graph by clicking on the graph legend item. For all charts, except for Stacked Vertical Bar, Stacked Horizontal Bar and Stacked Area, the default value is true. For the excepted charts the default value is false. |
values |
(array ) an array of objects, each one of which specified a discrete legend item. If it's set, the template attribute is ignored. Can have the following attributes:
|
marker |
(object) an object that defines item markers in the legend.
Can have the following attributes:
|