Files
infineon_plc/Packages/Beckhoff.TwinCAT.HMI.Controls.14.4.1/runtimes/native1.12-tchmi/dist/TcHmiSparkline/TcHmiSparkline.esm.js
m.heisig 2d11c43579 Added minimal functionality for Robot teaching
- Added minimal HMI
- Added possibility to open and close all chamber doors
2026-01-17 09:20:39 +01:00

1 line
26 KiB
JavaScript

var __runInitializers=this&&this.__runInitializers||function(thisArg,initializers,value){for(var useValue=arguments.length>2,i=0;i<initializers.length;i++)value=useValue?initializers[i].call(thisArg,value):initializers[i].call(thisArg);return useValue?value:void 0},__esDecorate=this&&this.__esDecorate||function(ctor,descriptorIn,decorators,contextIn,initializers,extraInitializers){function accept(f){if(void 0!==f&&"function"!=typeof f)throw new TypeError("Function expected");return f}for(var _,kind=contextIn.kind,key="getter"===kind?"get":"setter"===kind?"set":"value",target=!descriptorIn&&ctor?contextIn.static?ctor:ctor.prototype:null,descriptor=descriptorIn||(target?Object.getOwnPropertyDescriptor(target,contextIn.name):{}),done=!1,i=decorators.length-1;i>=0;i--){var context={};for(var p in contextIn)context[p]="access"===p?{}:contextIn[p];for(var p in contextIn.access)context.access[p]=contextIn.access[p];context.addInitializer=function(f){if(done)throw new TypeError("Cannot add initializers after decoration has completed");extraInitializers.push(accept(f||null))};var result=(0,decorators[i])("accessor"===kind?{get:descriptor.get,set:descriptor.set}:descriptor[key],context);if("accessor"===kind){if(void 0===result)continue;if(null===result||"object"!=typeof result)throw new TypeError("Object expected");(_=accept(result.get))&&(descriptor.get=_),(_=accept(result.set))&&(descriptor.set=_),(_=accept(result.init))&&initializers.unshift(_)}else(_=accept(result))&&("field"===kind?initializers.unshift(_):descriptor[key]=_)}target&&Object.defineProperty(target,contextIn.name,descriptor),done=!0};import{TcHmiControl}from"Beckhoff.TwinCAT.HMI.Framework/index.esm.js";export var Datatype;!function(Datatype){Datatype[Datatype.Datetime=0]="Datetime",Datatype[Datatype.Timespan=1]="Timespan",Datatype[Datatype.Keyword=2]="Keyword"}(Datatype||(Datatype={}));export var Position;!function(Position){Position[Position.Left=0]="Left",Position[Position.Right=1]="Right"}(Position||(Position={}));export var LabelPosition;!function(LabelPosition){LabelPosition[LabelPosition.Left=0]="Left",LabelPosition[LabelPosition.Right=1]="Right",LabelPosition[LabelPosition.Center=2]="Center"}(LabelPosition||(LabelPosition={}));let TcHmiSparkline=(()=>{var _a,_b,_c,_d,_e;let ___rebuild_decorators,___onResolverForLineGraphDescriptionsWatchCallback_decorators,___onResolverForLineGraphDataWatchCallback_decorators,___onResolverForLabelColorWatchCallback_decorators,___onResolverForYAxisColorWatchCallback_decorators,_classSuper=TcHmiControl.Control,_instanceExtraInitializers=[];return class TcHmiSparkline extends _classSuper{static{const _metadata="function"==typeof Symbol&&Symbol.metadata?Object.create(_classSuper[Symbol.metadata]??null):void 0;___rebuild_decorators=[(_a=TcHmi).CallbackMethod.bind(_a)],___onResolverForLineGraphDescriptionsWatchCallback_decorators=[(_b=TcHmi).CallbackMethod.bind(_b)],___onResolverForLineGraphDataWatchCallback_decorators=[(_c=TcHmi).CallbackMethod.bind(_c)],___onResolverForLabelColorWatchCallback_decorators=[(_d=TcHmi).CallbackMethod.bind(_d)],___onResolverForYAxisColorWatchCallback_decorators=[(_e=TcHmi).CallbackMethod.bind(_e)],__esDecorate(this,null,___rebuild_decorators,{kind:"method",name:"__rebuild",static:!1,private:!1,access:{has:obj=>"__rebuild"in obj,get:obj=>obj.__rebuild},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForLineGraphDescriptionsWatchCallback_decorators,{kind:"method",name:"__onResolverForLineGraphDescriptionsWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForLineGraphDescriptionsWatchCallback"in obj,get:obj=>obj.__onResolverForLineGraphDescriptionsWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForLineGraphDataWatchCallback_decorators,{kind:"method",name:"__onResolverForLineGraphDataWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForLineGraphDataWatchCallback"in obj,get:obj=>obj.__onResolverForLineGraphDataWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForLabelColorWatchCallback_decorators,{kind:"method",name:"__onResolverForLabelColorWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForLabelColorWatchCallback"in obj,get:obj=>obj.__onResolverForLabelColorWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForYAxisColorWatchCallback_decorators,{kind:"method",name:"__onResolverForYAxisColorWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForYAxisColorWatchCallback"in obj,get:obj=>obj.__onResolverForYAxisColorWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),_metadata&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:_metadata})}static#tchmiFQN="TcHmi.Controls.Beckhoff."+this.name;constructor(element,pcElement,attrs){super(element,pcElement,attrs)}__elementTemplateRoot=__runInitializers(this,_instanceExtraInitializers);__lineGraphDescriptions;__lineGraphDescriptionsInternal;__lineGraphData;__lineGraphDataInternal=null;__xAxisStart;__xAxisEnd;__showLabel;__labelColor;__labelPosition;__labelFontFamily;__labelFontSize;__labelFontWeight;__showYAxis;__yAxisColor;__yAxisPosition;__yAxisWidth;__yLabelFontFamily;__yLabelFontSize;__yLabelFontWeight;__yAxisDecimalPlaces;__lineCharts=[];__localizedElements=new Map;__localizedEngineeringElements=new Map;__localizationReader=void 0;__previnit(){if(this.__elementTemplateRoot=this.__element.find(".TcHmi_Controls_Beckhoff_TcHmiSparkline-template"),0===this.__elementTemplateRoot.length&&(this.__elementTemplateRoot=this.__element.find(".tchmi-sparkline-template")),0===this.__elementTemplateRoot.length)throw new Error("Invalid Template.html");if("undefined"==typeof TcHmiCharting)throw new Error("Missing needed TcHmiCharting library");TCHMI_DESIGNER&&this.__destroyOnDestroy.push(this.__localization.watchEx({level:TcHmi.Locale.Level.Engineering},data=>{if(data.error===TcHmi.Errors.NONE&&data.reader){this.__localizationReader=data.reader;for(const[key,info]of this.__localizedEngineeringElements){let localizedText=data.reader.get(key);info.textContent=localizedText}}})),super.__previnit()}__init(){super.__init()}__attach(){super.__attach(),this.__destroyOnDetach.push(TcHmi.EventProvider.register(this.__id+".onResized",this.__rebuild),TcHmi.EventProvider.register("onThemeDataChanged",this.__rebuild)),this.__drawLineChart()}__detach(){super.__detach()}destroy(){this.__keepAlive||super.destroy()}__rebuild(_event,_ctrl){this.__drawLineChart()}__drawLineChart(){if(TCHMI_DESIGNER){const designerMessage=this.__element.find(".tchmi-designer-control-message")[0]??document.createElement("div");return designerMessage.classList.add("tchmi-designer-control-message"),designerMessage.textContent="Engineering_Text",this.__localizedEngineeringElements.set("Engineering_Text",designerMessage),this.__localizationReader&&(designerMessage.textContent=this.__localizationReader.get("Engineering_Text")),void this.__element[0].appendChild(designerMessage)}if(!this.__lineGraphDataInternal||!this.__lineGraphDescriptionsInternal)return void this.__reset();let min=Math.min(this.__lineGraphDataInternal.length??0,this.__lineGraphDescriptionsInternal.length);if(this.__lineCharts.length<min){let height=(this.__elementTemplateRoot.height()||0)/min,width=this.__elementTemplateRoot.width()||0;for(let i=0,ii=this.__lineCharts.length;i<ii;i++)this.__lineCharts[i].clear(width,height);for(let i=this.__lineCharts.length,ii=min;i<ii;i++){let newChart=$('<div class="TcHmi_Controls_Beckhoff_TcHmiSparkline-template-chart">\n <div class="TcHmi_Controls_Beckhoff_TcHmiSparkline-chart"></div>\n </div>'),elemChart=$(newChart.children(".TcHmi_Controls_Beckhoff_TcHmiSparkline-chart"));newChart.attr("style","height: "+height+"px;"),this.__lineCharts.push(new TcHmiCharting.LineChart(elemChart,this.__elementTemplateRoot.width()||0,height,TcHmiCharting.IChart.Position.Background)),this.__elementTemplateRoot.append(newChart)}}else if(this.__lineCharts.length>min)for(let i=this.__lineCharts.length-1,ii=min-1;i>=ii;i--)i>=min&&(this.__lineCharts[i].remove(),this.__lineCharts.splice(i,1),this.__elementTemplateRoot.children().last().remove());let htmlElem=this.__elementTemplateRoot.children();for(let i=0,ii=htmlElem.length;i<ii;i++){let jqueryChart=$(htmlElem[i]);if(this.__showLabel){let labelName=this.__lineGraphDescriptionsInternal[i].displayName?this.__lineGraphDescriptionsInternal[i].displayName:"";if(htmlElem[i].children.length<2){$(`<div class="TcHmi_Controls_Beckhoff_TcHmiSparkline-chart-label">${labelName}</div>`).insertBefore(jqueryChart.children().first())}let labelElem=jqueryChart.find(".TcHmi_Controls_Beckhoff_TcHmiSparkline-chart-label");labelElem.html(labelName),labelElem.css({fontSize:this.__labelFontSize??"12px",fontFamily:this.__labelFontFamily??"",fontWeight:this.__labelFontWeight??"auto",color:this.__labelColor?.color??TcHmi.Theme.Resources.get(this,"LabelColor").value?.color??"#4794da",textAlign:"Center"===this.__labelPosition?"center":"Right"===this.__labelPosition?"right":"left"})}else htmlElem[i].children.length>1&&jqueryChart.children().remove(".TcHmi_Controls_Beckhoff_TcHmiSparkline-chart-label")}let height=(this.__elementTemplateRoot.height()||0)/min,width=this.__elementTemplateRoot.width()||0;for(let i=0,ii=this.__lineCharts.length;i<ii;i++){let parent=$(this.__elementTemplateRoot.children(".TcHmi_Controls_Beckhoff_TcHmiSparkline-template-chart")[i]),labelElem=parent.children(".TcHmi_Controls_Beckhoff_TcHmiSparkline-chart-label"),chartElem=parent.children(".TcHmi_Controls_Beckhoff_TcHmiSparkline-chart");parent.attr("style","height: "+height+"px;"),chartElem.attr("style","height: calc("+height+"px - "+(labelElem.height()||0)+"px);");let lineChart=this.__lineCharts[i];lineChart.clear(width,height-(labelElem.height()||0)),lineChart.addXAxis();let xAxis=lineChart.getXAxis();xAxis&&(xAxis.setShowAxis(!1),xAxis.setAxisWidth(1),xAxis.setMainTickSteps(2),xAxis.setDecimalPlaces(0),xAxis.setShowAxisName(!1),xAxis.setShowLabels(!1),xAxis.setMainTickStartValue(this.__xAxisStart??null),xAxis.setMainTickEndValue(this.__xAxisEnd??null),null!==this.__xAxisStart&&void 0!==this.__xAxisStart&&null!==this.__xAxisEnd&&void 0!==this.__xAxisEnd?xAxis.setAutoScaling(!1):xAxis.setAutoScaling(!0)),lineChart.addYAxis(TcHmi.ValueConverter.toEnum(this.__yAxisPosition,Position,Position.Right));let yAxis=lineChart.getYAxisAtPosition(0),lineGraphData=this.__lineGraphDataInternal[i];if(yAxis){let showYAxis=this.__showYAxis??this.getAttributeDefaultValueInternal("ShowYAxis");if(lineChart.setYShowLabels(showYAxis),yAxis.setShowAxis(showYAxis),yAxis.setShowLabels(showYAxis),showYAxis){let themeYAxisColor=TcHmi.Theme.Resources.get(this,"DefaultYAxisColor"),color=this.__yAxisColor&&TcHmi.isSolidColor(this.__yAxisColor)?this.__yAxisColor.color:TcHmi.isSolidColor(themeYAxisColor.value)?TcHmi.StyleProvider.resolveSolidColorAsCssValue(themeYAxisColor.value):null;yAxis.setAxisColor(color),yAxis.setLabelFontColor(color),yAxis.setLabelFontSize(this.__yLabelFontSize??this.getAttributeDefaultValueInternal("YLabelFontSize")),yAxis.setLabelFontFamily(this.__yLabelFontFamily),yAxis.setLabelFontSizeUnit("px"),yAxis.setLabelFontWeight(this.__yLabelFontWeight??this.getAttributeDefaultValueInternal("YLabelFontWeight"))}lineChart.setYAxisWidth(this.__yAxisWidth??this.getAttributeDefaultValueInternal("YAxisWidth")),lineChart.setYMainTickSteps(2),yAxis.setAxisWidth(this.__yAxisWidth??this.getAttributeDefaultValueInternal("YAxisWidth")),yAxis.setDecimalPlaces(this.__yAxisDecimalPlaces??this.getAttributeDefaultValueInternal("YAxisDecimalPlaces")),yAxis.setMainTickSteps(2);let sortedData=lineGraphData.map(a=>a.y).filter(x=>void 0!==x),min=Math.min(...sortedData),max=Math.max(...sortedData);yAxis.setMainTickStartValue(min-1),yAxis.setMainTickEndValue(max+1),yAxis.setShowAxisName(!1),lineChart.addGraph({points:lineGraphData,yAxis});let lineGraph=lineChart.getLineGraphsAtPosition(0);if(lineGraph){let color=this.__lineGraphDescriptionsInternal[i].lineColor;if(color&&color.color)lineGraph.setLineColor(color.color);else{let themeLineColor=TcHmi.Theme.Resources.get(this,"DefaultGraphColor");TcHmi.isSolidColor(themeLineColor.value)&&lineGraph.setLineColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(themeLineColor.value))}lineGraph.setLineWidth(this.__lineGraphDescriptionsInternal[i].lineWidth)}}let referenceLines=this.__lineGraphDescriptionsInternal[i].referenceLines;if(referenceLines)for(let j=0,jj=referenceLines.length;j<jj;j++){lineChart.addReferenceLine();let referenceLine=lineChart.getReferenceLinesAtPosition(j);if(referenceLine){let referenceLineData=referenceLines[j];referenceLineData&&(referenceLine.setShow(referenceLineData.show),referenceLine.setValue(referenceLineData.value),referenceLine.setValueUnit("Value"),referenceLine.setYAxisId(1),referenceLine.setLineWidth(referenceLineData.lineWidth),referenceLine.setColor(referenceLineData.color?.color??null))}}lineChart.draw(0)}}__reset(){for(let i=this.__lineCharts.length-1,ii=-1;i>ii;i--)this.__lineCharts[i].remove(),this.__lineCharts.splice(i,1),this.__elementTemplateRoot.children().last().remove()}setLineGraphDescriptions(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("LineGraphDescriptions"));let resolverInfo=this.__objectResolvers.get("LineGraphDescriptions");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("LineGraphDescriptions")?.type});this.__objectResolvers.set("LineGraphDescriptions",{resolver,watchCallback:this.__onResolverForLineGraphDescriptionsWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForLineGraphDescriptionsWatchCallback)})}__onResolverForLineGraphDescriptionsWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("LineGraphDescriptions"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__lineGraphDescriptions)||(this.__lineGraphDescriptions=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"LineGraphDescriptions"}),this.__processLineGraphDescriptions()):TcHmi.Log.Controls.error(this,TcHmiSparkline.#tchmiFQN,{Attribute:"LineGraphDescriptions"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getLineGraphDescriptions(){return this.__lineGraphDescriptions}__processLineGraphDescriptions(){if(this.__lineGraphDescriptionsInternal=tchmi_clone_object(this.__lineGraphDescriptions)??[],this.__lineGraphDataInternal){for(let i=this.__lineGraphDescriptionsInternal?this.__lineGraphDescriptionsInternal.length:0,ii=this.__lineGraphDataInternal.length;i<ii;i++){let newLineGraphDesc={lineWidth:1};this.__lineGraphDescriptionsInternal.push(newLineGraphDesc)}}this.__isAttached&&this.__drawLineChart()}setLineGraphData(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("LineGraphData"));let resolverInfo=this.__objectResolvers.get("lineGraphData");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("LineGraphData")?.type});this.__objectResolvers.set("lineGraphData",{resolver,watchCallback:this.__onResolverForLineGraphDataWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForLineGraphDataWatchCallback)})}__onResolverForLineGraphDataWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("LineGraphData"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__lineGraphData)||(this.__lineGraphData=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"LineGraphData"}),this.__processLineGraphData()):TcHmi.Log.Controls.error(this,TcHmiSparkline.#tchmiFQN,{Attribute:"LineGraphData"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getLineGraphData(){return this.__lineGraphData}__processLineGraphData(){if(this.__lineGraphDataInternal=null,null!==this.__lineGraphData)if(Array.isArray(this.__lineGraphData)){let dataSub=this.__lineGraphData[0];if(isNaN(Number(dataSub))){if(Array.isArray(dataSub))if(isNaN(Number(dataSub[0])))this.__lineGraphDataInternal=this.__lineGraphData;else if(this.__lineGraphData[0]&&this.__lineGraphData[1]){let array=[];for(let i=0,ii=this.__lineGraphData.length;i<ii;i++){let internalArray=[];for(let j=0,jj=this.__lineGraphData[i].length;j<jj;j++)internalArray.push({x:j,y:this.__lineGraphData[i][j]});array.push(internalArray)}this.__lineGraphDataInternal=array}else this.__lineGraphDataInternal=null}else{let array=[];for(let i=0,ii=this.__lineGraphData.length;i<ii;i++)array.push({x:i,y:this.__lineGraphData[i]});this.__lineGraphDataInternal=[array]}}else this.__lineGraphDataInternal=null;if(this.__lineGraphDescriptionsInternal=tchmi_clone_object(this.__lineGraphDescriptions)??[],this.__lineGraphDataInternal){for(let i=this.__lineGraphDescriptionsInternal?this.__lineGraphDescriptionsInternal.length:0,ii=this.__lineGraphDataInternal.length;i<ii;i++){let newLineGraphDesc={lineWidth:1};this.__lineGraphDescriptionsInternal.push(newLineGraphDesc)}}this.__isAttached&&this.__drawLineChart()}setXAxisStart(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew)??this.getAttributeDefaultValueInternal("XAxisStart");convertedValue!==this.__xAxisStart&&(this.__xAxisStart=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"XAxisStart"}),this.__processXAxisStart())}getXAxisStart(){return this.__xAxisStart}__processXAxisStart(){this.__isAttached&&this.__drawLineChart()}setXAxisEnd(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew)??this.getAttributeDefaultValueInternal("XAxisEnd");convertedValue!==this.__xAxisEnd&&(this.__xAxisEnd=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"XAxisEnd"}),this.__processXAxisEnd())}getXAxisEnd(){return this.__xAxisEnd}__processXAxisEnd(){this.__isAttached&&this.__drawLineChart()}setShowLabel(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew)??this.getAttributeDefaultValueInternal("ShowLabel");convertedValue!==this.__showLabel&&(this.__showLabel=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ShowLabel"}),this.__processShowLabel())}getShowLabel(){return this.__showLabel}__processShowLabel(){this.__isAttached&&this.__drawLineChart()}setLabelColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew)??this.getAttributeDefaultValueInternal("LabelColor"),resolverInfo=this.__objectResolvers.get("LabelColor");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("LabelColor")?.type});this.__objectResolvers.set("LabelColor",{resolver,watchCallback:this.__onResolverForLabelColorWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForLabelColorWatchCallback)})}__onResolverForLabelColorWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("LabelColor"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__labelColor)||(this.__labelColor=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"LabelColor"}),this.__processLabelColor()):TcHmi.Log.Controls.error(this,TcHmiSparkline.#tchmiFQN,{Attribute:"LabelColor"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getLabelColor(){return this.__labelColor}__processLabelColor(){this.__isAttached&&this.__drawLineChart()}setLabelPosition(valueNew){let convertedValue=TcHmi.ValueConverter.toString(valueNew)??this.getAttributeDefaultValueInternal("LabelPosition");tchmi_equal(convertedValue,this.__labelPosition)||(this.__labelPosition=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"LabelPosition"}),this.__processLabelPosition())}getLabelPosition(){return this.__labelPosition}__processLabelPosition(){this.__isAttached&&this.__drawLineChart()}setLabelFontFamily(valueNew){let convertedValue=TcHmi.ValueConverter.toFontFamily(valueNew)??this.getAttributeDefaultValueInternal("LabelFontFamily");convertedValue!==this.__labelFontFamily&&(this.__labelFontFamily=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"LabelFontFamily"}),this.__processLabelFontFamily())}getLabelFontFamily(){return this.__labelFontFamily}__processLabelFontFamily(){this.__isAttached&&this.__drawLineChart()}setLabelFontSize(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew)??this.getAttributeDefaultValueInternal("LabelFontSize");convertedValue!==this.__labelFontSize&&(this.__labelFontSize=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"LabelFontSize"}),this.__processLabelFontSize())}getLabelFontSize(){return this.__labelFontSize}__processLabelFontSize(){this.__isAttached&&this.__drawLineChart()}getLabelFontSizeUnit(){return"px"}setLabelFontWeight(valueNew){let convertedValue=TcHmi.ValueConverter.toFontWeight(valueNew)??this.getAttributeDefaultValueInternal("LabelFontWeight");convertedValue!==this.__labelFontWeight&&(this.__labelFontWeight=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"LabelFontWeight"}),this.__processLabelFontWeight())}getLabelFontWeight(){return this.__yLabelFontWeight}__processLabelFontWeight(){this.__isAttached&&this.__drawLineChart()}setShowYAxis(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew)??this.getAttributeDefaultValueInternal("ShowYAxis");convertedValue!==this.__showYAxis&&(this.__showYAxis=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ShowYAxis"}),this.__processShowYAxis())}getShowYAxis(){return this.__showYAxis}__processShowYAxis(){this.__isAttached&&this.__drawLineChart()}setYAxisColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew)??this.getAttributeDefaultValueInternal("YAxisColor"),resolverInfo=this.__objectResolvers.get("yAxisColor");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("YAxisColor")?.type});this.__objectResolvers.set("yAxisColor",{resolver,watchCallback:this.__onResolverForYAxisColorWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForYAxisColorWatchCallback)})}__onResolverForYAxisColorWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("yAxisColor"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__yAxisColor)||(this.__yAxisColor=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"YAxisColor"}),this.__processYAxisColor()):TcHmi.Log.Controls.error(this,TcHmiSparkline.#tchmiFQN,{Attribute:"YAxisColor"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getYAxisColor(){return this.__yAxisColor}__processYAxisColor(){this.__isAttached&&this.__drawLineChart()}setYAxisPosition(valueNew){let convertedValue=TcHmi.ValueConverter.toString(valueNew)??this.getAttributeDefaultValueInternal("YAxisPosition");tchmi_equal(convertedValue,this.__yAxisPosition)||(this.__yAxisPosition=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"YAxisPosition"}),this.__processYAxisPosition())}getYAxisPosition(){return this.__yAxisPosition}__processYAxisPosition(){this.__isAttached&&this.__drawLineChart()}setYAxisDecimalPlaces(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew)??this.getAttributeDefaultValueInternal("YAxisDecimalPlaces");convertedValue!==this.__yAxisDecimalPlaces&&(this.__yAxisDecimalPlaces=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"YAxisDecimalPlaces"}),this.__processYAxisDecimalPlaces())}getYAxisDecimalPlaces(){return this.__yAxisDecimalPlaces}__processYAxisDecimalPlaces(){this.__isAttached&&this.__drawLineChart()}setYAxisWidth(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew)??this.getAttributeDefaultValueInternal("YAxisWidth");convertedValue!==this.__yAxisWidth&&(this.__yAxisWidth=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"YAxisWidth"}),this.__processYAxisWidth())}getYAxisWidth(){return this.__yAxisWidth}__processYAxisWidth(){this.__isAttached&&this.__drawLineChart()}setYLabelFontFamily(valueNew){let convertedValue=TcHmi.ValueConverter.toFontFamily(valueNew)??this.getAttributeDefaultValueInternal("YLabelFontFamily");convertedValue!==this.__yLabelFontFamily&&(this.__yLabelFontFamily=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"YLabelFontFamily"}),this.__processYLabelFontFamily())}getYLabelFontFamily(){return this.__yLabelFontFamily}__processYLabelFontFamily(){this.__isAttached&&this.__drawLineChart()}setYLabelFontSize(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew)??this.getAttributeDefaultValueInternal("YLabelFontSize");convertedValue!==this.__yLabelFontSize&&(this.__yLabelFontSize=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"YLabelFontSize"}),this.__processYLabelFontSize())}getYLabelFontSize(){return this.__yLabelFontSize}__processYLabelFontSize(){this.__isAttached&&this.__drawLineChart()}getYLabelFontSizeUnit(){return"px"}setYLabelFontWeight(valueNew){let convertedValue=TcHmi.ValueConverter.toFontWeight(valueNew)??this.getAttributeDefaultValueInternal("YLabelFontWeight");convertedValue!==this.__yLabelFontWeight&&(this.__yLabelFontWeight=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"YLabelFontWeight"}),this.__processYLabelFontWeight())}getYLabelFontWeight(){return this.__yLabelFontWeight}__processYLabelFontWeight(){this.__isAttached&&this.__drawLineChart()}static Datatype=Datatype;static Position=Position;static LabelPosition=LabelPosition}})();TcHmi.Controls.registerEx("TcHmiSparkline","TcHmi.Controls.Beckhoff",TcHmiSparkline,{injectInGlobalObject:!0});export{TcHmiSparkline as Control};