class type t =Inheritsobject
..end
Ext_draw_Component.t
Ext_chart_Mask.t
Ext_chart_Navigation.t
Ext_chart_theme_Theme.t
Ext_util_Bindable.t
Ext_util_Observable.t
method bindStore : 'a. 'a Js.t Js.optdef -> unit Js.meth
Binds a store to this instance.
Parameters:
_ Js.t
(optional)
The store to bind or ID of the store.
When no store given (or when null
or undefined
passed), unbinds the existing store.
method getStoreListeners : 'b. Ext_data_Store.t Js.t -> 'b Js.t Js.meth
Gets the listeners to bind to a new store.
Parameters:
Ext_data_Store.t Js.t
The Store which is being bound to for which a listeners object should be returned.
Returns:
_ Js.t
The listeners to be bound to the store in object literal form. The scope may be omitted, it is assumed to be the current instance.
method initComponent : unit Js.meth
The initComponent template method is an important initialization step for a Component. It is intended to be implemented by each subclass of Ext.Component to provide any needed constructor logic. The initComponent method of the class being created is called first, with each initComponent method up the hierarchy to Ext.Component being called thereafter. This makes it easy to implement and, if needed, override the constructor logic of the Component at any step in the hierarchy.
The initComponent method must contain a call to callParent in order to ensure that the parent class' initComponent method is also called.
All config options passed to the constructor are applied to this
before initComponent is called,
so you can simply access them with this.someOption
.
The following example demonstrates using a dynamic string for the text of a button at the time of instantiation of the class.
Ext.define('DynamicButtonText', {
extend: 'Ext.button.Button',
initComponent: function() {
this.text = new Date();
this.renderTo = Ext.getBody();
this.callParent();
}
});
Ext.onReady(function() {
Ext.create('DynamicButtonText');
});
method onShow : 'c 'd 'e.
'c Js.t Js.optdef ->
'd Js.callback Js.optdef -> 'e Js.t Js.optdef -> unit Js.meth
Allows addition of behavior to the show operation. After calling the superclass's onShow, the Component will be visible.
Override in subclasses where more complex behaviour is needed.
Gets passed the same parameters as show.
Parameters:
_ Js.t
(optional)
_ Js.callback
(optional)
_ Js.t
(optional)
method redraw : bool Js.t Js.optdef -> unit Js.meth
Redraws the chart. If animations are set this will animate the chart too.
Parameters:
bool Js.t
(optional)
flag which changes the default origin points of the chart for animations.
method save : 'f 'g. 'f Js.t Js.optdef -> 'g Js.t Js.meth
Saves the chart by either triggering a download or returning a string containing the chart data as SVG. The action depends on the export type specified in the passed configuration. The chart will be exported using either the Ext.draw.engine.SvgExporter or the Ext.draw.engine.ImageExporter classes.
Possible export types:
If 'image/svg+xml' is specified, the SvgExporter will be used. If 'image/png' or 'image/jpeg' are specified, the ImageExporter will be used. This exporter must post the SVG data to a remote server to have the data processed, see the Ext.draw.engine.ImageExporter for more details.
Example usage:
chart.save({
type: 'image/png'
});
Important: By default, chart data is sent to a server operated by Sencha to do data processing. You may change this default by setting the defaultUrl of the Ext.draw.engine.ImageExporter class. In addition, please note that this service only creates PNG images.
Parameters:
_ Js.t
(optional)
The configuration to be passed to the exporter. See the export method for the appropriate exporter for the relevant configuration options
Returns:
_ Js.t
See the return types for the appropriate exporter