www-thermferm/jqwidgets/jqxchart.api.js

changeset 511
2d1d43c3a2c2
parent 373
f6850e0b5d35
child 617
b216f9d4b917
equal deleted inserted replaced
510:2da3d3340403 511:2d1d43c3a2c2
1 /* 1 /*
2 jQWidgets v3.8.0 (2015-Apr) 2 jQWidgets v4.5.2 (2017-May)
3 Copyright (c) 2011-2015 jQWidgets. 3 Copyright (c) 2011-2017 jQWidgets.
4 License: http://jqwidgets.com/license/ 4 License: http://jqwidgets.com/license/
5 */ 5 */
6 !function(a){a.extend(a.jqx._jqxChart.prototype,{_moduleApi:!0,getItemsCount:function(a,b){var c=this.seriesGroups[a];if(!this._isSerieVisible(a,b))return 0;var d=this._renderData;if(!c||!d||d.length<=a)return 0;var e=c.series[b];return e?d[a].offsets[b].length:0},getXAxisRect:function(a){var b=this._renderData;if(b&&!(b.length<=a)&&b[a].xAxis)return b[a].xAxis.rect},getXAxisLabels:function(a){var b=[],c=this._renderData;if(!c||c.length<=a)return b;if(c=c[a].xAxis,!c)return b;var d=this.seriesGroups[a];if(d.polar||d.spider){for(var e=0;e<c.polarLabels.length;e++){var f=c.polarLabels[e];b.push({offset:{x:f.x,y:f.y},value:f.value})}return b}for(var g=this._getXAxis(a),h=this.getXAxisRect(a),i="top"==g.position||"right"==g.position,j="horizontal"==d.orientation,e=0;e<c.data.length;e++)j?b.push({offset:{x:h.x+(i?0:h.width),y:h.y+c.data.data[e]},value:c.data.xvalues[e]}):b.push({offset:{x:h.x+c.data.data[e],y:h.y+(i?h.height:0)},value:c.data.xvalues[e]});return b},getValueAxisRect:function(a){var b=this._renderData;if(b&&!(b.length<=a)&&b[a].valueAxis)return b[a].valueAxis.rect},getValueAxisLabels:function(a){var b=[],c=this._renderData;if(!c||c.length<=a)return b;if(c=c[a].valueAxis,!c)return b;var d=this._getValueAxis(a),e="top"==d.position||"right"==d.position,f=this.seriesGroups[a],g="horizontal"==f.orientation;if(f.polar||f.spider){for(var h=0;h<c.polarLabels.length;h++){var i=c.polarLabels[h];b.push({offset:{x:i.x,y:i.y},value:i.value})}return b}for(var h=0;h<c.items.length;h++)g?b.push({offset:{x:c.itemOffsets[c.items[h]].x+c.itemWidth/2,y:c.rect.y+(e?c.rect.height:0)},value:c.items[h]}):b.push({offset:{x:c.rect.x+c.rect.width,y:c.itemOffsets[c.items[h]].y+c.itemWidth/2},value:c.items[h]});return b},getPlotAreaRect:function(){return this._plotRect},getRect:function(){return this._rect},showToolTip:function(a,b,c,d,e){var f=this.getItemCoord(a,b,c);isNaN(f.x)||isNaN(f.y)||this._startTooltipTimer(a,b,c,f.x,f.y,d,e)},hideToolTip:function(a){isNaN(a)&&(a=0);var b=this;b._cancelTooltipTimer(),setTimeout(function(){b._hideToolTip(0)},a)}})}(jqxBaseFramework);
6 7
7 (function(a){a.extend(a.jqx._jqxChart.prototype,{_moduleApi:true,getItemsCount:function(f,b){var d=this.seriesGroups[f];if(!this._isSerieVisible(f,b)){return 0}var e=this._renderData;if(!d||!e||e.length<=f){return 0}var c=d.series[b];if(!c){return 0}return e[f].offsets[b].length},getXAxisRect:function(c){var b=this._renderData;if(!b||b.length<=c){return undefined}if(!b[c].xAxis){return undefined}return b[c].xAxis.rect},getXAxisLabels:function(k){var d=[];var l=this._renderData;if(!l||l.length<=k){return d}l=l[k].xAxis;if(!l){return d}var j=this.seriesGroups[k];if(j.polar||j.spider){for(var e=0;e<l.polarLabels.length;e++){var h=l.polarLabels[e];d.push({offset:{x:h.x,y:h.y},value:h.value})}return d}var c=this._getXAxis(k);var g=this.getXAxisRect(k);var b=c.position=="top"||c.position=="right";var f=j.orientation=="horizontal";for(var e=0;e<l.data.length;e++){if(f){d.push({offset:{x:g.x+(b?0:g.width),y:g.y+l.data.data[e]},value:l.data.xvalues[e]})}else{d.push({offset:{x:g.x+l.data.data[e],y:g.y+(b?g.height:0)},value:l.data.xvalues[e]})}}return d},getValueAxisRect:function(c){var b=this._renderData;if(!b||b.length<=c){return undefined}if(!b[c].valueAxis){return undefined}return b[c].valueAxis.rect},getValueAxisLabels:function(h){var c=[];var j=this._renderData;if(!j||j.length<=h){return c}j=j[h].valueAxis;if(!j){return c}var k=this._getValueAxis(h);var b=k.position=="top"||k.position=="right";var g=this.seriesGroups[h];var e=g.orientation=="horizontal";if(g.polar||g.spider){for(var d=0;d<j.polarLabels.length;d++){var f=j.polarLabels[d];c.push({offset:{x:f.x,y:f.y},value:f.value})}return c}for(var d=0;d<j.items.length;d++){if(e){c.push({offset:{x:j.itemOffsets[j.items[d]].x+j.itemWidth/2,y:j.rect.y+(b?j.rect.height:0)},value:j.items[d]})}else{c.push({offset:{x:j.rect.x+j.rect.width,y:j.itemOffsets[j.items[d]].y+j.itemWidth/2},value:j.items[d]})}}return c},getPlotAreaRect:function(){return this._plotRect},getRect:function(){return this._rect},showToolTip:function(f,c,e,b,d){var g=this.getItemCoord(f,c,e);if(isNaN(g.x)||isNaN(g.y)){return}this._startTooltipTimer(f,c,e,g.x,g.y,b,d)},hideToolTip:function(c){if(isNaN(c)){c=0}var b=this;b._cancelTooltipTimer();setTimeout(function(){b._hideToolTip(0)},c)}})})(jqxBaseFramework);

mercurial