10 lines
2.9 KiB
JavaScript
10 lines
2.9 KiB
JavaScript
/*
|
|
* Kendo UI Complete v2013.3.1119 (http://kendoui.com)
|
|
* Copyright 2013 Telerik AD. All rights reserved.
|
|
*
|
|
* Kendo UI Complete commercial licenses may be obtained at
|
|
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-complete-commercial.aspx
|
|
* If you do not own a commercial license, this file shall be governed by the trial license terms.
|
|
*/
|
|
!function(define){return define(["./kendo.dataviz.chart.min"],function(){!function(e){function i(e){return"number"==typeof e?[e]:e}var t=window.kendo,n=t.dataviz,a=n.ui.Chart,r=t.data.ObservableArray,s=n.SharedTooltip,o=t.deepExtend,l=e.isArray,h=n.inArray,d=Math,p="k-",u=150,c=150,f="bar",g="bullet",v="pie",y=[f,g],m=a.extend({init:function(t,n){var s=this,u=s.stage=e("<span />"),c=n||{};t=e(t).addClass(p+"sparkline").empty().append(u),s._initialWidth=d.floor(t.width()),c=i(c),(l(c)||c instanceof r)&&(c={seriesDefaults:{data:c}}),c.series||(c.series=[{data:i(c.data)}]),o(c,{seriesDefaults:{type:c.type}}),(h(c.series[0].type,y)||h(c.seriesDefaults.type,y))&&(c=o({},{categoryAxis:{crosshair:{visible:!1}}},c)),a.fn.init.call(s,t,c)},options:{name:"Sparkline",chartArea:{margin:2},axisDefaults:{visible:!1,majorGridLines:{visible:!1},valueAxis:{narrowRange:!0}},seriesDefaults:{type:"line",area:{line:{width:.5}},bar:{stack:!0},padding:2,width:.5,overlay:{gradient:null},highlight:{visible:!1},border:{width:0},markers:{size:2,visible:!1}},tooltip:{visible:!0,shared:!0},categoryAxis:{crosshair:{visible:!0,tooltip:{visible:!1}}},legend:{visible:!1},transitions:!1,pointWidth:5},_applyDefaults:function(e){var i=this,t=n.ViewFactory.current.create({},e.renderAs);n.CanvasView&&t instanceof n.CanvasView&&o(e,{categoryAxis:{crosshair:{visible:!1}}}),a.fn._applyDefaults.apply(i,arguments)},_modelOptions:function(){var e,i=this,t=i.options,n=i._initialWidth,a=i.stage;return i.stage[0].innerHTML=" ",e=o({width:n?n:i._autoWidth(),height:a.height(),transitions:t.transitions},t.chartArea,{inline:!0,align:!1}),a.css({width:e.width,height:e.height}),e},_createTooltip:function(){var e,i=this,t=i.options,n=i.element;return e=i._sharedTooltip()?new b(n,i._plotArea,t.tooltip):a.fn._createTooltip.call(i)},_renderView:function(){var e=this;return e.element.empty().append(e.stage),e._view.renderTo(e.stage[0])},_autoWidth:function(){var e,i,t,a=this,r=a.options,s=n.getSpacing(r.chartArea.margin),o=r.series,l=a.dataSource.total(),h=0;for(i=0;i<o.length;i++){if(t=o[i],t.type===f)return u;if(t.type===g)return c;if(t.type===v)return a.stage.height();t.data&&(h=d.max(h,t.data.length))}return e=d.max(l,h)*r.pointWidth,e>0&&(e+=s.left+s.right),e}}),b=s.extend({options:{animation:{duration:0}},_anchor:function(e,i){var t=s.fn._anchor.call(this,e,i);return t.y=-this.element.height()-this.options.offset,t},_hideElement:function(){this.element.hide()}});n.ui.plugin(m),o(n,{})}(window.kendo.jQuery)})}("function"==typeof define&&define.amd?define:function(e,i){return i()});
|
|
//@ sourceMappingURL=kendo.dataviz.sparkline.min.js.map
|