ni-webcharts
Advanced tools
Comparing version 0.1.5 to 0.1.6
@@ -9,6 +9,6 @@ !function(){"use strict";NationalInstruments.HtmlVI.DataPipeline={},NationalInstruments.HtmlVI.DataPipeline.decimateAW=function(t,n,a,e){var i=(n-t.start)/t.step,o=(a-t.start)/t.step;return NationalInstruments.HtmlVI.DataPipeline.decimate1D(t,i,o,e)},NationalInstruments.HtmlVI.DataPipeline.decimate1D=function(t,n,a,e){var i,o=0,l=0,r=0,s=e/(a-n),m=t.datapoints.points,u=[],f=!0,c=-(1/0),h=-1,p=1/0,I=-1,M=Math.min(Math.max(0,Math.floor(n)),m.length/2),D=a>0?Math.min(m.length/2,Math.floor(a+2)):0,d=function(){I===h?(u[l]=I,u[l+1]=p,l+=2):(I<h?(u[l]=I,u[l+1]=p,u[l+2]=h,u[l+3]=c):(u[l]=h,u[l+1]=c,u[l+2]=I,u[l+3]=p),l+=4)},H=function(){c=-(1/0),h=-1,p=1/0,I=-1};for(r=D-M,e>r&&(s=1),i=2*M;i<2*D;i+=2)f&&(H(),f=!1),m[i+1]<p&&(I=m[i],p=m[i+1]),m[i+1]>c&&(h=m[i],c=m[i+1]),Math.floor(o)!==Math.floor(o+s)&&(d(),f=!0),o+=s;return f||d(),u}}(); | ||
NationalInstruments.HtmlVI.Elements.CartesianAxis=function(){"use strict"},function(t,e){"use strict";var a=NationalInstruments.HtmlVI.NISupport;a.inheritFromParent(t,e);var i=t.prototype,n=window.NINumericFormatters,r=function(t){var e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`"};return String(t).replace(/[&<>"'`\/]/g,function(t){return e[t]})},o=function(t){return 0===t.indexOf("LVTime")||0===t.indexOf("LVRelativeTime")},s=function(t){return 0===t.indexOf("LVTime")?"%A":0===t.indexOf("LVRelativeTime")?"%r":null},l=function(){return""},p=function(t,e){return n.prototype.toSiNotation(t,e.tickDecimals)},d=function(t,e,a){var i=Math.pow(10,a),n=e*i;return n=t(n),n/i},u=function(t){return t.indexOf("G")===-1&&t.indexOf("N")===-1?null:function(e){var a=parseInt(t.slice(1)),i=e;return 0===t.indexOf("G")?n.prototype.toDecPrecisionNotation(i,a):(i=d(Math.floor,e,a),n.prototype.toDecFixedNotation(i,a))}},h=function(t,e){if(!e)return l;if(0===t.indexOf("LVSI"))return p;if(0===t.indexOf("LVRelativeSeconds")){var a=18,i=t.slice(a);return u(i)}return null};i.addAllProperties=function(t){e.prototype.addAllProperties.call(this,t),i.addProperty(t,{propertyName:"show",defaultValue:!1}),i.addProperty(t,{propertyName:"label",defaultValue:""}),i.addProperty(t,{propertyName:"axisPosition",defaultValue:"left"}),i.addProperty(t,{propertyName:"showLabel",defaultValue:!1}),i.addProperty(t,{propertyName:"minimum",defaultValue:0}),i.addProperty(t,{propertyName:"maximum",defaultValue:1}),i.addProperty(t,{propertyName:"autoScale",defaultValue:!1}),i.addProperty(t,{propertyName:"logScale",defaultValue:!1}),i.addProperty(t,{propertyName:"format",defaultValue:""}),i.addProperty(t,{propertyName:"showTickLabels",defaultValue:!1}),i.addProperty(t,{propertyName:"gridLines",defaultValue:!1}),i.addProperty(t,{propertyName:"showTicks",defaultValue:!1}),i.addProperty(t,{propertyName:"showMinorTicks",defaultValue:!1})},i.createdCallback=function(){e.prototype.createdCallback.call(this),this._parentGraph=void 0},i.sendEventToParentGraph=function(t){var e;void 0!==this._parentGraph&&(e={bubbles:!0,cancelable:!0,detail:{element:this}},this._parentGraph.dispatchEvent(new CustomEvent(t,e)))},i.attachedCallback=function(){var t=e.prototype.attachedCallback.call(this);return this.parentElement instanceof NationalInstruments.HtmlVI.Elements.CartesianGraphBase?(this._parentGraph=this.parentElement,this.sendEventToParentGraph("ni-cartesian-axis-attached")):(a.error("Axis with following id does not have a parentGraph",this.niControlId),this._parentGraph=void 0),t},i.propertyUpdated=function(t){e.prototype.propertyUpdated.call(this,t),this.sendEventToParentGraph("ni-axis-changed")},i.detachedCallback=function(){e.prototype.detachedCallback.call(this),this.sendEventToParentGraph("ni-cartesian-axis-detached"),this._parentGraph=void 0},i.setFont=function(t,a,i,n,r){e.prototype.setFont.call(this,t,a,i,n,r),this.sendEventToParentGraph("ni-axis-changed")},i.getViewConfig=function(){var t=window.getComputedStyle(this),e={axisLabel:this.showLabel?r(this.label):void 0,show:this.show,position:this.axisPosition,min:this.autoScale?void 0:this.minimum,max:this.autoScale?void 0:this.maximum,mode:this.logScale?"log":"linear",element:this,format:o(this.format)?"time":null,timeformat:s(this.format),tickFormatter:h(this.format,this.showTickLabels),gridLines:this.gridLines,showTicks:this.showTicks,showMinorTicks:this.showMinorTicks,font:{size:parseFloat(t.fontSize),style:t.fontStyle,weight:t.fontWeight,family:t.fontFamily,color:"inherit"}};return e},i.getFlotAxis=function(){var t=this._parentGraph.graph,e=t.getAxes(),a=this,i=Object.keys(e).filter(function(t){return e[t].options.element===a})[0];return e[i]},i.scaleOnce=function(){var t=this.getFlotAxis();this.minimum="number"==typeof t.datamin?t.datamin:this.minimum,this.maximum="number"==typeof t.datamax?t.datamax:this.maximum},i.syncWithFlot=function(){var t=this.getFlotAxis();"number"==typeof t.options.min?(this._autoScale=!1,this._minimum=t.options.min,this._maximum=t.options.max):this._autoScale=!0,void 0!==this._parentGraph&&this._parentGraph.notifyScaleLegend("ni-axis-changed",this)},i.defineElementInfo(i,"ni-cartesian-axis","HTMLNICartesianAxis")}(NationalInstruments.HtmlVI.Elements.CartesianAxis,NationalInstruments.HtmlVI.Elements.Visual); | ||
NationalInstruments.HtmlVI.Elements.ColorScale=function(){"use strict"},function(t,e){"use strict";var a=NationalInstruments.HtmlVI.NISupport,r=NationalInstruments.HtmlVI.Elements.IntensityGraph.ScaleTypeEnum;a.inheritFromParent(t,e);var o=t.prototype;o.addAllProperties=function(t){e.prototype.addAllProperties.call(this,t),o.addProperty(t,{propertyName:"label",defaultValue:""}),o.addProperty(t,{propertyName:"show",defaultValue:!1}),o.addProperty(t,{propertyName:"showLabel",defaultValue:!1}),o.addProperty(t,{propertyName:"axisPosition",defaultValue:"right"}),o.addProperty(t,{propertyName:"highColor",defaultValue:"#ffffff"}),o.addProperty(t,{propertyName:"lowColor",defaultValue:"#000000"}),o.addProperty(t,{propertyName:"markers",defaultValue:""}),o.addProperty(t,{propertyName:"autoScale",defaultValue:!1}),o.addProperty(t,{propertyName:"minimum",defaultValue:0}),o.addProperty(t,{propertyName:"maximum",defaultValue:1})},o.createdCallback=function(){e.prototype.createdCallback.call(this),this._parentGraph=void 0},o.sendEventToParentGraph=function(t){var e;void 0!==this._parentGraph&&(e={bubbles:!0,cancelable:!0,detail:{element:this}},this._parentGraph.dispatchEvent(new CustomEvent(t,e)))},o.attachedCallback=function(){var t=e.prototype.attachedCallback.call(this);return this.parentElement instanceof NationalInstruments.HtmlVI.Elements.IntensityGraph?(this._parentGraph=this.parentElement,this.sendEventToParentGraph("ni-cartesian-axis-attached")):(a.error("Color scale with following id does not have an intensity-graph parent",this.niControlId),this._parentGraph=void 0),t},o.propertyUpdated=function(t){e.prototype.propertyUpdated.call(this,t),this.sendEventToParentGraph("ni-axis-changed")},o.detachedCallback=function(){e.prototype.detachedCallback.call(this),this.sendEventToParentGraph("ni-cartesian-axis-detached"),this._parentGraph=void 0},o.setFont=function(t,a,r,o,n){e.prototype.setFont.call(this,t,a,r,o,n),this.sendEventToParentGraph("ni-axis-changed")},o.getViewConfig=function(){var t=window.getComputedStyle(this),e={type:r.COLORSCALE,axisLabel:this.showLabel?this.label:void 0,show:this.show,autoScale:this.autoScale,min:this.minimum,max:this.maximum,position:this.axisPosition,lowColor:this.lowColor,highColor:this.highColor,markers:this.markers,font:{size:parseFloat(t.fontSize),style:t.fontStyle,weight:t.fontWeight,family:t.fontFamily,color:"inherit"}};return e},o.getFlotAxis=function(){if(this._parentGraph){var t=this._parentGraph.graph.getYAxes().filter(function(t){return t.options.type===r.COLORSCALE})[0];return t}},o.defineElementInfo(o,"ni-color-scale","HTMLNIColorScale")}(NationalInstruments.HtmlVI.Elements.ColorScale,NationalInstruments.HtmlVI.Elements.Visual); | ||
NationalInstruments.HtmlVI.Elements.CartesianPlot=function(){"use strict"},function(e,t){"use strict";var a=NationalInstruments.HtmlVI.NISupport;a.inheritFromParent(e,t);var n=e.prototype,r={lines:{show:!1}};n.addAllProperties=function(e){t.prototype.addAllProperties.call(this,e),n.addProperty(e,{propertyName:"show",defaultValue:!1}),n.addProperty(e,{propertyName:"label",defaultValue:""}),n.addProperty(e,{propertyName:"xaxis",defaultValue:""}),n.addProperty(e,{propertyName:"yaxis",defaultValue:""}),n.addProperty(e,{propertyName:"enableHover",defaultValue:!1}),n.addProperty(e,{propertyName:"hoverFormat",defaultValue:""})},n.createdCallback=function(){t.prototype.createdCallback.call(this),this._parentGraph=void 0},n.sendEventToParentGraph=function(e,t){var a;void 0!==this._parentGraph&&(a={bubbles:!1,cancelable:!0,detail:{element:this,originalSource:t}},this._parentGraph.dispatchEvent(new CustomEvent(e,a)))},n.attachedCallback=function(){var e=t.prototype.attachedCallback.call(this);return this.parentElement instanceof NationalInstruments.HtmlVI.Elements.CartesianGraph||this.parentElement instanceof NationalInstruments.HtmlVI.Elements.Chart?(this._parentGraph=this.parentElement,this.addPlotItemListeners(),this.sendEventToParentGraph("ni-cartesian-plot-attached")):(a.error("Plot with following id does not have a parentGraph",this.niControlId),this._parentGraph=void 0),e},n.addPlotItemListeners=function(){var e=this;e.addEventListener("ni-cartesian-plot-renderer-attached",function(t){t.target===e&&(this.plotRenderer=t.detail.element,this.sendEventToParentGraph("ni-cartesian-plot-renderer-attached",t.detail.element))}),e.addEventListener("ni-cartesian-plot-renderer-detached",function(t){t.target===e&&(this.plotRenderer=void 0,this.sendEventToParentGraph("ni-cartesian-plot-renderer-detached",t.detail.element))}),e.addEventListener("ni-cartesian-plot-renderer-changed",function(t){t.target===e&&this.sendEventToParentGraph("ni-cartesian-plot-renderer-changed",t.detail.element)})},n.detachedCallback=function(){t.prototype.detachedCallback.call(this),this.sendEventToParentGraph("ni-cartesian-plot-detached"),this._parentGraph=void 0},n.propertyUpdated=function(e){t.prototype.propertyUpdated.call(this,e),this.sendEventToParentGraph("ni-cartesian-plot-changed")},n.getViewConfig=function(){var e=r;return void 0!==this.plotRenderer&&this.show===!0&&(e=this.plotRenderer.getViewConfig(),e.hoverable=this.enableHover),e},n.defineElementInfo(n,"ni-cartesian-plot","HTMLNICartesianPlot")}(NationalInstruments.HtmlVI.Elements.CartesianPlot,NationalInstruments.HtmlVI.Elements.Visual); | ||
NationalInstruments.HtmlVI.Elements.CartesianPlotRenderer=function(){"use strict"},function(t,e){"use strict";var a=NationalInstruments.HtmlVI.NISupport;a.inheritFromParent(t,e);var i=t.prototype;i.addAllProperties=function(t){e.prototype.addAllProperties.call(this,t),i.addProperty(t,{propertyName:"lineStroke",defaultValue:"#ff0000"}),i.addProperty(t,{propertyName:"lineWidth",defaultValue:1}),i.addProperty(t,{propertyName:"lineStyle",defaultValue:"solid"}),i.addProperty(t,{propertyName:"areaFill",defaultValue:""}),i.addProperty(t,{propertyName:"areaBaseLine",defaultValue:"zero"}),i.addProperty(t,{propertyName:"barFill",defaultValue:""}),i.addProperty(t,{propertyName:"pointColor",defaultValue:""}),i.addProperty(t,{propertyName:"pointSize",defaultValue:5}),i.addProperty(t,{propertyName:"pointShape",defaultValue:"ellipse"})},i.createdCallback=function(){e.prototype.createdCallback.call(this),this._parentPlot=void 0},i.sendEventToParentPlot=function(t){var e;void 0!==this._parentPlot&&(e={bubbles:!1,cancelable:!0,detail:{element:this}},this._parentPlot.dispatchEvent(new CustomEvent(t,e)))},i.attachedCallback=function(){var t=e.prototype.attachedCallback.call(this);return this.parentElement instanceof NationalInstruments.HtmlVI.Elements.CartesianPlot?(this._parentPlot=this.parentElement,this.sendEventToParentPlot("ni-cartesian-plot-renderer-attached")):(a.error("Plot renderer with following id does not have a parentPlot",this.niControlId),this._parentPlot=void 0),t},i.propertyUpdated=function(t){e.prototype.propertyUpdated.call(this,t),this.sendEventToParentPlot("ni-cartesian-plot-renderer-changed")},i.detachedCallback=function(){e.prototype.detachedCallback.call(this),this.sendEventToParentPlot("ni-cartesian-plot-renderer-detached")},i.toFlotLineStyle=function(t){switch(t){case"solid":return;case"dot":return[this.lineWidth,2*this.lineWidth];case"mediumdash":return[3*this.lineWidth,2*this.lineWidth];case"dashdot":return[3*this.lineWidth,2*this.lineWidth,this.lineWidth,2*this.lineWidth];case"largedash":return[5*this.lineWidth,3*this.lineWidth];default:return}};var r=.6;i.getViewConfig=function(){return{color:this.lineStroke||this.pointColor||this.areaFill||this.barFill,lines:{show:""!==this.lineStroke||""!==this.areaFill,lineWidth:this.lineWidth,fill:""!==this.areaFill&&r,zero:!1,dashes:this.toFlotLineStyle(this.lineStyle)},points:{show:""!==this.pointColor,radius:this.pointSize?this.pointSize/2:2,symbol:this.pointShape},bars:{show:""!==this.barFill,barWidth:.75,align:"center",zero:!1}}},i.defineElementInfo(i,"ni-cartesian-plot-renderer","HTMLNICartesianPlotRenderer")}(NationalInstruments.HtmlVI.Elements.CartesianPlotRenderer,NationalInstruments.HtmlVI.Elements.Visual); | ||
NationalInstruments.HtmlVI.Elements.Cursor=function(){"use strict"},function(t,e){"use strict";var a=NationalInstruments.Globals.jQuery,r=NationalInstruments.HtmlVI.NISupport;r.inheritFromParent(t,e);var o=t.prototype;o.addAllProperties=function(t){e.prototype.addAllProperties.call(this,t),o.addProperty(t,{propertyName:"label",defaultValue:""}),o.addProperty(t,{propertyName:"targetShape",defaultValue:"ellipse"}),o.addProperty(t,{propertyName:"cursorColor",defaultValue:"#000000"}),o.addProperty(t,{propertyName:"crosshairStyle",defaultValue:"both"}),o.addProperty(t,{propertyName:"show",defaultValue:!1}),o.addProperty(t,{propertyName:"showLabel",defaultValue:!1}),o.addProperty(t,{propertyName:"showValue",defaultValue:!1}),o.addProperty(t,{propertyName:"snapToData",defaultValue:!1}),o.addProperty(t,{propertyName:"x",defaultValue:.5}),o.addProperty(t,{propertyName:"y",defaultValue:.5}),o.addProperty(t,{propertyName:"fontFamily",defaultValue:"sans-serif"}),o.addProperty(t,{propertyName:"fontSize",defaultValue:"10px"}),o.addProperty(t,{propertyName:"fontStyle",defaultValue:""}),o.addProperty(t,{propertyName:"fontWeight",defaultValue:""})},o.createdCallback=function(){e.prototype.createdCallback.call(this),this.cursor=null,this._parentGraph=void 0},o.sendEventToParentGraph=function(t){var e;void 0!==this._parentGraph&&(e={bubbles:!0,cancelable:!0,detail:{element:this}},this._parentGraph.dispatchEvent(new CustomEvent(t,e)))},o.attachedCallback=function(){var t=e.prototype.attachedCallback.call(this);return this.parentElement instanceof NationalInstruments.HtmlVI.Elements.CartesianGraph||this.parentElement instanceof NationalInstruments.HtmlVI.Elements.Chart?(this._parentGraph=this.parentElement,this.sendEventToParentGraph("ni-cursor-attached")):(r.error("Cursor with the following id does not have a parentGraph",this.niControlId),this._parentGraph=void 0),t},o.propertyUpdated=function(t){e.prototype.propertyUpdated.call(this,t),this.sendEventToParentGraph("ni-cursor-changed")},o.detachedCallback=function(){e.prototype.detachedCallback.call(this),this.sendEventToParentGraph("ni-cursor-detached"),this._parentGraph=void 0},o.setCursor=function(t){this.cursor=t},o.updateCursorElement=function(t){this._x=this.cursor.position.relativeX,this._y=this.cursor.position.relativeY,a(this).trigger("cursorUpdated",t)},o.getViewConfig=function(){var t,e=window.getComputedStyle(this),a=this.crosshairStyle;return t="both"===a?"xy":"horizontal"===a?"y":"vertical"===a?"x":"none"===a?"":null,{show:this.show,showLabel:this.showLabel,showValuesRelativeToSeries:this.showValue?0:void 0,name:this.label,color:this.cursorColor,snapToPlot:this.snapToData?0:void 0,mode:t,symbol:this.targetShape,fontSize:e.fontSize,fontFamily:e.fontFamily,fontStyle:e.fontStyle,fontWeight:e.fontWeight,position:{relativeX:this.x,relativeY:this.y}}},o.setFont=function(t,a,r,o,n){e.prototype.setFont.call(this,t,a,r,o,n),this.sendEventToParentGraph("ni-cursor-changed")},o.defineElementInfo(o,"ni-cursor","HTMLNICursor")}(NationalInstruments.HtmlVI.Elements.Cursor,NationalInstruments.HtmlVI.Elements.Visual); | ||
NationalInstruments.HtmlVI.Elements.ColorScale=function(){"use strict"},function(t,e){"use strict";var a=NationalInstruments.HtmlVI.NISupport,r=NationalInstruments.HtmlVI.Elements.IntensityGraph.ScaleTypeEnum;a.inheritFromParent(t,e);var o=t.prototype;o.addAllProperties=function(t){e.prototype.addAllProperties.call(this,t),o.addProperty(t,{propertyName:"label",defaultValue:""}),o.addProperty(t,{propertyName:"show",defaultValue:!1}),o.addProperty(t,{propertyName:"showLabel",defaultValue:!1}),o.addProperty(t,{propertyName:"axisPosition",defaultValue:"right"}),o.addProperty(t,{propertyName:"highColor",defaultValue:"#ffffff"}),o.addProperty(t,{propertyName:"lowColor",defaultValue:"#000000"}),o.addProperty(t,{propertyName:"markers",defaultValue:""}),o.addProperty(t,{propertyName:"autoScale",defaultValue:!1}),o.addProperty(t,{propertyName:"minimum",defaultValue:0}),o.addProperty(t,{propertyName:"maximum",defaultValue:1})},o.createdCallback=function(){e.prototype.createdCallback.call(this),this._parentGraph=void 0},o.sendEventToParentGraph=function(t){var e;void 0!==this._parentGraph&&(e={bubbles:!0,cancelable:!0,detail:{element:this}},this._parentGraph.dispatchEvent(new CustomEvent(t,e)))},o.attachedCallback=function(){var t=e.prototype.attachedCallback.call(this);return this.parentElement instanceof NationalInstruments.HtmlVI.Elements.IntensityGraph?(this._parentGraph=this.parentElement,this.sendEventToParentGraph("ni-cartesian-axis-attached")):(a.error("Color scale with following id does not have an intensity-graph parent",this.niControlId),this._parentGraph=void 0),t},o.propertyUpdated=function(t){e.prototype.propertyUpdated.call(this,t),this.sendEventToParentGraph("ni-axis-changed")},o.detachedCallback=function(){e.prototype.detachedCallback.call(this),this.sendEventToParentGraph("ni-cartesian-axis-detached"),this._parentGraph=void 0},o.setFont=function(t,a,r,o,n){e.prototype.setFont.call(this,t,a,r,o,n),this.sendEventToParentGraph("ni-axis-changed")},o.getViewConfig=function(){var t=window.getComputedStyle(this),e={type:r.COLORSCALE,axisLabel:this.showLabel?this.label:void 0,show:this.show,autoScale:this.autoScale,min:this.minimum,max:this.maximum,position:this.axisPosition,lowColor:this.lowColor,highColor:this.highColor,markers:this.markers,font:{size:parseFloat(t.fontSize),style:t.fontStyle,weight:t.fontWeight,family:t.fontFamily,color:"inherit"}};return e},o.getFlotAxis=function(){if(this._parentGraph){var t=this._parentGraph.graph.getYAxes().filter(function(t){return t.options.type===r.COLORSCALE})[0];return t}},o.defineElementInfo(o,"ni-color-scale","HTMLNIColorScale")}(NationalInstruments.HtmlVI.Elements.ColorScale,NationalInstruments.HtmlVI.Elements.Visual); | ||
//# sourceMappingURL=webcharts.min.js.map |
{ | ||
"name": "ni-webcharts", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "webcharts graph, chart, intensity graphs, plots and axes", | ||
@@ -30,3 +30,2 @@ "main": "index.js", | ||
"jquery": "^3.1.0", | ||
"jqx-element": "^1.0.26", | ||
"ni-data-types": "^0.0.5", | ||
@@ -38,2 +37,3 @@ "webcomponents-lite": "^0.6.0" | ||
"gulp-concat": "^2.6.1", | ||
"gulp-sequence": "^0.4.6", | ||
"gulp-sourcemaps": "^2.4.0", | ||
@@ -40,0 +40,0 @@ "gulp-uglify": "^2.0.0", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
405277
7
18
290
16
3
3
- Removedjqx-element@^1.0.26
- Removedjqx-element@1.3.27(transitive)
- Removedwebcomponentsjs@1.0.2(transitive)