ExtReact Docs Help

Introduction

The documentation for the ExtReact product diverges somewhat from the documentation of other Sencha products. The sections below describe documentation for all products except where indicated as unique to ExtReact.

Terms, Icons, and Labels

Many classes have shortcut names used when creating (instantiating) a class with a configuration object. The shortcut name is referred to as an alias (or xtype if the class extends Ext.Component). The alias/xtype is listed next to the class name of applicable classes for quick reference.

ExtReact component classes list the configurable name prominently at the top of the API class doc followed by the fully-qualified class name.

Access Levels

Framework classes or their members may be specified as private or protected. Else, the class / member is public. Public, protected, and private are access descriptors used to convey how and when the class or class member should be used.

Member Types

Member Syntax

Below is an example class member that we can disect to show the syntax of a class member (the lookupComponent method as viewed from the Ext.button.Button class in this case).

lookupComponent ( item ) : Ext.Component
protected

Called when a raw config object is added to this container either during initialization of the items config, or when new items are added), or {@link #insert inserted.

This method converts the passed object into an instanced child component.

This may be overridden in subclasses when special processing needs to be applied to child creation.

Parameters

item :  Object

The config object being added.

Returns
Ext.Component

The component to be added.

Let's look at each part of the member row:

Member Flags

The API documentation uses a number of flags to further commnicate the class member's function and intent. The label may be represented by a text label, an abbreviation, or an icon.

Class Icons

- Indicates a framework class

- A singleton framework class. *See the singleton flag for more information

- A component-type framework class (any class within the Ext JS framework that extends Ext.Component)

- Indicates that the class, member, or guide is new in the currently viewed version

Member Icons

- Indicates a class member of type config

Or in the case of an ExtReact component class this indicates a member of type prop

- Indicates a class member of type property

- Indicates a class member of type method

- Indicates a class member of type event

- Indicates a class member of type theme variable

- Indicates a class member of type theme mixin

- Indicates that the class, member, or guide is new in the currently viewed version

Class Member Quick-Nav Menu

Just below the class name on an API doc page is a row of buttons corresponding to the types of members owned by the current class. Each button shows a count of members by type (this count is updated as filters are applied). Clicking the button will navigate you to that member section. Hovering over the member-type button will reveal a popup menu of all members of that type for quick navigation.

Getter and Setter Methods

Getting and setter methods that correlate to a class config option will show up in the methods section as well as in the configs section of both the API doc and the member-type menus just beneath the config they work with. The getter and setter method documentation will be found in the config row for easy reference.

ExtReact component classes do not hoist the getter / setter methods into the prop. All methods will be described in the Methods section

History Bar

Your page history is kept in localstorage and displayed (using the available real estate) just below the top title bar. By default, the only search results shown are the pages matching the product / version you're currently viewing. You can expand what is displayed by clicking on the button on the right-hand side of the history bar and choosing the "All" radio option. This will show all recent pages in the history bar for all products / versions.

Within the history config menu you will also see a listing of your recent page visits. The results are filtered by the "Current Product / Version" and "All" radio options. Clicking on the button will clear the history bar as well as the history kept in local storage.

If "All" is selected in the history config menu the checkbox option for "Show product details in the history bar" will be enabled. When checked, the product/version for each historic page will show alongside the page name in the history bar. Hovering the cursor over the page names in the history bar will also show the product/version as a tooltip.

Search and Filters

Both API docs and guides can be searched for using the search field at the top of the page.

On API doc pages there is also a filter input field that filters the member rows using the filter string. In addition to filtering by string you can filter the class members by access level, inheritance, and read only. This is done using the checkboxes at the top of the page.

The checkbox at the bottom of the API class navigation tree filters the class list to include or exclude private classes.

Clicking on an empty search field will show your last 10 searches for quick navigation.

API Doc Class Metadata

Each API doc page (with the exception of Javascript primitives pages) has a menu view of metadata relating to that class. This metadata view will have one or more of the following:

Expanding and Collapsing Examples and Class Members

Runnable examples (Fiddles) are expanded on a page by default. You can collapse and expand example code blocks individually using the arrow on the top-left of the code block. You can also toggle the collapse state of all examples using the toggle button on the top-right of the page. The toggle-all state will be remembered between page loads.

Class members are collapsed on a page by default. You can expand and collapse members using the arrow icon on the left of the member row or globally using the expand / collapse all toggle button top-right.

Desktop -vs- Mobile View

Viewing the docs on narrower screens or browsers will result in a view optimized for a smaller form factor. The primary differences between the desktop and "mobile" view are:

Viewing the Class Source

The class source can be viewed by clicking on the class name at the top of an API doc page. The source for class members can be viewed by clicking on the "view source" link on the right-hand side of the member row.

ExtReact 7.0.0


top

Ext.chart.series.Polar premium abstract

NPM Package

@sencha/ext-charts

Hierarchy

Ext.Base
Ext.chart.series.Series
Ext.chart.series.Polar

Sub-Classes

pie
pie3d
radar

Summary

Common base class for series implementations that plot values using polar coordinates.

No members found using the current filters

configs

Optional Configs

angleField : String

The store record field name for the angular axes in radar charts, or the size of the slices in pie charts.

Defaults to:

null

getAngleField : String

Returns the value of angleField

Returns

String

setAngleField (angleField)

Sets the value of angleField

Parameters

angleField :  String

animation : Object

The series animation configuration.

Defaults to:

null

getAnimation : Object

Returns the value of animation

Returns

Object

setAnimation (animation)

Sets the value of animation

Parameters

animation :  Object

background : Object

Sets the background of the surface the series is attached.

Defaults to:

null

getBackground : Object

Returns the value of background

Returns

Object

setBackground (background)

Sets the value of background

Parameters

background :  Object

center : Array

Center of the polar series.

Defaults to:

[0,0]

getCenter : Array

Returns the value of center

Returns

Array

setCenter (center)

Sets the value of center

Parameters

center :  Array

colors : Array

An array of color values which is used, in order of appearance, by the series. Each series can request one or more colors from the array. Radar, Scatter or Line charts require just one color each. Candlestick and OHLC require two (1 for drops + 1 for rises). Pie charts and Stacked charts (like Bar or Pie charts) require one color for each data category they represent, so one color for each slice of a Pie chart or each segment (not bar) of a Bar chart. It overrides the colors that are provided by the current theme.

Defaults to:

null

getColors : Array

Returns the value of colors

Returns

Array

setColors (colors)

Sets the value of colors

Parameters

colors :  Array

hidden : Boolean / Array

Defaults to:

false

getHidden : Boolean / Array

Returns the value of hidden

Returns

Boolean / Array

setHidden (hidden)

Sets the value of hidden

Parameters

hidden :  Boolean / Array

highlight : Boolean / Object

The sprite attributes that will be applied to the highlighted items in the series. If set to 'true', the default highlight style from highlightCfg will be used. If the value of this config is an object, it will be merged with the highlightCfg. In case merging of 'highlight' and 'highlightCfg' configs in not the desired behavior, provide the 'highlightCfg' instead.

Defaults to:

false

getHighlight : Boolean / Object

Returns the value of highlight

Returns

Boolean / Object

setHighlight (highlight)

Sets the value of highlight

Parameters

highlight :  Boolean / Object

label : Object

Object with the following properties:

Defaults to:

{}

Properties

display : String

Specifies the presence and position of the labels. The possible values depend on the series type. For Line and Scatter series: 'under' | 'over' | 'rotate'. For Bar and 3D Bar series: 'insideStart' | 'insideEnd' | 'outside'. For Pie series: 'outside' | 'rotate' | 'horizontal' | 'vertical'. Area, Radar and Candlestick series don't support labels. For Area and Radar series please consider using tooltips instead. 3D Pie series currently always display labels 'outside'. For all series: 'none' hides the labels.

Default value: 'none'.

color : String

The color of the label text.

Default value: '#000' (black).

field : String/String[]

The name(s) of the field(s) to be displayed in the labels. If your chart has 3 series that correspond to the fields 'a', 'b', and 'c' of your model, and you only want to display labels for the series 'c', you must still provide an array [null, null, 'c'].

Default value: null.

font : String

The font used for the labels.

Default value: '14px Helvetica'.

orientation : String

Either 'horizontal' or 'vertical'. If not set (default), the orientation is inferred from the value of the flipXY property of the series.

Default value: ''.

renderer : Function

Optional function for formatting the label into a displayable value.

The arguments to the method are:

  • text, sprite, config, rendererData, index

    Label's renderer is passed the same arguments as renderer plus one extra 'text' argument which comes first.

Returns

:Object/String

The attributes that have been changed or added, or the text for the label. Example to enclose every other label in parentheses:

 renderer: function (text) {
     if (index % 2 == 0) {
         return '(' + text + ')'
     }
 }

Default value: null

getLabel : Object

Returns the value of label

Returns

Object

setLabel (label)

Sets the value of label

Parameters

label :  Object

labelOverflowPadding : Number

Extra distance value for which the labelOverflow listener is triggered.

Defaults to:

null

getLabelOverflowPadding : Number

Returns the value of labelOverflowPadding

Returns

Number

setLabelOverflowPadding (labelOverflowPadding)

Sets the value of labelOverflowPadding

Parameters

labelOverflowPadding :  Number

marker : Object / Boolean

The sprite template used by marker instances on the series. If the value of the marker config is set to true or the type of the sprite instance is not specified, the Ext.draw.sprite.Circle sprite will be used.

Examples:

marker: true

marker: {
    radius: 8
}

marker: {
    type: 'arrow',
    animation: {
        duration: 200,
        easing: 'backOut'
    }
}

Defaults to:

null

getMarker : Object / Boolean

Returns the value of marker

Returns

Object / Boolean

setMarker (marker)

Sets the value of marker

Parameters

marker :  Object / Boolean

markerSubStyle : Object

This is cyclic used if series have multiple marker sprites.

Defaults to:

null

getMarkerSubStyle : Object

Returns the value of markerSubStyle

Returns

Object

setMarkerSubStyle (markerSubStyle)

Sets the value of markerSubStyle

Parameters

markerSubStyle :  Object

offsetX : Number

The x-offset of center of the polar series related to the center of the boundary.

Defaults to:

0

getOffsetX : Number

Returns the value of offsetX

Returns

Number

setOffsetX (offsetX)

Sets the value of offsetX

Parameters

offsetX :  Number

offsetY : Number

The y-offset of center of the polar series related to the center of the boundary.

Defaults to:

0

getOffsetY : Number

Returns the value of offsetY

Returns

Number

setOffsetY (offsetY)

Sets the value of offsetY

Parameters

offsetY :  Number

radiusField : String

The store record field name for the radial axes in radar charts, or the radius of the slices in pie charts.

getRadiusField : String

Returns the value of radiusField

Returns

String

setRadiusField (radiusField)

Sets the value of radiusField

Parameters

radiusField :  String

renderer : Function

A function that can be provided to set custom styling properties to each rendered element. It receives (sprite, config, rendererData, index) as parameters.

Defaults to:

null

Parameters

sprite :  Object

The sprite affected by the renderer. The visual attributes are in sprite.attr. The data field is available in sprite.getField().

config :  Object

The sprite configuration. It varies with the series and the type of sprite: for instance, a Line chart sprite might have just the x and y properties while a Bar chart sprite also has width and height. A type might be present too. For instance to draw each marker and each segment of a Line chart, the renderer is called with the config.type set to either marker or line.

rendererData :  Object

A record with different properties depending on the type of chart. The only guaranteed property is rendererData.store, the store used by the series. In some cases, a store may not exist: for instance a Gauge chart may read its value directly from its configuration; in this case rendererData.store is null and the value is available in rendererData.value.

index :  Number

The index of the sprite. It is usually the index of the store record associated with the sprite, in which case the record can be obtained with store.getData().items[index]. If the chart is not associated with a store, the index represents the index of the sprite within the series. For instance a Gauge chart may have as many sprites as there are sectors in the background of the gauge, plus one for the needle.

Returns

:Object

The attributes that have been changed or added. Note: it is usually possible to add or modify the attributes directly into the config parameter and not return anything, but returning an object with only those attributes that have been changed may allow for optimizations in the rendering of some series. Example to draw every other marker in red:

 renderer: function (sprite, config, rendererData, index) {
     if (config.type === 'marker') {
         return { strokeStyle: (index % 2 === 0 ? 'red' : 'black') };
     }
 }

getRenderer : Function

Returns the value of renderer

Returns

Function

setRenderer (renderer)

Sets the value of renderer

Parameters

renderer :  Function

rotation : Number

The angle in degrees at which the first polar series item should start.

Defaults to:

0

getRotation : Number

Returns the value of rotation

Returns

Number

setRotation (rotation)

Sets the value of rotation

Parameters

rotation :  Number

showInLegend : Boolean

Whether to add the series elements as legend items.

Defaults to:

true

getShowInLegend : Boolean

Returns the value of showInLegend

Returns

Boolean

setShowInLegend (showInLegend)

Sets the value of showInLegend

Parameters

showInLegend :  Boolean

showMarkers : Boolean

Whether markers should be displayed at the data points along the line. If true, then the marker config item will determine the markers' styling.

Defaults to:

true

getShowMarkers : Boolean

Returns the value of showMarkers

Returns

Boolean

setShowMarkers (showMarkers)

Sets the value of showMarkers

Parameters

showMarkers :  Boolean

store : Object

The store to use for this series. If not specified, the series will use the chart's store.

Defaults to:

null

getStore : Object

Returns the value of store

Returns

Object

setStore (store)

Sets the value of store

Parameters

store :  Object

style : Object

Custom style configuration for the sprite used in the series. It overrides the style that is provided by the current theme.

Defaults to:

{}

getStyle : Object

Returns the value of style

Returns

Object

setStyle (style)

Sets the value of style

Parameters

style :  Object

subStyle : Object

This is the cyclic used if the series has multiple sprites.

Defaults to:

{}

getSubStyle : Object

Returns the value of subStyle

Returns

Object

setSubStyle (subStyle)

Sets the value of subStyle

Parameters

subStyle :  Object

title : String / String[]

The human-readable name of the series (displayed in the legend). If the series is stacked (has multiple components in it) this should be an array, where each string corresponds to a stacked component.

Defaults to:

null

getTitle : String / String[]

Returns the value of title

Returns

String / String[]

setTitle (title)

Sets the value of title

Parameters

title :  String / String[]

tooltip : Object

Add tooltips to the visualization's markers. The config options for the tooltip are the same configuration used with <ExtTooltip/> plus a renderer config option and a scope for the renderer. For example:

tooltip: {
  trackMouse: true,
  width: 140,
  height: 28,
  renderer: function (toolTip, record, ctx) {
      toolTip.setHtml(record.get('name') + ': ' + record.get('data1') + ' views');
  }
}

Note that tooltips are shown for series markers and won't work if the marker is not configured.

Defaults to:

null

Properties

scope : Object

The scope to use when the renderer function is called. Defaults to the Series instance.

renderer : Function

An 'interceptor' method which can be used to modify the tooltip attributes before it is shown. The renderer function is passed the following params:

toolTip :  <ExtTooltip/>

The tooltip instance

record :  Ext.data.Model

The record instance for the chart item (sprite) currently targeted by the tooltip.

ctx :  Object

A data object with values relating to the currently targeted chart sprite

category :  String

The type of sprite passed to the renderer function (will be "items", "markers", or "labels" depending on the target sprite of the tooltip)

field :  String

The yField for the series

index :  Number

The target sprite's index within the series' items

record :  Ext.data.Model

The record instance for the chart item (sprite) currently targeted by the tooltip.

series :  Ext.chart.series.Series

The series instance containing the tooltip's target sprite

sprite :  Ext.draw.sprite.Sprite

The sprite (item) target of the tooltip

getTooltip : Object

Returns the value of tooltip

Returns

Object

setTooltip (tooltip)

Sets the value of tooltip

Parameters

tooltip :  Object

useDarkerStrokeColor : Boolean / Number

Colors for the series can be set directly through the 'colors' config, or indirectly with the current theme or the 'colors' config that is set onto the chart. These colors are used as "fill color". Set this config to true, if you want a darker color for the strokes. Set it to false if you want to use the same color as the fill color. Alternatively, you can set it to a number between 0 and 1 to control how much darker the strokes should be.

Note: this should be initial config and cannot be changed later on.

Defaults to:

true

getUseDarkerStrokeColor : Boolean / Number

Returns the value of useDarkerStrokeColor

Returns

Boolean / Number

setUseDarkerStrokeColor (useDarkerStrokeColor)

Sets the value of useDarkerStrokeColor

Parameters

useDarkerStrokeColor :  Boolean / Number

properties

Instance Properties

seriesType : String

Default series sprite type.

Defaults to:

'sprite'

methods

Instance Methods
Static Methods

override ( members ) : Ext.Base
static sta

Override members of this class. Overridden methods can be invoked via Ext.Base#callParent.

Ext.define('My.Cat', {
    constructor: function() {
        alert("I'm a cat!");
    }
});

My.Cat.override({
    constructor: function() {
        alert("I'm going to be a cat!");

        this.callParent(arguments);

        alert("Meeeeoooowwww");
    }
});

var kitty = new My.Cat(); // alerts "I'm going to be a cat!"
                          // alerts "I'm a cat!"
                          // alerts "Meeeeoooowwww"

Direct use of this method should be rare. Use Ext.define instead:

Ext.define('My.CatOverride', {
    override: 'My.Cat',
    constructor: function() {
        alert("I'm going to be a cat!");

        this.callParent(arguments);

        alert("Meeeeoooowwww");
    }
});

The above accomplishes the same result but can be managed by the Ext.Loader which can properly order the override and its target class and the build process can determine whether the override is needed based on the required state of the target class (My.Cat).

Parameters

members :  Object

The properties to add to this class. This should be specified as an object literal containing one or more properties.

Returns

:Ext.Base

this class

events

chartattached ( chart, series, eOpts )

Fires when the Ext.chart.AbstractChart has been attached to this series.

Parameters

chart :  Ext.chart.AbstractChart

series :  Ext.chart.series.Series

eOpts : Object

The options object passed to Ext.util.Observable.addListener.

chartdetached ( chart, series, eOpts )

Fires when the Ext.chart.AbstractChart has been detached from this series.

Parameters

chart :  Ext.chart.AbstractChart

series :  Ext.chart.series.Series

eOpts : Object

The options object passed to Ext.util.Observable.addListener.

itemclick ( series, item, event, eOpts )

Fires when a click event occurs on a series item. Note: This event requires the Ext.chart.plugin.ItemEvents plugin be added to the chart.

Parameters

series :  Ext.chart.series.Series

item :  Object

event :  Event

eOpts : Object

The options object passed to Ext.util.Observable.addListener.

itemdblclick ( series, item, event, eOpts )

Fires when a double click event occurs on a series item. Note: This event requires the Ext.chart.plugin.ItemEvents plugin be added to the chart.

Parameters

series :  Ext.chart.series.Series

item :  Object

event :  Event

eOpts : Object

The options object passed to Ext.util.Observable.addListener.

itemmousedown ( series, item, event, eOpts )

Fires when a mousedown event occurs on a series item. Note: This event requires the Ext.chart.plugin.ItemEvents plugin be added to the chart.

Parameters

series :  Ext.chart.series.Series

item :  Object

event :  Event

eOpts : Object

The options object passed to Ext.util.Observable.addListener.

itemmousemove ( series, item, event, eOpts )

Fires when the mouse is moved on a series item. Note: This event requires the Ext.chart.plugin.ItemEvents plugin be added to the chart.

Parameters

series :  Ext.chart.series.Series

item :  Object

event :  Event

eOpts : Object

The options object passed to Ext.util.Observable.addListener.

itemmouseout ( series, item, event, eOpts )

Fires when the mouse exits a series item. Note: This event requires the Ext.chart.plugin.ItemEvents plugin be added to the chart.

Parameters

series :  Ext.chart.series.Series

item :  Object

event :  Event

eOpts : Object

The options object passed to Ext.util.Observable.addListener.

itemmouseover ( series, item, event, eOpts )

Fires when the mouse enters a series item. Note: This event requires the Ext.chart.plugin.ItemEvents plugin be added to the chart.

Parameters

series :  Ext.chart.series.Series

item :  Object

event :  Event

eOpts : Object

The options object passed to Ext.util.Observable.addListener.

itemmouseup ( series, item, event, eOpts )

Fires when a mouseup event occurs on a series item. Note: This event requires the Ext.chart.plugin.ItemEvents plugin be added to the chart.

Parameters

series :  Ext.chart.series.Series

item :  Object

event :  Event

eOpts : Object

The options object passed to Ext.util.Observable.addListener.

itemtap ( series, item, event, eOpts )

Fires when a tap event occurs on a series item. Note: This event requires the Ext.chart.plugin.ItemEvents plugin be added to the chart.

Parameters

series :  Ext.chart.series.Series

item :  Object

event :  Event

eOpts : Object

The options object passed to Ext.util.Observable.addListener.

storechange ( series, newStore, oldStore, eOpts )

Fires when the store of the series changes.

Parameters

series :  Ext.chart.series.Series

newStore :  Ext.data.Store

oldStore :  Ext.data.Store

eOpts : Object

The options object passed to Ext.util.Observable.addListener.

ExtReact 7.0.0