<!DOCTYPE html>
|
<html>
|
<head>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<title>The source code</title>
|
<link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
|
<script type="text/javascript" src="../resources/prettify/prettify.js"></script>
|
<style type="text/css">
|
.highlight { display: block; background-color: #ddd; }
|
</style>
|
<script type="text/javascript">
|
function highlight() {
|
document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
|
}
|
</script>
|
</head>
|
<body onload="prettyPrint(); highlight();">
|
<pre class="prettyprint lang-js"><span id='Ext-chart-axis-Abstract'>/**
|
</span> * @class Ext.chart.axis.Abstract
|
* Base class for all axis classes.
|
* @private
|
*/
|
Ext.define('Ext.chart.axis.Abstract', {
|
|
/* Begin Definitions */
|
|
requires: ['Ext.chart.Chart'],
|
|
/* End Definitions */
|
|
<span id='Ext-chart-axis-Abstract-cfg-label'> /**
|
</span> * @cfg {Ext.chart.Label} label
|
* The config for chart label.
|
*/
|
|
<span id='Ext-chart-axis-Abstract-cfg-fields'> /**
|
</span> * @cfg {String[]} fields
|
* The fields of model to bind to this axis.
|
*
|
* For example if you have a data set of lap times per car, each having the fields:
|
* `'carName'`, `'avgSpeed'`, `'maxSpeed'`. Then you might want to show the data on chart
|
* with `['carName']` on Name axis and `['avgSpeed', 'maxSpeed']` on Speed axis.
|
*/
|
|
<span id='Ext-chart-axis-Abstract-method-constructor'> /**
|
</span> * Creates new Axis.
|
* @param {Object} config (optional) Config options.
|
*/
|
constructor: function(config) {
|
config = config || {};
|
|
var me = this,
|
pos = config.position || 'left';
|
|
pos = pos.charAt(0).toUpperCase() + pos.substring(1);
|
//axisLabel(Top|Bottom|Right|Left)Style
|
config.label = Ext.apply(config['axisLabel' + pos + 'Style'] || {}, config.label || {});
|
config.axisTitleStyle = Ext.apply(config['axisTitle' + pos + 'Style'] || {}, config.labelTitle || {});
|
Ext.apply(me, config);
|
me.fields = Ext.Array.from(me.fields);
|
this.callParent();
|
me.labels = [];
|
me.getId();
|
me.labelGroup = me.chart.surface.getGroup(me.axisId + "-labels");
|
},
|
|
<span id='Ext-chart-axis-Abstract-property-alignment'> alignment: null,
|
</span><span id='Ext-chart-axis-Abstract-property-grid'> grid: false,
|
</span><span id='Ext-chart-axis-Abstract-property-steps'> steps: 10,
|
</span><span id='Ext-chart-axis-Abstract-property-x'> x: 0,
|
</span><span id='Ext-chart-axis-Abstract-property-y'> y: 0,
|
</span><span id='Ext-chart-axis-Abstract-property-minValue'> minValue: 0,
|
</span><span id='Ext-chart-axis-Abstract-property-maxValue'> maxValue: 0,
|
</span>
|
<span id='Ext-chart-axis-Abstract-method-getId'> getId: function() {
|
</span> return this.axisId || (this.axisId = Ext.id(null, 'ext-axis-'));
|
},
|
|
<span id='Ext-chart-axis-Abstract-method-processView'> /*
|
</span> Called to process a view i.e to make aggregation and filtering over
|
a store creating a substore to be used to render the axis. Since many axes
|
may do different things on the data and we want the final result of all these
|
operations to be rendered we need to call processView on all axes before drawing
|
them.
|
*/
|
processView: Ext.emptyFn,
|
|
<span id='Ext-chart-axis-Abstract-method-drawAxis'> drawAxis: Ext.emptyFn,
|
</span><span id='Ext-chart-axis-Abstract-method-addDisplayAndLabels'> addDisplayAndLabels: Ext.emptyFn
|
</span>});
|
</pre>
|
</body>
|
</html>
|