-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathzingchart.jquery.min.js
1 lines (1 loc) · 21.3 KB
/
zingchart.jquery.min.js
1
!function(t){t.fn.zingchart=function(e){var n=this[0].id,i={id:n,height:"100%",width:"100%"};return t.extend(i,e),zingchart.render(i),this},t.fn.loadModules=function(t){return zingchart.loadModules(t),this},t.fn.addNode=function(t){return zingchart.exec(this[0].id,"addnode",t),this},t.fn.addPlot=function(t){return zingchart.exec(this[0].id,"addplot",t),this},t.fn.appendSeriesData=function(t){return zingchart.exec(this[0].id,"appendseriesdata",t),this},t.fn.appendSeriesValues=function(t){return zingchart.exec(this[0].id,"appendseriesvalues",t),this},t.fn.getSeriesData=function(t){return t?zingchart.exec(this[0].id,"getseriesdata",t):zingchart.exec(this[0].id,"getseriesdata",{})},t.fn.getSeriesValues=function(t){return t?zingchart.exec(this[0].id,"getseriesvalues",t):zingchart.exec(this[0].id,"getseriesvalues",{})},t.fn.modifyPlot=function(t){return zingchart.exec(this[0].id,"modifyplot",t),this},t.fn.removeNode=function(t){return zingchart.exec(this[0].id,"removenode",t),this},t.fn.removePlot=function(t){return zingchart.exec(this[0].id,"removeplot",t),this},t.fn.set3dView=function(t){return zingchart.exec(this[0].id,"set3dview",t),this},t.fn.setNodeValue=function(t){return zingchart.exec(this[0].id,"setnodevalue",t),this},t.fn.setSeriesData=function(t){return zingchart.exec(this[0].id,"setseriesdata",t),this},t.fn.setSeriesValues=function(t){return zingchart.exec(this[0].id,"setseriesvalues",t),this},t.fn.exportData=function(){return zingchart.exec(this[0].id,"exportdata"),this},t.fn.getImageData=function(t){if("png"==t||"jpg"==t||"bmp"==t)return zingchart.exec(this[0].id,"getimagedata",{filetype:t}),this;throw"Error: Got "+t+", expected 'png' or 'jpg' or 'bmp'"},t.fn.print=function(){return zingchart.exec(this[0].id,"print"),this},t.fn.saveAsImage=function(){return zingchart.exec(this[0].id,"saveasimage"),this},t.fn.clearFeed=function(){return zingchart.exec(this[0].id,"clearfeed"),this},t.fn.getInterval=function(){return zingchart.exec(this[0].id,"getinterval")},t.fn.setInterval=function(t){if("number"==typeof t)return zingchart.exec(this[0].id,"setinterval",{interval:t}),this;if("object"==typeof t)return zingchart.exec(this[0].id,"setinterval",t),this;throw"Error: Got "+typeof t+", expected number"},t.fn.startFeed=function(){return zingchart.exec(this[0].id,"startfeed"),this},t.fn.stopFeed=function(){return zingchart.exec(this[0].id,"stopfeed"),this},t.fn.getChartType=function(t){return t?zingchart.exec(this[0].id,"getcharttype",t):zingchart.exec(this[0].id,"getcharttype")},t.fn.getData=function(){return zingchart.exec(this[0].id,"getdata")},t.fn.getEditMode=function(){return zingchart.exec(this[0].id,"geteditmode")},t.fn.getGraphLength=function(){return zingchart.exec(this[0].id,"getgraphlength")},t.fn.getNodeLength=function(t){return t?zingchart.exec(this[0].id,"getnodelength",t):zingchart.exec(this[0].id,"getnodelength")},t.fn.getNodeValue=function(t){return zingchart.exec(this[0].id,"getnodevalue",t)},t.fn.getObjectInfo=function(t){return zingchart.exec(this[0].id,"getobjectinfo",t)},t.fn.getPlotLength=function(t){return t?zingchart.exec(this[0].id,"getplotlength",t):zingchart.exec(this[0].id,"getplotlength")},t.fn.getPlotValues=function(t){return zingchart.exec(this[0].id,"getplotvalues",t)},t.fn.getRender=function(){return zingchart.exec(this[0].id,"getrender")},t.fn.getRules=function(t){return zingchart.exec(this[0].id,"getrules",t)},t.fn.getScales=function(t){return zingchart.exec(this[0].id,"getscales",t)},t.fn.getVersion=function(){return zingchart.exec(this[0].id,"getversion")},t.fn.getXYInfo=function(t){return zingchart.exec(this[0].id,"getxyinfo",t)},t.fn.addScaleValue=function(t){return zingchart.exec(this[0].id,"addscalevalue",{dataurl:t}),this},t.fn.destroy=function(t){return t?t.hasOwnProperty(""):zingchart.exec(this[0].id,"destroy"),this},t.fn.loadNewData=function(t){return zingchart.exec(this[0].id,"load",t),this},t.fn.modify=function(t){return zingchart.exec(this[0].id,"modify",t),this},t.fn.reloadChart=function(t){return t?zingchart.exec(this[0].id,"reload",t):zingchart.exec(this[0].id,"reload"),this},t.fn.removeScaleValue=function(t){return zingchart.exec(this[0].id,"removescalevalue",t),this},t.fn.resizeChart=function(t){return zingchart.exec(this[0].id,"resize",t),this},t.fn.setData=function(t){return zingchart.exec(this[0].id,"setdata",t),this},t.fn.update=function(t){return zingchart.exec(this[0].id,"update"),this},t.fn.goBack=function(){return zingchart.exec(this[0].id,"goback"),this},t.fn.goForward=function(){return zingchart.exec(this[0].id,"goforward"),this},t.fn.addNodeIA=function(t){return t?zingchart.exec(this[0].id,"addnodeia",t):zingchart.exec(this[0].id,"addnodeia"),this},t.fn.enterEditMode=function(t){return t?zingchart.exec(this[0].id,"entereditmode",t):zingchart.exec(this[0].id,"entereditmode"),this},t.fn.exitEditMode=function(t){return t?zingchart.exec(this[0].id,"exiteditmode",t):zingchart.exec(this[0].id,"exiteditmode"),this},t.fn.removeNodeIA=function(t){return t?zingchart.exec(this[0].id,"removenodeia",t):zingchart.exec(this[0].id,"removenodeia"),this},t.fn.removePlotIA=function(t){return t?zingchart.exec(this[0].id,"removeplotia",t):zingchart.exec(this[0].id,"removeplotia"),this},t.fn.addNote=function(t){return zingchart.exec(this[0].id,"addnote",t),this},t.fn.removeNote=function(t){return zingchart.exec(this[0].id,"removenote",{id:t}),this},t.fn.updateNote=function(t){return zingchart.exec(this[0].id,"updatenote",t),this},t.fn.addObject=function(t){return zingchart.exec(this[0].id,"addobject",t),this},t.fn.removeObject=function(t){return zingchart.exec(this[0].id,"removeobject",t),this},t.fn.repaintObjects=function(t){return t?zingchart.exec(this[0].id,"repaintobjects",t):zingchart.exec(this[0].id,"repaintobjects",{}),this},t.fn.updateObject=function(t){return zingchart.exec(this[0].id,"updateobject",t),this},t.fn.addLabel=function(t){return zingchart.exec(this[0].id,"addobject",{type:"label",data:t}),this},t.fn.removeLabel=function(t){return zingchart.exec(this[0].id,"removeobject",{type:"label",id:t}),this},t.fn.updateLabel=function(t){return zingchart.exec(this[0].id,"updateobject",{type:"label",data:t}),this},t.fn.addRule=function(t){return zingchart.exec(this[0].id,"addrule",t),this},t.fn.removeRule=function(t){return zingchart.exec(this[0].id,"removerule",t),this},t.fn.updateRule=function(t){return zingchart.exec(this[0].id,"updaterule",t),this},t.fn.clearSelection=function(t){return t?zingchart.exec(this[0].id,"clearselection",t):zingchart.exec(this[0].id,"clearselection"),this},t.fn.chartDeselect=function(t){return zingchart.exec(this[0].id,"deselect",t),this},t.fn.getSelection=function(t){return t?zingchart.exec(this[0].id,"getselection",t):zingchart.exec(this[0].id,"getselection"),this},t.fn.chartSelect=function(t){return zingchart.exec(this[0].id,"select",t),this},t.fn.setSelection=function(t){return zingchart.exec(this[0].id,"setselection",t),this},t.fn.disableChart=function(t){return t?zingchart.exec(this[0].id,"disable",{text:t}):zingchart.exec(this[0].id,"disable"),this},t.fn.enableChart=function(){return zingchart.exec(this[0].id,"enable"),this},t.fn.exitFullscreen=function(){return zingchart.exec(this[0].id,"exitfullscreen"),this},t.fn.fullscreen=function(){return zingchart.exec(this[0].id,"fullscreen"),this},t.fn.hideMenu=function(){return zingchart.exec(this[0].id,"hidemenu"),this},t.fn.hidePlot=function(t){return zingchart.exec(this[0].id,"hideplot",t),this},t.fn.hideAllPlots=function(t){var e=this[0].id,n=t&&t.hasOwnProperty("graphid")?zingchart.exec(e,"getplotlength",t):zingchart.exec(e,"getplotlength");if(t&&t.hasOwnProperty("graphid"))for(var i=0;n>i;i++)zingchart.exec(e,"hideplot",{graphid:t.graphid,plotindex:i});else for(var i=0;n>i;i++)zingchart.exec(e,"hideplot",{plotindex:i});return this},t.fn.hideAllPlotsBut=function(t){var e=this[0].id,n=t&&t.hasOwnProperty("graphid")?zingchart.exec(e,"getplotlength",t):zingchart.exec(e,"getplotlength");if(t&&t.hasOwnProperty("graphid")&&t.hasOwnProperty("plotindex"))for(var i=0;n>i;i++)i!=t.plotindex&&zingchart.exec(e,"hideplot",{graphid:t.graphid,plotindex:i});else for(var i=0;n>i;i++)i!=t.plotindex&&zingchart.exec(e,"hideplot",{plotindex:i});return this},t.fn.modifyAllPlotsBut=function(t,e){var n=this[0].id,i=t&&t.hasOwnProperty("graphid")?zingchart.exec(n,"getplotlength",t):zingchart.exec(n,"getplotlength");if(t&&t.hasOwnProperty("graphid")&&t.hasOwnProperty("plotindex"))for(var r=0;i>r;r++)r!=t.plotindex&&zingchart.exec(n,"modifyplot",{graphid:t.graphid,plotindex:r,data:e});else for(var r=0;i>r;r++)r!=t.plotindex&&zingchart.exec(n,"modifyplot",{plotindex:r,data:e});return this},t.fn.modifyAllPlots=function(t,e){for(var n=this[0].id,i=e?zingchart.exec(n,"getplotlength",e):zingchart.exec(n,"getplotlength"),r=0;i>r;r++)e&&e.graphid?zingchart.exec(n,"modifyplot",{graphid:e.graphid,plotindex:r,data:t}):zingchart.exec(n,"modifyplot",{plotindex:r,data:t});return this},t.fn.showAllPlots=function(t){var e=this[0].id,n=t&&t.hasOwnProperty("graphid")?zingchart.exec(e,"getplotlength",t):zingchart.exec(e,"getplotlength");if(t&&t.hasOwnProperty("graphid"))for(var i=0;n>i;i++)zingchart.exec(e,"showplot",{graphid:t.graphid,plotindex:i});else for(var i=0;n>i;i++)zingchart.exec(e,"showplot",{plotindex:i});return this},t.fn.showAllPlotsBut=function(t){var e=this[0].id,n=t&&t.hasOwnProperty("graphid")?zingchart.exec(e,"getplotlength",t):zingchart.exec(e,"getplotlength");if(t&&t.hasOwnProperty("graphid")&&t.hasOwnProperty("plotindex"))for(var i=0;n>i;i++)i!=t.plotindex&&zingchart.exec(e,"showplot",{graphid:t.graphid,plotindex:i});else for(var i=0;n>i;i++)i!=t.plotindex&&zingchart.exec(e,"showplot",{plotindex:i});return this},t.fn.legendMaximize=function(t){return t?zingchart.exec(this[0].id,"legendmaximize",t):zingchart.exec(this[0].id,"legendmaximize"),this},t.fn.legendMinimize=function(t){return t?zingchart.exec(this[0].id,"legendminimize",t):zingchart.exec(this[0].id,"legendminimize"),this},t.fn.showMenu=function(){return zingchart.exec(this[0].id,"showmenu"),this},t.fn.showPlot=function(t){return zingchart.exec(this[0].id,"showplot",t),this},t.fn.toggleAbout=function(){return zingchart.exec(this[0].id,"toggleabout"),this},t.fn.toggleBugReport=function(){return zingchart.exec(this[0].id,"togglebugreport"),this},t.fn.toggleDimension=function(){return zingchart.exec(this[0].id,"toggledimension"),this},t.fn.toggleLegend=function(){return zingchart.exec(this[0].id,"togglelegend"),this},t.fn.toggleSource=function(){return zingchart.exec(this[0].id,"togglesource"),this},t.fn.viewAll=function(){return zingchart.exec(this[0].id,"viewall"),this},t.fn.zoomIn=function(t){return t?zingchart.exec(this[0].id,"zoomin",t):zingchart.exec(this[0].id,"zoomin"),this},t.fn.zoomOut=function(t){return t?zingchart.exec(this[0].id,"zoomout",t):zingchart.exec(this[0].id,"zoomout"),this},t.fn.zoomTo=function(t){return zingchart.exec(this[0].id,"zoomto",t),this},t.fn.zoomToValues=function(t){return zingchart.exec(this[0].id,"zoomtovalues",t),this},t.fn.animationEnd=function(e){var n=this;return zingchart.bind(this[0].id,"animation_end",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.animationStart=function(e){var n=this;return zingchart.bind(this[0].id,"animation_start",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.animationStep=function(e){var n=this;return zingchart.bind(this[0].id,"animation_step",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.chartModify=function(e){var n=this;return zingchart.bind(this[0].id,"modify",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.nodeAdd=function(e){var n=this;return zingchart.bind(this[0].id,"node_add",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.nodeRemove=function(e){var n=this;return zingchart.bind(this[0].id,"node_remove",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.plotAdd=function(e){var n=this;return zingchart.bind(this[0].id,"plot_add",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.plotModify=function(e){var n=this;return zingchart.bind(this[0].id,"plot_modify",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.plotRemove=function(e){var n=this;return zingchart.bind(this[0].id,"plot_remove",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.chartReload=function(e){var n=this;return zingchart.bind(this[0].id,"reload",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.dataSet=function(e){var n=this;return zingchart.bind(this[0].id,"setdata",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.dataExport=function(e){var n=this;return zingchart.bind(this[0].id,"data_export",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.imageSave=function(e){var n=this;return zingchart.bind(this[0].id,"image_save",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.chartPrint=function(e){var n=this;return zingchart.bind(this[0].id,"print",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.feedClear=function(e){var n=this;return zingchart.bind(this[0].id,"feed_clear",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.feedIntervalModify=function(e){var n=this;return zingchart.bind(this[0].id,"feed_interval_modify",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.feedStart=function(e){var n=this;return zingchart.bind(this[0].id,"feed_start",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.feedStop=function(e){var n=this;return zingchart.bind(this[0].id,"feed_stop",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.graphClick=function(e){var n=this;return zingchart.bind(this[0].id,"click",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.graphComplete=function(e){var n=this;return zingchart.bind(this[0].id,"complete",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.graphDataParse=function(e){var n=this;return zingchart.bind(this[0].id,"dataparse",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.graphDataReady=function(e){var n=this;return zingchart.bind(this[0].id,"dataready",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.graphGuideMouseMove=function(e){var n=this;return zingchart.bind(this[0].id,"guide_mousemove",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.graphLoad=function(e){var n=this;return zingchart.bind(this[0].id,"load",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.graphMenuItemClick=function(e){var n=this;return zingchart.bind(this[0].id,"menu_item_click",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.graphResize=function(e){var n=this;return zingchart.bind(this[0].id,"resize",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.historyForward=function(e){var n=this;return zingchart.bind(this[0].id,"history_forward",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.historyBack=function(e){var n=this;return zingchart.bind(this[0].id,"history_back",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.nodeSelect=function(e){var n=this;return zingchart.bind(this[0].id,"node_select",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.nodeDeselect=function(e){var n=this;return zingchart.bind(this[0].id,"node_deselect",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.plotSelect=function(e){var n=this;return zingchart.bind(this[0].id,"plot_select",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.plotDeselect=function(e){var n=this;return zingchart.bind(this[0].id,"plot_deselect",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.legendItemClick=function(e){var n=this;return zingchart.bind(this[0].id,"legend_item_click",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.legendMarkerClick=function(e){var n=this;return zingchart.bind(this[0].id,"legend_marker_click",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.nodeClick=function(e){var n=this;return zingchart.bind(this[0].id,"node_click",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.nodeDoubleClick=function(e){var n=this;return zingchart.bind(this[0].id,"node_doubleclick",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.nodeMouseOver=function(e){var n=this,i=!1;return zingchart.bind(this[0].id,"node_mouseover",function(r){i||(t.extend(n,{event:r}),i=!0,e.call(n))}),zingchart.bind(n[0].id,"node_mouseout",function(){i=!1}),this},t.fn.nodeMouseOut=function(e){var n=this;return zingchart.bind(this[0].id,"node_mouseout",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.nodeHover=function(e,n){var i=this,r=!1;return zingchart.bind(this[0].id,"node_mouseover",function(n){r||(t.extend(i,{event:n}),r=!0,e.call(i))}),zingchart.bind(i[0].id,"node_mouseout",function(){r=!1,n.call(i)}),this},t.fn.labelClick=function(e){var n=this;return zingchart.bind(this[0].id,"label_click",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.labelMouseOver=function(e){var n=this,i=!1;return zingchart.bind(this[0].id,"label_mouseover",function(r){i||(t.extend(n,{event:r}),i=!0,e.call(n))}),zingchart.bind(n[0].id,"label_mouseout",function(){i=!1}),this},t.fn.labelMouseOut=function(e){var n=this;return zingchart.bind(this[0].id,"label_mouseout",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.labelHover=function(e,n){return t(this).labelMouseOver(e).labelMouseOut(n),this},t.fn.shapeClick=function(e){var n=this;return zingchart.bind(this[0].id,"shape_click",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.shapeMouseOver=function(e){var n=this,i=!1;return zingchart.bind(this[0].id,"shape_mouseover",function(r){i||(t.extend(n,{event:r}),i=!0,e.call(n))}),zingchart.bind(n[0].id,"shape_mouseout",function(){i=!1}),this},t.fn.shapeMouseOut=function(e){var n=this;return zingchart.bind(this[0].id,"shape_mouseout",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.shapeHover=function(e,n){return t(this).shapeMouseOver(e).shapeMouseOut(n),this},t.fn.plotClick=function(e){var n=this;return zingchart.bind(this[0].id,"plot_click",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.plotDoubleClick=function(e){var n=this;return zingchart.bind(this[0].id,"plot_doubleclick",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.plotMouseOver=function(e){var n=this,i=!1;return zingchart.bind(this[0].id,"plot_mouseover",function(r){i||(t.extend(n,{event:r}),i=!0,e.call(n))}),zingchart.bind(n[0].id,"plot_mouseout",function(){i=!1}),this},t.fn.plotMouseOut=function(e){var n=this;return zingchart.bind(this[0].id,"plot_mouseout",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.plotHover=function(e,n){return t(this).plotMouseOver(e).plotMouseOut(n),this},t.fn.plotShow=function(e){var n=this;return zingchart.bind(this[0].id,"plot_show",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.plotHide=function(e){var n=this;return zingchart.bind(this[0].id,"plot_hide",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.aboutShow=function(e){var n=this;return zingchart.bind(this[0].id,"about_show",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.aboutHide=function(e){var n=this;return zingchart.bind(this[0].id,"about_hide",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.bugReportShow=function(e){var n=this;return zingchart.bind(this[0].id,"bugreport_show",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.bugReportHide=function(e){var n=this;return zingchart.bind(this[0].id,"bugreport_hide",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.dimensionChange=function(e){var n=this;return zingchart.bind(this[0].id,"dimension_change",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.sourceShow=function(e){var n=this;return zingchart.bind(this[0].id,"source_show",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.sourceHide=function(e){var n=this;return zingchart.bind(this[0].id,"source_hide",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.legendShow=function(e){var n=this;return zingchart.bind(this[0].id,"legend_show",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.legendHide=function(e){var n=this;return zingchart.bind(this[0].id,"legend_hide",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.legendMaximize=function(e){var n=this;return zingchart.bind(this[0].id,"legend_maximize",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.legendMinimize=function(e){var n=this;return zingchart.bind(this[0].id,"legend_minimize",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.zoomEvent=function(e){var n=this;return zingchart.bind(this[0].id,"zoom",function(i){t.extend(n,{event:i}),e.call(n)}),this},t.fn.setTitle=function(t){return"object"==typeof t?zingchart.exec(this[0].id,"modify",{data:{title:t}}):zingchart.exec(this[0].id,"modify",{data:{title:{text:t}}}),this},t.fn.setSubtitle=function(t){return"object"==typeof t?zingchart.exec(this[0].id,"modify",{data:{subtitle:t}}):zingchart.exec(this[0].id,"modify",{data:{subtitle:{text:t}}}),this},t.fn.setType=function(t){return zingchart.exec(this[0].id,"modify",{data:{type:t}}),zingchart.exec(this[0].id,"update"),this},t.fn.drawTrendline=function(e){function n(n){for(var i=t(this).getSeriesValues({plotindex:n}),r=0,c=0,h=0,a=0,o=0,d=t(this).getObjectInfo({object:"scale",name:"scale-x"}),s=d.values,u=0;u<i.length;u++)i[u]&&void 0!=i[u][1]&&"number"==typeof i[u][1]?(r+=i[u][0]*i[u][1],c+=i[u][0],h+=i[u][1],a+=i[u][0]*i[u][0],o++):(r+=i[u]*s[u],c+=s[u],h+=i[u],a+=Math.pow(s[u],2),o++);var f=(o*r-c*h)/(o*a-c*c),l=(h-f*c)/o,d=t(this).getObjectInfo({object:"scale",name:"scale-x"}),s=d.values,g=s[0],x=s[s.length-1],z=[l+f*g,l+f*x],v={type:"line",lineColor:"#c00",lineWidth:2,alpha:.75,lineStyle:"dashed",label:{text:""}};e&&t.extend(v,e),v.range=z;var p=t(this).getObjectInfo({object:"scale",name:"scale-y"}),b=p.markers;b?b.push(v):b=[v],t(this).modify({data:{"scale-y":{markers:b}}})}this[0].id;return n.call(this,0),this}}(jQuery);