Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ni-webcharts

Package Overview
Dependencies
Maintainers
2
Versions
225
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ni-webcharts - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

4

dist/webcharts.min.js

@@ -8,7 +8,7 @@ !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.IntensityGraph=function(){"use strict"},NationalInstruments.HtmlVI.Elements.IntensityGraph.ScaleTypeEnum=Object.freeze({COLORSCALE:"colorScale",COLORSCALEGRADIENT:"colorScaleGradient"}),function(t,a){"use strict";var e=NationalInstruments.HtmlVI.NISupport,i=NationalInstruments.HtmlVI.Elements.IntensityGraph.ScaleTypeEnum;e.inheritFromParent(t,a);var n=t.prototype,s=50,r=100,o=null;n.dataRange=function(){if(null===o||0===o.length)return{dataMin:0,dataMax:Math.sqrt(s*s+r*r)};for(var t=Math.min(),a=Math.max(),e=0;e<o.length;e++)for(var i=o[e],n=0;n<i.length;n++)i[n]>a&&(a=i[n]),i[n]<t&&(t=i[n]);return{dataMin:t,dataMax:a}},n.createdCallback=function(){a.prototype.createdCallback.call(this),this.autoScaleColor=!1},n.getSettings=function(){var t={series:{intensitygraph:{show:!0,legend:!0}},axisLabels:{show:!0},xaxes:[{}],yaxes:[{}],zoom:{interactive:!0,trigger:null},pan:{interactive:!0},selection:{mode:null},grid:{}};return t},n.configureGraph=function(){var t,a,e,n,s,r,o,l,h=[],u=this.getSettings();""!==this.plotAreaMargin&&(void 0===u.grid&&(u.grid={}),u.grid.margin=JSON.parse(this.plotAreaMargin));var p=JSON.parse(this.value);for(u.series.intensitygraph.data=p.length>0?p:this.defaultData(),u.xaxes=[],u.yaxes=[],t=0;t<this.axes.length;t++){var g=this.axes[t],c=g.getViewConfig();if(c){var m=c.type===i.COLORSCALE;if(m||"left"!==c.position&&"right"!==c.position||u.yaxes.push(c),m||"bottom"!==c.position&&"top"!==c.position||u.xaxes.push(c),m){var d=JSON.parse(c.markers);for(a=0;a<d.length;a++)h[a]={value:d[a].value,color:d[a].color};if(c.autoScale===!1)n=d[0].value,s=d[d.length-1].value,u.series.intensitygraph.min=n,u.series.intensitygraph.max=s;else{this.autoScaleColor=!0;var f=this.dataRange();n=f.dataMin,s=f.dataMax,u.series.intensitygraph.min=f.dataMin,u.series.intensitygraph.max=f.dataMax}u.series.intensitygraph.gradient=h,u.series.intensitygraph.lowColor=c.lowColor,u.series.intensitygraph.highColor=c.highColor,e=c.autoScale,r=c.axisLabel,o=c.show,l=c.font}}}return u.yaxes.push({type:i.COLORSCALEGRADIENT,position:"right",show:!1,min:-0,max:50,showMinorTicks:!1,showTicks:!1,gridLines:!1,reserveSpace:o,labelWidth:20,labelHeight:50,disablePan:!0,disableZoom:!0}),u.yaxes.push({type:i.COLORSCALE,position:"right",min:n,max:s,axisLabel:r,show:o,showMinorTicks:!0,showTicks:!0,gridLines:!1,font:l,autoScale:e,disablePan:!0,disableZoom:!0}),u},n.defaultData=function(){return[[]]},n.createData=function(t,a){var e={};t.length>0&&(e=t[0].getViewConfig());var i=a.length>0?a:this.defaultData();o=i,e.data=i;var n=[e];return n},n.updateData=function(){var t=this.graph,a=this.createData(this.plots,JSON.parse(this.value));this.autoScaleColor?this.updateGraphConfig():(t.setData(a),t.setupGrid()),t.draw()},n.convertToFlotFormat=function(t){return t},n.defineElementInfo(n,"ni-intensity-graph","HTMLNIIntensityGraph")}(NationalInstruments.HtmlVI.Elements.IntensityGraph,NationalInstruments.HtmlVI.Elements.CartesianGraphBase);
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,r=window.NINumericFormatters,n=function(t){var e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;","/":"&#x2F;","`":"&#x60;"};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 r.prototype.toSiNotation(t,e.tickDecimals)},d=function(t,e,a){var i=Math.pow(10,a),r=e*i;return r=t(r),r/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")?r.prototype.toDecPrecisionNotation(i,a):(i=d(Math.floor,e,a),r.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:"axisRef",defaultValue:""}),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,r,n){e.prototype.setFont.call(this,t,a,i,r,n),this.sendEventToParentGraph("ni-axis-changed")},i.getViewConfig=function(){var t=window.getComputedStyle(this),e={axisLabel:this.showLabel?n(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,color:t.color,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.CartesianAxis=function(){"use strict"},function(t,e){"use strict";var a=NationalInstruments.HtmlVI.NISupport;a.inheritFromParent(t,e);var i=t.prototype,r=window.NINumericFormatters,n=function(t){var e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;","/":"&#x2F;","`":"&#x60;"};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(t,e){return r.prototype.toSiNotation(t,e.tickDecimals)},p=function(t,e,a){var i=Math.pow(10,a),r=e*i;return r=t(r),r/i},d=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")?r.prototype.toDecPrecisionNotation(i,a):(i=p(Math.floor,e,a),r.prototype.toDecFixedNotation(i,a))}},h=function(t,e){if(0===t.indexOf("LVSI"))return l;if(0===t.indexOf("LVRelativeSeconds")){var a=18,i=t.slice(a);return d(i)}return null};i.addAllProperties=function(t){e.prototype.addAllProperties.call(this,t),i.addProperty(t,{propertyName:"axisRef",defaultValue:""}),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:"all"}),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,r,n){e.prototype.setFont.call(this,t,a,i,r,n),this.sendEventToParentGraph("ni-axis-changed")},i.getViewConfig=function(){var t=window.getComputedStyle(this),e={axisLabel:this.showLabel?n(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),showTickLabels:this.showTickLabels,gridLines:this.gridLines,showTicks:this.showTicks,showMinorTicks:this.showMinorTicks,color:t.color,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"},disableZoom:!0,disablePan:!0};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(t,e){"use strict";var a=NationalInstruments.HtmlVI.NISupport;a.inheritFromParent(t,e);var n=t.prototype,r={lines:{show:!1}};n.addAllProperties=function(t){e.prototype.addAllProperties.call(this,t),n.addProperty(t,{propertyName:"show",defaultValue:!1}),n.addProperty(t,{propertyName:"label",defaultValue:""}),n.addProperty(t,{propertyName:"xaxis",defaultValue:""}),n.addProperty(t,{propertyName:"yaxis",defaultValue:""}),n.addProperty(t,{propertyName:"enableHover",defaultValue:!1}),n.addProperty(t,{propertyName:"hoverFormat",defaultValue:""})},n.createdCallback=function(){e.prototype.createdCallback.call(this),this._parentGraph=void 0},n.sendEventToParentGraph=function(t,e){var a;void 0!==this._parentGraph&&(a={bubbles:!1,cancelable:!0,detail:{element:this,originalSource:e}},this._parentGraph.dispatchEvent(new CustomEvent(t,a)))},n.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.addPlotItemListeners(),this.sendEventToParentGraph("ni-cartesian-plot-attached")):(a.error("Plot with following id does not have a parentGraph",this.niControlId),this._parentGraph=void 0),t},n.addPlotItemListeners=function(){var t=this;t.addEventListener("ni-cartesian-plot-renderer-attached",function(e){e.target===t&&(this.plotRenderer=e.detail.element,this.sendEventToParentGraph("ni-cartesian-plot-renderer-attached",e.detail.element))}),t.addEventListener("ni-cartesian-plot-renderer-detached",function(e){e.target===t&&(this.plotRenderer=void 0,this.sendEventToParentGraph("ni-cartesian-plot-renderer-detached",e.detail.element))}),t.addEventListener("ni-cartesian-plot-renderer-changed",function(e){e.target===t&&this.sendEventToParentGraph("ni-cartesian-plot-renderer-changed",e.detail.element)})},n.detachedCallback=function(){e.prototype.detachedCallback.call(this),this.sendEventToParentGraph("ni-cartesian-plot-detached"),this._parentGraph=void 0},n.propertyUpdated=function(t){e.prototype.propertyUpdated.call(this,t),this.sendEventToParentGraph("ni-cartesian-plot-changed")};var i=function(t,e){for(var a=0,n=0;n<t.axes.length;n++){var r=t.axes[n];if(("left"===r.axisPosition||"right"===r.axisPosition)&&(a++,r.axisRef===e||r.niControlId===e))return a}return 1},o=function(t,e){for(var a=0,n=0;n<t.axes.length;n++){var r=t.axes[n];if(("top"===r.axisPosition||"bottom"===r.axisPosition)&&(a++,r.axisRef===e||r.niControlId===e))return a}return 1};n.getViewConfig=function(){var t=r;return void 0!==this.plotRenderer&&this.show===!0&&(t=this.plotRenderer.getViewConfig(),t.hoverable=this.enableHover),t.xaxis=o(this._parentGraph,this.xaxis),t.yaxis=i(this._parentGraph,this.yaxis),t},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 r=NationalInstruments.HtmlVI.NISupport;r.inheritFromParent(t,e);var i=t.prototype;i.addAllProperties=function(t){e.prototype.addAllProperties.call(this,t),i.addProperty(t,{propertyName:"lineStroke",defaultValue:"auto"}),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")):(r.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 a=function(t){switch(t){case"zero":return 0;case"infinity":return 1/0;case"-infinity":return-(1/0);default:return}},n=.6;i.getColor=function(){var t=this.lineStroke||this.pointColor||this.areaFill||this.barFill;return"auto"===t?null:t},i.getViewConfig=function(){return{color:this.getColor(),lines:{show:""!==this.lineStroke||""!==this.areaFill,lineWidth:this.lineWidth,fill:""!==this.areaFill&&n,zero:!1,fillTowards:a(this.areaBaseLine),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.CartesianPlotRenderer=function(){"use strict"},function(t,e){"use strict";var i=NationalInstruments.HtmlVI.NISupport;i.inheritFromParent(t,e);var r=t.prototype;r.addAllProperties=function(t){e.prototype.addAllProperties.call(this,t),r.addProperty(t,{propertyName:"lineStroke",defaultValue:"auto"}),r.addProperty(t,{propertyName:"lineWidth",defaultValue:1}),r.addProperty(t,{propertyName:"lineStyle",defaultValue:"solid"}),r.addProperty(t,{propertyName:"areaFill",defaultValue:""}),r.addProperty(t,{propertyName:"areaBaseLine",defaultValue:"zero"}),r.addProperty(t,{propertyName:"barFill",defaultValue:""}),r.addProperty(t,{propertyName:"pointColor",defaultValue:""}),r.addProperty(t,{propertyName:"pointSize",defaultValue:5}),r.addProperty(t,{propertyName:"pointShape",defaultValue:"ellipse"})},r.createdCallback=function(){e.prototype.createdCallback.call(this),this._parentPlot=void 0},r.sendEventToParentPlot=function(t){var e;void 0!==this._parentPlot&&(e={bubbles:!1,cancelable:!0,detail:{element:this}},this._parentPlot.dispatchEvent(new CustomEvent(t,e)))},r.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")):(i.error("Plot renderer with following id does not have a parentPlot",this.niControlId),this._parentPlot=void 0),t},r.propertyUpdated=function(t){e.prototype.propertyUpdated.call(this,t),this.sendEventToParentPlot("ni-cartesian-plot-renderer-changed")},r.detachedCallback=function(){e.prototype.detachedCallback.call(this),this.sendEventToParentPlot("ni-cartesian-plot-renderer-detached")},r.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 a=function(t){switch(t){case"zero":return 0;case"infinity":return 1/0;case"positiveinfinity":return 1/0;case"-infinity":return-(1/0);case"negativeinfinity":return-(1/0);default:return}},n=.6;r.getColor=function(){var t=this.lineStroke||this.pointColor||this.areaFill||this.barFill;return"auto"===t?null:t},r.getViewConfig=function(){return{color:this.getColor(),lines:{show:""!==this.lineStroke||""!==this.areaFill,lineWidth:this.lineWidth,fill:""!==this.areaFill&&n,zero:!1,fillTowards:a(this.areaBaseLine),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}}},r.defineElementInfo(r,"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:"show",defaultValue:!1}),o.addProperty(t,{propertyName:"label",defaultValue:""}),o.addProperty(t,{propertyName:"showLabel",defaultValue:!1}),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:"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);
//# sourceMappingURL=webcharts.min.js.map

@@ -239,4 +239,4 @@ # Webcharts Reference

<ni-chart id="chart1" bufferSize="1024">
<ni-cartesian-axis show show-tick-labels label="Time" axis-position="bottom" auto-scale></ni-cartesian-axis>
<ni-cartesian-axis show show-tick-labels label="Amplitude" axis-position="left" auto-scale></ni-cartesian-axis>
<ni-cartesian-axis show label="Time" axis-position="bottom" auto-scale></ni-cartesian-axis>
<ni-cartesian-axis show label="Amplitude" axis-position="left" auto-scale></ni-cartesian-axis>
<ni-cartesian-plot show label="Plot 1">

@@ -334,4 +334,4 @@ <ni-cartesian-plot-renderer line-width="2" line-stroke="#a84716"></ni-cartesian-plot-renderer>

<ni-intensity-graph id="graph1" value="[[0.1, 0.2], [0.3, 0.4], [0.5, 0.6]]">
<ni-cartesian-axis label="X" show show-label axis-position="bottom" show-tick-labels auto-scale grid-lines></ni-cartesian-axis>
<ni-cartesian-axis label="Y" show show-label axis-position="left" show-tick-labels auto-scale grid-lines></ni-cartesian-axis>
<ni-cartesian-axis label="X" show show-label axis-position="bottom" auto-scale grid-lines></ni-cartesian-axis>
<ni-cartesian-axis label="Y" show show-label axis-position="left" auto-scale grid-lines></ni-cartesian-axis>
<ni-color-scale label="Color Scale" show show-label

@@ -352,7 +352,7 @@ markers='[{"value":0,"color":"rgba(0,0,0,1)"},{"value":50,"color":"rgba(0,0,255,1)"},{"value":100,"color":"rgba(255,255,255,1)"}]'

<ni-cartesian-graph>
<ni-cartesian-axis show show-tick-labels grid-lines show-label label="Axis 1" axis-position='bottom'>
<ni-cartesian-axis show grid-lines show-label label="Axis 1" axis-position='bottom'>
</ni-cartesian-axis>
<ni-cartesian-axis show show-tick-labels grid-lines show-label label="Axis 2" axis-position='top'>
<ni-cartesian-axis show grid-lines show-label label="Axis 2" axis-position='top'>
</ni-cartesian-axis>
<ni-cartesian-axis show show-tick-labels grid-lines show-label label="Axis 3" axis-position='left'>
<ni-cartesian-axis show grid-lines show-label label="Axis 3" axis-position='left'>
</ni-cartesian-axis>

@@ -399,4 +399,7 @@ </ni-cartesian-graph>

**show-tick-labels** (boolean) - if true the axis tick labels will be
visible. Default: false
**show-tick-labels** (string) - which of the tick labels are visible.
Possible values: 'none', 'endpoints', 'major' and 'all'. Default: 'all'.
For 'endpoints' only the minimum and the maximum values will be visible
at the edges of the axis. To make some intermediary values visible use
'major', and 'all' to show all of them.

@@ -493,4 +496,4 @@ **grid-lines** (boolean) - if true the grid lines for the axis will

<ni-cartesian-graph>
<ni-cartesian-axis axis-ref="axis1ref" show show-tick-labels autoscale axis-position="bottom"></ni-cartesian-axis>
<ni-cartesian-axis axis-ref="axis2ref" show show-tick-labels autoscale axis-position="left"></ni-cartesian-axis>
<ni-cartesian-axis axis-ref="axis1ref" show autoscale axis-position="bottom"></ni-cartesian-axis>
<ni-cartesian-axis axis-ref="axis2ref" show autoscale axis-position="left"></ni-cartesian-axis>
<ni-cartesian-plot show label="plot 1" xaxis="axis1ref" yaxis="axis2ref">

@@ -564,4 +567,4 @@ add an ni-cartesian-plot-renderer here

* 'zero': fill the line towards 0
* '-infinity': fill the line towards -Infinity. TODO: this doesn't work yet
* 'infinity': fill the line towards Infinity. TODO: this doesn't work yet
* '-infinity': fill the line towards -Infinity.
* 'infinity': fill the line towards Infinity.

@@ -598,5 +601,5 @@

<ni-cartesian-graph>
<ni-cartesian-axis show show-tick-labels grid-lines show-label label="Axis 1" axis-position='bottom'>
<ni-cartesian-axis show grid-lines show-label label="Axis 1" axis-position='bottom'>
</ni-cartesian-axis>
<ni-cartesian-axis show show-tick-labels grid-lines show-label label="Axis 2" axis-position='top'>
<ni-cartesian-axis show grid-lines show-label label="Axis 2" axis-position='top'>
</ni-cartesian-axis>

@@ -603,0 +606,0 @@ <ni-cursor label="Cursor 1" show show-label snap-to-data cursor-color="#40d387"></ni-cursor>

@@ -7,7 +7,7 @@ ## ni-cartesian-axis

<ni-cartesian-graph>
<ni-cartesian-axis show show-tick-labels grid-lines show-label label="Axis 1" axis-position='bottom'>
<ni-cartesian-axis show grid-lines show-label label="Axis 1" axis-position='bottom'>
</ni-cartesian-axis>
<ni-cartesian-axis show show-tick-labels grid-lines show-label label="Axis 2" axis-position='top'>
<ni-cartesian-axis show grid-lines show-label label="Axis 2" axis-position='top'>
</ni-cartesian-axis>
<ni-cartesian-axis show show-tick-labels grid-lines show-label label="Axis 3" axis-position='left'>
<ni-cartesian-axis show grid-lines show-label label="Axis 3" axis-position='left'>
</ni-cartesian-axis>

@@ -54,4 +54,7 @@ </ni-cartesian-graph>

**show-tick-labels** (boolean) - if true the axis tick labels will be
visible. Default: false
**show-tick-labels** (string) - which of the tick labels are visible.
Possible values: 'none', 'endpoints', 'major' and 'all'. Default: 'all'.
For 'endpoints' only the minimum and the maximum values will be visible
at the edges of the axis. To make some intermediary values visible use
'major', and 'all' to show all of them.

@@ -58,0 +61,0 @@ **grid-lines** (boolean) - if true the grid lines for the axis will

@@ -42,4 +42,4 @@ ## ni-cartesian-plot-renderer

* 'zero': fill the line towards 0
* '-infinity': fill the line towards -Infinity. TODO: this doesn't work yet
* 'infinity': fill the line towards Infinity. TODO: this doesn't work yet
* '-infinity': fill the line towards -Infinity.
* 'infinity': fill the line towards Infinity.

@@ -46,0 +46,0 @@

@@ -13,4 +13,4 @@ ## ni-cartesian-plot

<ni-cartesian-graph>
<ni-cartesian-axis axis-ref="axis1ref" show show-tick-labels autoscale axis-position="bottom"></ni-cartesian-axis>
<ni-cartesian-axis axis-ref="axis2ref" show show-tick-labels autoscale axis-position="left"></ni-cartesian-axis>
<ni-cartesian-axis axis-ref="axis1ref" show autoscale axis-position="bottom"></ni-cartesian-axis>
<ni-cartesian-axis axis-ref="axis2ref" show autoscale axis-position="left"></ni-cartesian-axis>
<ni-cartesian-plot show label="plot 1" xaxis="axis1ref" yaxis="axis2ref">

@@ -17,0 +17,0 @@ add an ni-cartesian-plot-renderer here

@@ -16,4 +16,4 @@ ## ni-chart

<ni-chart id="chart1" bufferSize="1024">
<ni-cartesian-axis show show-tick-labels label="Time" axis-position="bottom" auto-scale></ni-cartesian-axis>
<ni-cartesian-axis show show-tick-labels label="Amplitude" axis-position="left" auto-scale></ni-cartesian-axis>
<ni-cartesian-axis show label="Time" axis-position="bottom" auto-scale></ni-cartesian-axis>
<ni-cartesian-axis show label="Amplitude" axis-position="left" auto-scale></ni-cartesian-axis>
<ni-cartesian-plot show label="Plot 1">

@@ -20,0 +20,0 @@ <ni-cartesian-plot-renderer line-width="2" line-stroke="#a84716"></ni-cartesian-plot-renderer>

@@ -10,5 +10,5 @@ ## ni-cursor

<ni-cartesian-graph>
<ni-cartesian-axis show show-tick-labels grid-lines show-label label="Axis 1" axis-position='bottom'>
<ni-cartesian-axis show grid-lines show-label label="Axis 1" axis-position='bottom'>
</ni-cartesian-axis>
<ni-cartesian-axis show show-tick-labels grid-lines show-label label="Axis 2" axis-position='top'>
<ni-cartesian-axis show grid-lines show-label label="Axis 2" axis-position='top'>
</ni-cartesian-axis>

@@ -15,0 +15,0 @@ <ni-cursor label="Cursor 1" show show-label snap-to-data cursor-color="#40d387"></ni-cursor>

@@ -13,4 +13,4 @@ ## ni-intensity-graph

<ni-intensity-graph id="graph1" value="[[0.1, 0.2], [0.3, 0.4], [0.5, 0.6]]">
<ni-cartesian-axis label="X" show show-label axis-position="bottom" show-tick-labels auto-scale grid-lines></ni-cartesian-axis>
<ni-cartesian-axis label="Y" show show-label axis-position="left" show-tick-labels auto-scale grid-lines></ni-cartesian-axis>
<ni-cartesian-axis label="X" show show-label axis-position="bottom" auto-scale grid-lines></ni-cartesian-axis>
<ni-cartesian-axis label="Y" show show-label axis-position="left" auto-scale grid-lines></ni-cartesian-axis>
<ni-color-scale label="Color Scale" show show-label

@@ -17,0 +17,0 @@ markers='[{"value":0,"color":"rgba(0,0,0,1)"},{"value":50,"color":"rgba(0,0,255,1)"},{"value":100,"color":"rgba(255,255,255,1)"}]'

{
"name": "ni-webcharts",
"version": "0.3.0",
"version": "0.3.1",
"description": "webcharts graph, chart, intensity graphs, plots and axes",

@@ -25,3 +25,3 @@ "main": "index.js",

"dependencies": {
"engineering-flot": "0.1.12",
"engineering-flot": "0.1.13",
"flot-charting": "0.2.5",

@@ -28,0 +28,0 @@ "flot-cursors-plugin": "0.3.3",

@@ -28,4 +28,4 @@ # Webcharts [![Build Status](https://travis-ci.com/ni-kismet/webcharts.svg?token=MpaGws1pj7G9qToNQ6dS&branch=master)](https://travis-ci.com/ni-kismet/webcharts)

<ni-cartesian-graph value="[[0, 10, 200, 3, 40, 500, 6, 70, 800], [1, 2, 3, 4, 5]]">
<ni-cartesian-axis show show-tick-labels label="Time" axis-position="bottom" auto-scale></ni-cartesian-axis>
<ni-cartesian-axis show label="Amplitude" show-tick-labels axis-position="left" auto-scale></ni-cartesian-axis>
<ni-cartesian-axis show label="Time" axis-position="bottom" auto-scale></ni-cartesian-axis>
<ni-cartesian-axis show label="Amplitude" axis-position="left" auto-scale></ni-cartesian-axis>
<ni-cartesian-plot show="true" label="Plot 1">

@@ -32,0 +32,0 @@ <ni-cartesian-plot-renderer line-width="2"></ni-cartesian-plot-renderer>

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc