For up to date documentation and features, visit http://docs.sencha.com/ext-js/4-0

Sencha Documentation

Labels is a mixin whose methods are appended onto the Series class. Labels is an interface with methods implemented in each of the Series (Pie, Bar, etc) for label creation and label placement.

The methods implemented by the Series are:

  • onCreateLabel(storeItem, item, i, display) Called each time a new label is created. The arguments of the method are:

    • storeItem The element of the store that is related to the label sprite.
    • item The item related to the label sprite. An item is an object containing the position of the shape used to describe the visualization and also pointing to the actual shape (circle, rectangle, path, etc).
    • i The index of the element created (i.e the first created label, second created label, etc)
    • display The display type. May be false if the label is hidden
  • onPlaceLabel(label, storeItem, item, i, display, animate) Called for updating the position of the label. The arguments of the method are:

    • label The sprite label.
    • storeItem The element of the store that is related to the label sprite
    • item The item related to the label sprite. An item is an object containing the position of the shape used to describe the visualization and also pointing to the actual shape (circle, rectangle, path, etc).
    • i The index of the element to be updated (i.e. whether it is the first, second, third from the labelGroup)
    • display The display type. May be false if the label is hidden.
    • animate A boolean value to set or unset animations for the labels.
Defined By

Config Options

Other Configs

 

The color of the label text. Default value: '#000' (black).

The color of the label text. Default value: '#000' (black).

 
Specifies the presence and position of labels for each pie slice. Either "rotate", "middle", "insideStart", "insideEn...

Specifies the presence and position of labels for each pie slice. Either "rotate", "middle", "insideStart", "insideEnd", "outside", "over", "under", or "none" to prevent label rendering. Default value: 'none'.

 

The name of the field to be displayed in the label. Default value: 'name'.

The name of the field to be displayed in the label. Default value: 'name'.

 

The font used for the labels. Defautl value: "11px Helvetica, sans-serif".

The font used for the labels. Defautl value: "11px Helvetica, sans-serif".

 
Specifies the minimum distance from a label to the origin of the visualization. This parameter is useful when using P...

Specifies the minimum distance from a label to the origin of the visualization. This parameter is useful when using PieSeries width variable pie slice lengths. Default value: 50.

 

Either "horizontal" or "vertical". Dafault value: "horizontal".

Either "horizontal" or "vertical". Dafault value: "horizontal".

 

Optional function for formatting the label into a displayable value. Default value: function(v) { return v; }

Optional function for formatting the label into a displayable value. Default value: function(v) { return v; }