Files
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
157 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";import{Menubar}from"./Menubar.js";export var Position;!function(Position){Position[Position.Left=0]="Left",Position[Position.Right=1]="Right"}(Position||(Position={}));export var LineStyle;!function(LineStyle){LineStyle[LineStyle.Dotted=0]="Dotted",LineStyle[LineStyle.Dashed=1]="Dashed",LineStyle[LineStyle.Solid=2]="Solid"}(LineStyle||(LineStyle={}));export var AxisLabeling;!function(AxisLabeling){AxisLabeling[AxisLabeling.Number=0]="Number",AxisLabeling[AxisLabeling.Scientific=1]="Scientific",AxisLabeling[AxisLabeling.Auto=2]="Auto"}(AxisLabeling||(AxisLabeling={}));export var Orientation;!function(Orientation){Orientation[Orientation.Horizontal=0]="Horizontal",Orientation[Orientation.Vertical=1]="Vertical"}(Orientation||(Orientation={}));export var ValueUnit;!function(ValueUnit){ValueUnit.Value="Value",ValueUnit["%"]="%"}(ValueUnit||(ValueUnit={}));export var FillMode;!function(FillMode){FillMode[FillMode.None=0]="None",FillMode[FillMode.HorizontalZero=1]="HorizontalZero",FillMode[FillMode.Bottom=2]="Bottom",FillMode[FillMode.Top=3]="Top",FillMode[FillMode.Center=4]="Center",FillMode[FillMode.Source=5]="Source",FillMode[FillMode.ReferenceLine=6]="ReferenceLine"}(FillMode||(FillMode={}));export var MenuBarPosition;!function(MenuBarPosition){MenuBarPosition[MenuBarPosition.Bottom=0]="Bottom",MenuBarPosition[MenuBarPosition.Top=1]="Top"}(MenuBarPosition||(MenuBarPosition={}));export var MouseMode;!function(MouseMode){MouseMode[MouseMode.None=0]="None",MouseMode[MouseMode.ZoomX=1]="ZoomX",MouseMode[MouseMode.ZoomXY=2]="ZoomXY",MouseMode[MouseMode.PanX=3]="PanX",MouseMode[MouseMode.PanXY=4]="PanXY"}(MouseMode||(MouseMode={}));let TcHmiLineChart=(()=>{var _a,_b,_c,_d,_e,_f,_g,_h,_j,_k,_l,_m,_o,_p,_q,_r,_s;let ___rebuild_decorators,___onCheckboxMouseDown_decorators,___onCheckboxTouchStart_decorators,___onClick_decorators,___onMouseDown_decorators,___onMouseMove_decorators,___onMouseUp_decorators,___onMouseMoveTooltip_decorators,___onMouseWheel_decorators,___onTouchStart_decorators,___onTouchMove_decorators,___onTouchEnd_decorators,___onResolverForSectionsBackgroundColorWatchCallback_decorators,___onResolverForXLabelFontColorWatchCallback_decorators,___onResolverForXAxisColorWatchCallback_decorators,___onResolverForXAxisNameFontColorWatchCallback_decorators,___onResolverForXAxisFormatWatchCallback_decorators,___executeXAxisFormatFunction_decorators,___executeYAxisFormatFunction_decorators,___onResolverForYAxisWatchCallback_decorators,___onResolverForLineGraphDescriptionsWatchCallback_decorators,___onResolverForLineGraphDataWatchCallback_decorators,___onResolverForReferenceLinesWatchCallback_decorators,___onResolverForGridBackgroundColorWatchCallback_decorators,___onResolverForGridLineColorWatchCallback_decorators,___onResolverForSubgridLineColorWatchCallback_decorators,___onResolverForTooltipFormatWatchCallback_decorators,___onResolverForTooltipFontColorWatchCallback_decorators,___onResolverForTooltipBackgroundColorWatchCallback_decorators,_classSuper=TcHmiControl.Control,_instanceExtraInitializers=[];return class TcHmiLineChart extends _classSuper{static{const _metadata="function"==typeof Symbol&&Symbol.metadata?Object.create(_classSuper[Symbol.metadata]??null):void 0;___rebuild_decorators=[TcHmi.EventHandler()],___onCheckboxMouseDown_decorators=[TcHmi.EventHandler({checkIsEnabled:!0})],___onCheckboxTouchStart_decorators=[TcHmi.EventHandler({checkIsEnabled:!0})],___onClick_decorators=[TcHmi.EventHandler({checkIsEnabled:!0})],___onMouseDown_decorators=[TcHmi.EventHandler()],___onMouseMove_decorators=[TcHmi.EventHandler({checkIsEnabled:!0})],___onMouseUp_decorators=[TcHmi.EventHandler({checkIsEnabled:!0})],___onMouseMoveTooltip_decorators=[TcHmi.EventHandler()],___onMouseWheel_decorators=[TcHmi.EventHandler({checkIsEnabled:!0})],___onTouchStart_decorators=[TcHmi.EventHandler()],___onTouchMove_decorators=[TcHmi.EventHandler({checkIsEnabled:!0})],___onTouchEnd_decorators=[TcHmi.EventHandler({checkIsEnabled:!0})],___onResolverForSectionsBackgroundColorWatchCallback_decorators=[(_a=TcHmi).CallbackMethod.bind(_a)],___onResolverForXLabelFontColorWatchCallback_decorators=[(_b=TcHmi).CallbackMethod.bind(_b)],___onResolverForXAxisColorWatchCallback_decorators=[(_c=TcHmi).CallbackMethod.bind(_c)],___onResolverForXAxisNameFontColorWatchCallback_decorators=[(_d=TcHmi).CallbackMethod.bind(_d)],___onResolverForXAxisFormatWatchCallback_decorators=[(_e=TcHmi).CallbackMethod.bind(_e)],___executeXAxisFormatFunction_decorators=[(_f=TcHmi).CallbackMethod.bind(_f)],___executeYAxisFormatFunction_decorators=[(_g=TcHmi).CallbackMethod.bind(_g)],___onResolverForYAxisWatchCallback_decorators=[(_h=TcHmi).CallbackMethod.bind(_h)],___onResolverForLineGraphDescriptionsWatchCallback_decorators=[(_j=TcHmi).CallbackMethod.bind(_j)],___onResolverForLineGraphDataWatchCallback_decorators=[(_k=TcHmi).CallbackMethod.bind(_k)],___onResolverForReferenceLinesWatchCallback_decorators=[(_l=TcHmi).CallbackMethod.bind(_l)],___onResolverForGridBackgroundColorWatchCallback_decorators=[(_m=TcHmi).CallbackMethod.bind(_m)],___onResolverForGridLineColorWatchCallback_decorators=[(_o=TcHmi).CallbackMethod.bind(_o)],___onResolverForSubgridLineColorWatchCallback_decorators=[(_p=TcHmi).CallbackMethod.bind(_p)],___onResolverForTooltipFormatWatchCallback_decorators=[(_q=TcHmi).CallbackMethod.bind(_q)],___onResolverForTooltipFontColorWatchCallback_decorators=[(_r=TcHmi).CallbackMethod.bind(_r)],___onResolverForTooltipBackgroundColorWatchCallback_decorators=[(_s=TcHmi).CallbackMethod.bind(_s)],__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,___onCheckboxMouseDown_decorators,{kind:"method",name:"__onCheckboxMouseDown",static:!1,private:!1,access:{has:obj=>"__onCheckboxMouseDown"in obj,get:obj=>obj.__onCheckboxMouseDown},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onCheckboxTouchStart_decorators,{kind:"method",name:"__onCheckboxTouchStart",static:!1,private:!1,access:{has:obj=>"__onCheckboxTouchStart"in obj,get:obj=>obj.__onCheckboxTouchStart},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onClick_decorators,{kind:"method",name:"__onClick",static:!1,private:!1,access:{has:obj=>"__onClick"in obj,get:obj=>obj.__onClick},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onMouseDown_decorators,{kind:"method",name:"__onMouseDown",static:!1,private:!1,access:{has:obj=>"__onMouseDown"in obj,get:obj=>obj.__onMouseDown},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onMouseMove_decorators,{kind:"method",name:"__onMouseMove",static:!1,private:!1,access:{has:obj=>"__onMouseMove"in obj,get:obj=>obj.__onMouseMove},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onMouseUp_decorators,{kind:"method",name:"__onMouseUp",static:!1,private:!1,access:{has:obj=>"__onMouseUp"in obj,get:obj=>obj.__onMouseUp},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onMouseMoveTooltip_decorators,{kind:"method",name:"__onMouseMoveTooltip",static:!1,private:!1,access:{has:obj=>"__onMouseMoveTooltip"in obj,get:obj=>obj.__onMouseMoveTooltip},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onMouseWheel_decorators,{kind:"method",name:"__onMouseWheel",static:!1,private:!1,access:{has:obj=>"__onMouseWheel"in obj,get:obj=>obj.__onMouseWheel},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onTouchStart_decorators,{kind:"method",name:"__onTouchStart",static:!1,private:!1,access:{has:obj=>"__onTouchStart"in obj,get:obj=>obj.__onTouchStart},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onTouchMove_decorators,{kind:"method",name:"__onTouchMove",static:!1,private:!1,access:{has:obj=>"__onTouchMove"in obj,get:obj=>obj.__onTouchMove},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onTouchEnd_decorators,{kind:"method",name:"__onTouchEnd",static:!1,private:!1,access:{has:obj=>"__onTouchEnd"in obj,get:obj=>obj.__onTouchEnd},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForSectionsBackgroundColorWatchCallback_decorators,{kind:"method",name:"__onResolverForSectionsBackgroundColorWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForSectionsBackgroundColorWatchCallback"in obj,get:obj=>obj.__onResolverForSectionsBackgroundColorWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForXLabelFontColorWatchCallback_decorators,{kind:"method",name:"__onResolverForXLabelFontColorWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForXLabelFontColorWatchCallback"in obj,get:obj=>obj.__onResolverForXLabelFontColorWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForXAxisColorWatchCallback_decorators,{kind:"method",name:"__onResolverForXAxisColorWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForXAxisColorWatchCallback"in obj,get:obj=>obj.__onResolverForXAxisColorWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForXAxisNameFontColorWatchCallback_decorators,{kind:"method",name:"__onResolverForXAxisNameFontColorWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForXAxisNameFontColorWatchCallback"in obj,get:obj=>obj.__onResolverForXAxisNameFontColorWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForXAxisFormatWatchCallback_decorators,{kind:"method",name:"__onResolverForXAxisFormatWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForXAxisFormatWatchCallback"in obj,get:obj=>obj.__onResolverForXAxisFormatWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___executeXAxisFormatFunction_decorators,{kind:"method",name:"__executeXAxisFormatFunction",static:!1,private:!1,access:{has:obj=>"__executeXAxisFormatFunction"in obj,get:obj=>obj.__executeXAxisFormatFunction},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___executeYAxisFormatFunction_decorators,{kind:"method",name:"__executeYAxisFormatFunction",static:!1,private:!1,access:{has:obj=>"__executeYAxisFormatFunction"in obj,get:obj=>obj.__executeYAxisFormatFunction},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForYAxisWatchCallback_decorators,{kind:"method",name:"__onResolverForYAxisWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForYAxisWatchCallback"in obj,get:obj=>obj.__onResolverForYAxisWatchCallback},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,___onResolverForReferenceLinesWatchCallback_decorators,{kind:"method",name:"__onResolverForReferenceLinesWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForReferenceLinesWatchCallback"in obj,get:obj=>obj.__onResolverForReferenceLinesWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForGridBackgroundColorWatchCallback_decorators,{kind:"method",name:"__onResolverForGridBackgroundColorWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForGridBackgroundColorWatchCallback"in obj,get:obj=>obj.__onResolverForGridBackgroundColorWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForGridLineColorWatchCallback_decorators,{kind:"method",name:"__onResolverForGridLineColorWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForGridLineColorWatchCallback"in obj,get:obj=>obj.__onResolverForGridLineColorWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForSubgridLineColorWatchCallback_decorators,{kind:"method",name:"__onResolverForSubgridLineColorWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForSubgridLineColorWatchCallback"in obj,get:obj=>obj.__onResolverForSubgridLineColorWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForTooltipFormatWatchCallback_decorators,{kind:"method",name:"__onResolverForTooltipFormatWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForTooltipFormatWatchCallback"in obj,get:obj=>obj.__onResolverForTooltipFormatWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForTooltipFontColorWatchCallback_decorators,{kind:"method",name:"__onResolverForTooltipFontColorWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForTooltipFontColorWatchCallback"in obj,get:obj=>obj.__onResolverForTooltipFontColorWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForTooltipBackgroundColorWatchCallback_decorators,{kind:"method",name:"__onResolverForTooltipBackgroundColorWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForTooltipBackgroundColorWatchCallback"in obj,get:obj=>obj.__onResolverForTooltipBackgroundColorWatchCallback},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;static yAxisDefaultValueInternals;constructor(element,pcElement,attrs){super(element,pcElement,attrs);const yAxisMeta=TcHmi.Type.getSchema("tchmi:framework#/definitions/TcHmi.Controls.Beckhoff.TcHmiLineChart.ChartYAxisDefinition")?.propertiesMeta;TcHmiLineChart.yAxisDefaultValueInternals??={position:yAxisMeta?.find(data=>"position"===data.name)?.defaultValueInternal??"Left",logarithmicScale:yAxisMeta?.find(data=>"logarithmicScale"===data.name)?.defaultValueInternal??!1,axisLabeling:yAxisMeta?.find(data=>"axisLabeling"===data.name)?.defaultValueInternal??"Number",mainTickMinValue:yAxisMeta?.find(data=>"mainTickMinValue"===data.name)?.defaultValueInternal??0,mainTickMaxValue:yAxisMeta?.find(data=>"mainTickMaxValue"===data.name)?.defaultValueInternal??100,autoScaling:yAxisMeta?.find(data=>"autoScaling"===data.name)?.defaultValueInternal??!1,decimalPlaces:yAxisMeta?.find(data=>"decimalPlaces"===data.name)?.defaultValueInternal??2,showAxis:yAxisMeta?.find(data=>"showAxis"===data.name)?.defaultValueInternal??!0,showLabels:yAxisMeta?.find(data=>"showLabels"===data.name)?.defaultValueInternal??!0,showAxisName:yAxisMeta?.find(data=>"showAxisName"===data.name)?.defaultValueInternal??!0,axisName:yAxisMeta?.find(data=>"axisName"===data.name)?.defaultValueInternal??"y axis 1",axisNameFontFamily:yAxisMeta?.find(data=>"axisNameFontFamily"===data.name)?.defaultValueInternal??null,axisNameFontSize:yAxisMeta?.find(data=>"axisNameFontSize"===data.name)?.defaultValueInternal??15,axisNameFontSizeUnit:"px",axisNameFontWeight:yAxisMeta?.find(data=>"axisNameFontWeight"===data.name)?.defaultValueInternal??"Bold",unit:yAxisMeta?.find(data=>"unit"===data.name)?.defaultValueInternal??null,showAxisIfNoData:yAxisMeta?.find(data=>"showAxisIfNoData"===data.name)?.defaultValueInternal??!0}}__lineChart=(__runInitializers(this,_instanceExtraInitializers),null);__elementTemplateRoot;__elementChart;__elementTooltip;__elementTooltipText;__elementTooltipArrow;__elementLegend;__elementMenuBar;__elementMenuBarDropdown;__sectionsBackgroundColor;__yAxisWidth;__yLabelFontFamily;__yLabelFontSize;__yLabelFontWeight;__yMainTickSteps;__showYSubTicks;__ySubTickSteps;__showXAxis;__xLogarithmicScale;__xAxisLabeling;__xShowLabels;__xMainTickMinValue;__xMainTickMaxValue;__xMainTickSteps;__showXSubTicks;__xSubTickSteps;__xLabelFontFamily;__xLabelFontSize;__xLabelFontWeight;__xLabelFontColor;__xAxisWidth;__xAxisColor;__showXAxisName;__xAxisName;__xAxisNameFontFamily;__xAxisNameFontSize;__xAxisNameFontWeight;__xAxisNameFontColor;__xAxisDecimalPlaces;__xAxisUnit;__xAxisAutoScaling;__xAxisFormat;__yAxis;__yAxisInternal=[];__lineGraphDescriptions;__lineGraphDescriptionsInternal;__referenceLines;__referenceLinesPosition;__lineGraphData;__lineGraphDataInternal=null;__showGrid;__gridBackgroundColor;__gridShowHorizontalLines;__gridShowVerticalLines;__gridLineWidth;__gridLineStyle;__gridLineColor;__subgridShowHorizontalLines;__subgridShowVerticalLines;__subgridLineWidth;__subgridLineStyle;__subgridLineColor;__showTooltip;__tooltipFormat;__tooltipFontFamily;__tooltipFontSize;__tooltipFontWeight;__tooltipFontColor;__tooltipBackgroundColor;__legendFontFamily;__legendFontSize;__legendFontStyle;__legendFontWeight;__showLegend;__showMenuBar;__menuBarPosition;__tooltipInformation={show:!1,isActive:!1,lineGraph:null,points:[],referenceLine:void 0};__holdTimer=0;__holdTimerDuration=300;__storage;__activeLegendElements;__zoomingCanvasContext=null;__menubar;__stopMode={isStopped:!1,beginXAxisStart:0,beginXAxisEnd:0,beginYAxis:[],beginData:[],actualXAxisStart:0,actualXAxisEnd:0,actualYAxis:[],isManipulating:!1,isWheeling:!1,wheelSteps:0,wheelTimeout:0,mousePositionStart:{x:0,y:0},mousePositionEnd:{x:0,y:0},offset:{left:0,top:0},scale:{x:0,y:0},transform:{x:0,y:0},click:!0,multitouchMode:!1,first:{identifier:null},second:{identifier:null},distance:0,moveReferenceLine:!1,referenceLine:null};__mouseMode=MouseMode.None;__internalReferenceLines;__previnit(){if(this.__elementTemplateRoot=this.__element.find(".TcHmi_Controls_Beckhoff_TcHmiLineChart-template"),0===this.__elementTemplateRoot.length&&(this.__elementTemplateRoot=this.__element.find(".tchmi-line-chart-template")),this.__elementChart=this.__elementTemplateRoot.find(".TcHmi_Controls_Beckhoff_TcHmiLineChart-template-chart"),0===this.__elementChart.length&&(this.__elementChart=this.__elementTemplateRoot.find(".tchmi-line-chart-template-chart")),this.__elementTooltip=this.__elementTemplateRoot.find(".TcHmi_Controls_Beckhoff_TcHmiLineChart-template-tooltip"),0===this.__elementTooltip.length&&(this.__elementTooltip=this.__elementTemplateRoot.find(".tchmi-line-chart-template-tooltip")),this.__elementTooltipText=this.__elementTemplateRoot.find(".TcHmi_Controls_Beckhoff_TcHmiLineChart-template-tooltip-text"),0===this.__elementTooltipText.length&&(this.__elementTooltipText=this.__elementTemplateRoot.find(".tchmi-line-chart-template-tooltip-text")),this.__elementTooltipArrow=this.__elementTemplateRoot.find(".TcHmi_Controls_Beckhoff_TcHmiLineChart-template-tooltip-arrow"),0===this.__elementTooltipArrow.length&&(this.__elementTooltipArrow=this.__elementTemplateRoot.find(".tchmi-line-chart-template-tooltip-arrow")),this.__elementLegend=this.__elementTemplateRoot.find(".TcHmi_Controls_Beckhoff_TcHmiLineChart-template-legend"),this.__elementMenuBar=this.__elementTemplateRoot.find(".TcHmi_Controls_Beckhoff_TcHmiLineChart-template-menu-bar, .tchmi-textbox-template-menu-bar"),this.__elementMenuBarDropdown=$('<div class="TcHmi_Controls_Beckhoff_TcHmiLineChart-template-menu-bar-dropdown tchmi-box"></div>'),0===this.__elementTemplateRoot.length||0===this.__elementChart.length||0===this.__elementTooltip.length||0===this.__elementTooltipText.length||0===this.__elementTooltipArrow.length||0===this.__elementLegend.length||0===this.__elementMenuBar.length||0===this.__elementMenuBarDropdown.length)throw new Error("Invalid Template.html");if("undefined"==typeof TcHmiCharting)throw new Error("Missing needed TcHmiCharting library");super.__previnit()}__init(){super.__init(),this.__storage=new TcHmi.LocalStorage(this,{activeLegendElements:this.getCurrentGraphLength()}),this.__activeLegendElements=this.__storage.get("activeLegendElements"),this.__destroyOnDestroy.push(TcHmi.EventProvider.registerDomEvent(this.__elementLegend[0],"mousedown",this.__onCheckboxMouseDown),TcHmi.EventProvider.registerDomEvent(this.__elementLegend[0],"touchstart",this.__onCheckboxTouchStart))}__calcSizes(){let width=this.getRenderedWidth()??0,height=this.getRenderedHeight()??0,top=0,innerHeight=this.__elementChart.innerHeight(),outerHeight=this.__elementChart.outerHeight(!0),innerWidth=this.__elementChart.innerWidth();width-=this.__elementChart.outerWidth(!0)-innerWidth;let outerlegendHeight=this.__elementLegend.children().length>0?this.__elementLegend.outerHeight(!0):0,outerMenubarHeight=this.__elementMenuBar.outerHeight(!0);return this.__showMenuBar&&(height-=outerMenubarHeight,this.__menuBarPosition&&(MenuBarPosition[this.__menuBarPosition]===MenuBarPosition.Top?top=outerMenubarHeight:this.__showLegend&&(top=outerlegendHeight))),this.__showLegend?height=height-(outerHeight-innerHeight)-outerlegendHeight:height-=outerHeight-innerHeight,{width,height,top}}__attach(){super.__attach(),this.__destroyOnDetach.push(TcHmi.EventProvider.register(this.__id+".onResized",this.__rebuild),TcHmi.EventProvider.register("onThemeDataChanged",this.__rebuild),TcHmi.EventProvider.registerDomEvent(document,"mousemove",this.__onMouseMove),TcHmi.EventProvider.registerDomEvent(document,"mouseup",this.__onMouseUp),TcHmi.EventProvider.registerDomEvent(document,"touchmove",this.__onTouchMove,{passive:!1}),TcHmi.EventProvider.registerDomEvent(document,"touchend",this.__onTouchEnd,{passive:!1}));for(const[index,lineGraphDescriptionInternal]of this.__lineGraphDescriptionsInternal?.entries()??[])this.__activeLegendElements&&this.__activeLegendElements.includes(index)||!this.__activeLegendElements&&(lineGraphDescriptionInternal.defaultVisibility??1)?lineGraphDescriptionInternal.isSelected=!0:lineGraphDescriptionInternal.isSelected=!1;this.__yAxisInternal?.forEach(x=>{let lineGraphDesc=this.__lineGraphDescriptionsInternal?.find((value,index,obj)=>value.yAxisId===x.id);void 0===x.showAxisIfNoData&&TcHmiLineChart.yAxisDefaultValueInternals||!x.showAxisIfNoData&&void 0!==lineGraphDesc&&lineGraphDesc.isSelected||x.showAxisIfNoData?x.isSelected=!0:x.isSelected=!1}),this.__processShowLegend(),this.__processShowMenuBar(),this.__menubar?.calcMenuButtons(),this.__drawLineChart()}__detach(){super.__detach(),this.__holdTimer&&(window.clearTimeout(this.__holdTimer),this.__holdTimer=0),this.__stopMode.wheelTimeout&&(window.clearTimeout(this.__stopMode.wheelTimeout),this.__stopMode.wheelTimeout=0)}destroy(){this.__keepAlive||(super.destroy(),this.__menubar?.destroy())}__rebuild(_event,_control){this.__drawLineChart(),this.__menubar?.calcMenuButtons()}__drawLineChart(){this.__invisibleTooltip();let size=this.__calcSizes();if(0===size.width||0===size.height)return;if(this.__elementChart.css({height:`${size.height}px`,top:`${size.top}px`,width:`${size.width}px`}),null!==this.__lineChart){this.__lineChart.clear(size.width,size.height);let canvasZoomingElem=this.__elementChart[0].getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiLineChart-canvas-zooming");if(canvasZoomingElem.length>0){let deviceDPI=window.devicePixelRatio,htmlCanvas=canvasZoomingElem[0];htmlCanvas.classList.add("tchmi-no-pointer-events"),htmlCanvas.width=size.width*deviceDPI,htmlCanvas.height=size.height*deviceDPI;let context=htmlCanvas.getContext("2d");if(this.__zoomingCanvasContext=context,null!==context){let canvasWidth=htmlCanvas.width/window.devicePixelRatio,canvasHeight=htmlCanvas.height/window.devicePixelRatio;context.setTransform(1,0,0,1,0,0),context.clearRect(0,0,canvasWidth,canvasHeight),context.scale(deviceDPI,deviceDPI)}}}else{this.__lineChart=new TcHmiCharting.LineChart(this.__elementChart,size.width,size.height,TcHmi.ValueConverter.toEnum(this.__referenceLinesPosition,TcHmiCharting.IChart.Position,TcHmiCharting.IChart.Position.Background));let canvas=this.__lineChart.getCanvasDrawing();null!==canvas&&this.__destroyOnDetach.push(TcHmi.EventProvider.registerDomEvent(canvas[0],"click",this.__onClick),TcHmi.EventProvider.registerDomEvent(canvas[0],"mousemove",this.__onMouseMoveTooltip),TcHmi.EventProvider.registerDomEvent(canvas[0],"mousedown",this.__onMouseDown),TcHmi.EventProvider.registerDomEvent(canvas[0],"wheel",this.__onMouseWheel),TcHmi.EventProvider.registerDomEvent(canvas[0],"touchstart",this.__onTouchStart,{passive:!1}),TcHmi.EventProvider.registerDomEvent(canvas[0],"touchmove",this.__onTouchMove,{passive:!1}));let deviceDPI=window.devicePixelRatio,canvasZooming=this.__elementChart[0].getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiLineChart-canvas-zooming")[0];canvasZooming||(canvasZooming=document.createElement("canvas"),canvasZooming.classList.add("tchmi-no-pointer-events","TcHmi_Controls_Beckhoff_TcHmiLineChart-canvas-zooming"),canvasZooming.setAttribute("style","position:absolute;width:100%;height:100%;"),this.__elementChart[0].appendChild(canvasZooming)),canvasZooming.setAttribute("height",(size.height*deviceDPI).toString()),canvasZooming.setAttribute("width",(size.width*deviceDPI).toString()),this.__zoomingCanvasContext=canvasZooming.getContext("2d"),this.__zoomingCanvasContext&&this.__zoomingCanvasContext.scale(deviceDPI,deviceDPI)}this.__lineChart.addXAxis();let xAxis=this.__lineChart.getXAxis();null!==xAxis&&(xAxis.setLogarithmicScale(void 0===this.__xLogarithmicScale?this.getAttributeDefaultValueInternal("XLogarithmicScale"):this.__xLogarithmicScale),xAxis.setShowLabels(void 0===this.__xShowLabels?this.getAttributeDefaultValueInternal("XShowLabels"):this.__xShowLabels),xAxis.setXAxisCallback(this.__executeXAxisFormatFunction),xAxis.setShowAxis(void 0===this.__showXAxis?this.getAttributeDefaultValueInternal("ShowXAxis"):this.__showXAxis),xAxis.setAxisLabeling(AxisLabeling[this.__xAxisLabeling??this.getAttributeDefaultValueInternal("XAxisLabeling")]),xAxis.setShowSubTicks(void 0===this.__showXSubTicks?this.getAttributeDefaultValueInternal("ShowXSubTicks"):this.__showXSubTicks),xAxis.setShowAxisName(void 0===this.__showXAxisName?this.getAttributeDefaultValueInternal("ShowXAxisName"):this.__showXAxisName),TcHmi.isSolidColor(this.__xAxisColor)?xAxis.setAxisColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(this.__xAxisColor)):xAxis.setAxisColor(null),xAxis.setDecimalPlaces(void 0===this.__xAxisDecimalPlaces?this.getAttributeDefaultValueInternal("XAxisDecimalPlaces"):this.__xAxisDecimalPlaces),xAxis.setAxisName(void 0===this.__xAxisName?this.getAttributeDefaultValueInternal("XAxisName"):this.__xAxisName),TcHmi.isSolidColor(this.__xAxisNameFontColor)?xAxis.setAxisNameFontColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(this.__xAxisNameFontColor)):xAxis.setAxisNameFontColor(null),xAxis.setAxisNameFontFamily(this.__xAxisNameFontFamily),xAxis.setAxisNameFontSize(void 0===this.__xAxisNameFontSize?this.getAttributeDefaultValueInternal("XAxisNameFontSize"):this.__xAxisNameFontSize),xAxis.setAxisNameFontWeight(void 0===this.__xAxisNameFontWeight?this.getAttributeDefaultValueInternal("XAxisNameFontWeight"):this.__xAxisNameFontWeight),xAxis.setUnit(void 0===this.__xAxisUnit?this.getAttributeDefaultValueInternal("XAxisUnit"):this.__xAxisUnit),xAxis.setAxisWidth(void 0===this.__xAxisWidth?this.getAttributeDefaultValueInternal("XAxisWidth"):this.__xAxisWidth),TcHmi.isSolidColor(this.__xLabelFontColor)?xAxis.setLabelFontColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(this.__xLabelFontColor)):xAxis.setLabelFontColor(null),xAxis.setLabelFontFamily(this.__xLabelFontFamily),xAxis.setLabelFontSize(void 0===this.__xLabelFontSize?this.getAttributeDefaultValueInternal("XLabelFontSize"):this.__xLabelFontSize),xAxis.setLabelFontWeight(void 0===this.__xLabelFontWeight?this.getAttributeDefaultValueInternal("XLabelFontWeight"):this.__xLabelFontWeight),xAxis.setMainTickSteps(void 0===this.__xMainTickSteps?this.getAttributeDefaultValueInternal("XMainTickSteps"):this.__xMainTickSteps),xAxis.setSubTickSteps(void 0===this.__xSubTickSteps?this.getAttributeDefaultValueInternal("XSubTickSteps"):this.__xSubTickSteps),this.__stopMode.isStopped?(xAxis.setAutoScaling(!1),xAxis.setMainTickStartValue(this.__stopMode.actualXAxisStart),xAxis.setMainTickEndValue(this.__stopMode.actualXAxisEnd)):(xAxis.setAutoScaling(void 0===this.__xAxisAutoScaling?this.getAttributeDefaultValueInternal("XAxisAutoScaling"):this.__xAxisAutoScaling),xAxis.setMainTickStartValue(void 0===this.__xMainTickMinValue?this.getAttributeDefaultValueInternal("XMainTickMinValue"):this.__xMainTickMinValue),xAxis.setMainTickEndValue(void 0===this.__xMainTickMaxValue?this.getAttributeDefaultValueInternal("XMainTickMaxValue"):this.__xMainTickMaxValue)));let baseYAxis=this.__stopMode.isStopped?this.__stopMode.actualYAxis:this.__yAxisInternal;for(const[index,tempAxis]of baseYAxis?.entries()??[]){this.__lineChart.addYAxis(TcHmi.ValueConverter.toEnum(tempAxis.position,Position,TcHmiLineChart.yAxisDefaultValueInternals.position));let yAxis=this.__lineChart.getYAxisAtPosition(index);if(yAxis.setShowAxis(!!tempAxis.isSelected&&TcHmi.ValueConverter.toBoolean(tempAxis.showAxis,TcHmiLineChart.yAxisDefaultValueInternals.showAxis)),yAxis.setAutoScaling(TcHmi.ValueConverter.toBoolean(tempAxis.autoScaling,TcHmiLineChart.yAxisDefaultValueInternals.autoScaling)),TcHmi.isSolidColor(tempAxis.axisColor))yAxis.setAxisColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(tempAxis.axisColor));else{let themeLineColor=TcHmi.Theme.Resources.get(this,"YAxisAxisColor");TcHmi.isSolidColor(themeLineColor.value)?yAxis.setAxisColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(themeLineColor.value)):yAxis.setAxisColor(null)}if(yAxis.setAxisName(TcHmi.ValueConverter.toString(tempAxis.axisName,TcHmiLineChart.yAxisDefaultValueInternals.axisName)),TcHmi.isSolidColor(tempAxis.axisNameFontColor))yAxis.setAxisNameFontColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(tempAxis.axisNameFontColor));else{let themeAxisNameFontColor=TcHmi.Theme.Resources.get(this,"YAxisAxisNameFontColor");TcHmi.isSolidColor(themeAxisNameFontColor.value)?yAxis.setAxisNameFontColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(themeAxisNameFontColor.value)):yAxis.setAxisNameFontColor(null)}if(yAxis.setAxisNameFontFamily(TcHmi.ValueConverter.toFontFamily(tempAxis.axisNameFontFamily,TcHmiLineChart.yAxisDefaultValueInternals.axisNameFontFamily)),yAxis.setAxisNameFontSize(TcHmi.ValueConverter.toNumber(tempAxis.axisNameFontSize,TcHmiLineChart.yAxisDefaultValueInternals.axisNameFontSize)),yAxis.setAxisNameFontWeight(tempAxis.axisNameFontWeight??TcHmiLineChart.yAxisDefaultValueInternals.axisNameFontWeight),yAxis.setDecimalPlaces(TcHmi.ValueConverter.toNumber(tempAxis.decimalPlaces,TcHmiLineChart.yAxisDefaultValueInternals.decimalPlaces)),TcHmi.isSolidColor(tempAxis.labelFontColor))yAxis.setLabelFontColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(tempAxis.labelFontColor));else{let themeLabelFontColor=TcHmi.Theme.Resources.get(this,"YAxisLabelFontColor");TcHmi.isSolidColor(themeLabelFontColor.value)?yAxis.setLabelFontColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(themeLabelFontColor.value)):yAxis.setLabelFontColor(null)}yAxis.setLogarithmicScale(TcHmi.ValueConverter.toBoolean(tempAxis.logarithmicScale,TcHmiLineChart.yAxisDefaultValueInternals.logarithmicScale)),yAxis.setAxisLabeling(TcHmi.ValueConverter.toEnum(tempAxis.axisLabeling,AxisLabeling,TcHmiLineChart.yAxisDefaultValueInternals.axisLabeling)),yAxis.setMainTickStartValue(TcHmi.ValueConverter.toNumber(tempAxis.mainTickMinValue,TcHmiLineChart.yAxisDefaultValueInternals.mainTickMinValue)),yAxis.setMainTickEndValue(TcHmi.ValueConverter.toNumber(tempAxis.mainTickMaxValue,TcHmiLineChart.yAxisDefaultValueInternals.mainTickMaxValue)),yAxis.setShowLabels(TcHmi.ValueConverter.toBoolean(tempAxis.showLabels,TcHmiLineChart.yAxisDefaultValueInternals.showLabels)),yAxis.setShowAxisName(TcHmi.ValueConverter.toBoolean(tempAxis.showAxisName,TcHmiLineChart.yAxisDefaultValueInternals.showAxisName)),yAxis.setUnit(TcHmi.ValueConverter.toString(tempAxis.unit)),yAxis.setAxisWidth(void 0===this.__yAxisWidth?this.getAttributeDefaultValueInternal("YAxisWidth"):this.__yAxisWidth),yAxis.setLabelFontFamily(this.__yLabelFontFamily),yAxis.setLabelFontSize(void 0===this.__yLabelFontSize?this.getAttributeDefaultValueInternal("YLabelFontSize"):this.__yLabelFontSize),yAxis.setLabelFontWeight(void 0===this.__yLabelFontWeight?this.getAttributeDefaultValueInternal("YLabelFontWeight"):this.__yLabelFontWeight),yAxis.setMainTickSteps(void 0===this.__yMainTickSteps?this.getAttributeDefaultValueInternal("YMainTickSteps"):this.__yMainTickSteps),yAxis.setSubTickSteps(void 0===this.__ySubTickSteps?this.getAttributeDefaultValueInternal("YSubTickSteps"):this.__ySubTickSteps),yAxis.setShowSubTicks(void 0===this.__showYSubTicks?this.getAttributeDefaultValueInternal("ShowYSubTicks"):this.__showYSubTicks),tempAxis.format?yAxis.setYAxisCallback(value=>this.__executeYAxisFormatFunction(tempAxis.format??void 0,value)):yAxis.setYAxisCallback(null)}if(this.__showGrid){this.__lineChart.addGrid();let grid=this.__lineChart.getGrid();null!==grid&&(grid.setShowHorizontalLines(void 0===this.__gridShowHorizontalLines?this.getAttributeDefaultValueInternal("GridShowHorizontalLines"):this.__gridShowHorizontalLines),grid.setShowVerticalLines(void 0===this.__gridShowVerticalLines?this.getAttributeDefaultValueInternal("GridShowVerticalLines"):this.__gridShowVerticalLines),grid.setLineWidth(void 0===this.__gridLineWidth?this.getAttributeDefaultValueInternal("GridLineWidth"):this.__gridLineWidth),grid.setLineStyle(this.__gridLineStyle??this.getAttributeDefaultValueInternal("GridLineStyle")),TcHmi.isSolidColor(this.__gridLineColor)?grid.setLineColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(this.__gridLineColor)):grid.setLineColor(null),TcHmi.isSolidColor(this.__gridBackgroundColor)?grid.setBackgroundColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(this.__gridBackgroundColor)):grid.setBackgroundColor(null))}this.__lineChart.addSubgrid();let subgrid=this.__lineChart.getSubgrid();null!==subgrid&&(subgrid.setShowHorizontalLines(void 0===this.__subgridShowHorizontalLines?this.getAttributeDefaultValueInternal("SubgridShowHorizontalLines"):this.__subgridShowHorizontalLines),subgrid.setShowVerticalLines(void 0===this.__subgridShowVerticalLines?this.getAttributeDefaultValueInternal("SubgridShowVerticalLines"):this.__subgridShowVerticalLines),subgrid.setLineWidth(void 0===this.__subgridLineWidth?this.getAttributeDefaultValueInternal("SubgridLineWidth"):this.__subgridLineWidth),subgrid.setLineStyle(this.__subgridLineStyle??this.getAttributeDefaultValueInternal("SubgridLineStyle")),TcHmi.isSolidColor(this.__subgridLineColor)?subgrid.setLineColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(this.__subgridLineColor)):subgrid.setLineColor(null));let baseData=this.__stopMode.isStopped?this.__stopMode.beginData:this.__lineGraphDataInternal;if(this.__lineGraphDescriptionsInternal&&baseData){for(let i=0,ii=Math.min(this.__lineGraphDescriptionsInternal.length,baseData.length);i<ii;i++){const tempLineGraphDescription=this.__lineGraphDescriptionsInternal[i];if(this.__yAxisInternal&&tempLineGraphDescription.isSelected){let yAxisSelectedIndex=this.__yAxisInternal.findIndex(x=>x.id===tempLineGraphDescription.yAxisId);if(-1!==yAxisSelectedIndex){this.__lineChart.addGraph({points:baseData[i],yAxis:this.__lineChart.getYAxisAtPosition(yAxisSelectedIndex)});let lineGraph=this.__lineChart.getLineGraphsAtPosition(this.__lineChart.getLineGraphs().length-1);if(lineGraph){if(TcHmi.isSolidColor(tempLineGraphDescription.lineColor))lineGraph.setLineColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(tempLineGraphDescription.lineColor));else{let themeLineColor=TcHmi.Theme.Resources.get(this,"LineGraphDescriptionLineColor");TcHmi.isSolidColor(themeLineColor.value)?lineGraph.setLineColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(themeLineColor.value)):lineGraph.setLineColor(null)}if(null!==tempLineGraphDescription.lineWidth&&void 0!==tempLineGraphDescription.lineWidth?lineGraph.setLineWidth(TcHmi.ValueConverter.toNumber(tempLineGraphDescription.lineWidth)):lineGraph.setLineWidth(null),lineGraph.setPointDot(TcHmi.ValueConverter.toBoolean(tempLineGraphDescription.pointDot,!1)),TcHmi.isSolidColor(tempLineGraphDescription.pointDotFillColor))lineGraph.setPointDotFillColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(tempLineGraphDescription.pointDotFillColor));else{let themePointDotFillColor=TcHmi.Theme.Resources.get(this,"LineGraphDescriptionPointDotFillColor");TcHmi.isSolidColor(themePointDotFillColor.value)?lineGraph.setPointDotFillColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(themePointDotFillColor.value)):lineGraph.setPointDotFillColor(null)}if(null!==tempLineGraphDescription.pointDotRadius&&void 0!==tempLineGraphDescription.pointDotRadius?lineGraph.setPointDotRadius(TcHmi.ValueConverter.toNumber(tempLineGraphDescription.pointDotRadius)):lineGraph.setPointDotRadius(null),TcHmi.isSolidColor(tempLineGraphDescription.pointDotStrokeColor))lineGraph.setPointDotStrokeColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(tempLineGraphDescription.pointDotStrokeColor));else{let themePointDotStrokeColor=TcHmi.Theme.Resources.get(this,"LineGraphDescriptionPointDotStrokeColor");TcHmi.isSolidColor(themePointDotStrokeColor.value)?lineGraph.setPointDotStrokeColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(themePointDotStrokeColor.value)):lineGraph.setPointDotStrokeColor(null)}if(null!==tempLineGraphDescription.pointDotStrokeWidth&&void 0!==tempLineGraphDescription.pointDotStrokeWidth?lineGraph.setPointDotStrokeWidth(TcHmi.ValueConverter.toNumber(tempLineGraphDescription.pointDotStrokeWidth)):lineGraph.setPointDotStrokeWidth(null),lineGraph.setXScaleFactor(tempLineGraphDescription.xScaleFactor),lineGraph.setYScaleFactor(tempLineGraphDescription.yScaleFactor),lineGraph.setFillMode(TcHmi.ValueConverter.toEnum(tempLineGraphDescription.fillMode,FillMode,FillMode.None)),TcHmi.isSolidColor(tempLineGraphDescription.fillColor))lineGraph.setFillColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(tempLineGraphDescription.fillColor));else{let themeFillColor=TcHmi.Theme.Resources.get(this,"LineGraphDescriptionFillColor");TcHmi.isSolidColor(themeFillColor.value)?lineGraph.setFillColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(themeFillColor.value)):lineGraph.setPointDotStrokeColor(null)}if(lineGraph.setFillTransparency(TcHmi.ValueConverter.toNumber(tempLineGraphDescription.fillTransparency??50)),this.__internalReferenceLines){let referenceLine=this.__internalReferenceLines.find(x=>x.name===tempLineGraphDescription.fillModeReferenceLine&&TcHmi.ValueConverter.toEnum(x.orientation,Orientation,Orientation.Horizontal)===Orientation.Horizontal),yAxisSelectedIndex=this.__yAxisInternal.findIndex(x=>x.id===referenceLine?.yAxisId),yAxis=this.__lineChart.getYAxisAtPosition(yAxisSelectedIndex);referenceLine&&yAxis&&lineGraph.setFillModeReferenceLine({name:referenceLine.name,orientation:referenceLine.orientation,value:referenceLine.value,yAxis})}lineGraph.setColorRanges(tempLineGraphDescription.colorRanges)}}}}}for(const[index,tempReferenceLine]of this.__internalReferenceLines?.entries()??[]){this.__lineChart.addReferenceLine();let referenceLine=this.__lineChart.getReferenceLinesAtPosition(index);if(referenceLine.setName(tempReferenceLine.name),referenceLine.setShow(TcHmi.ValueConverter.toBoolean(tempReferenceLine.show,!0)),referenceLine.setYAxisId(TcHmi.ValueConverter.toNumber(tempReferenceLine.yAxisId)),referenceLine.setValue(TcHmi.ValueConverter.toNumber(tempReferenceLine.value)),referenceLine.setLocked(TcHmi.ValueConverter.toBoolean(tempReferenceLine.locked,!0)),referenceLine.setShowTooltip(TcHmi.ValueConverter.toBoolean(tempReferenceLine.showTooltip,!1)),referenceLine.setHighlightDataPoints(TcHmi.ValueConverter.toBoolean(tempReferenceLine.highlightDataPoints,!1)),referenceLine.setValueUnit(TcHmi.ValueConverter.toEnum(tempReferenceLine.valueUnit,ValueUnit,ValueUnit.Value)),referenceLine.setOrientation(TcHmi.ValueConverter.toEnum(tempReferenceLine.orientation,Orientation,Orientation.Horizontal)),TcHmi.isSolidColor(tempReferenceLine.color))referenceLine.setColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(tempReferenceLine.color));else{let themeLineColor=TcHmi.Theme.Resources.get(this,"ReferenceLineColor");TcHmi.isSolidColor(themeLineColor.value)?referenceLine.setColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(themeLineColor.value)):referenceLine.setColor(null)}referenceLine.setLineWidth(TcHmi.ValueConverter.toNumber(tempReferenceLine.lineWidth)),referenceLine.setShowLabel(TcHmi.ValueConverter.toBoolean(tempReferenceLine.showLabel,!0)),referenceLine.setLabelHorizontalAlignment(TcHmi.ValueConverter.toHorizontalAlignment(tempReferenceLine.labelHorizontalAlignment||null)),referenceLine.setLabelVerticalAlignment(TcHmi.ValueConverter.toVerticalAlignment(tempReferenceLine.labelVerticalAlignment||null)),referenceLine.setLabelFontFamily(this.__xAxisNameFontFamily),referenceLine.setLabelFontSize(TcHmi.ValueConverter.toNumber(tempReferenceLine.labelFontSize)),referenceLine.setLabelFontWeight(TcHmi.ValueConverter.toFontWeight(tempReferenceLine.labelFontWeight||null))}this.__lineChart.setYAxisWidth(void 0===this.__yAxisWidth?this.getAttributeDefaultValueInternal("YAxisWidth"):this.__yAxisWidth),this.__lineChart.setYLabelFontFamily(this.__yLabelFontFamily),this.__lineChart.setYLabelFontSize(void 0===this.__yLabelFontSize?this.getAttributeDefaultValueInternal("YLabelFontSize"):this.__yLabelFontSize),this.__lineChart.setYLabelFontWeight(void 0===this.__yLabelFontWeight?this.getAttributeDefaultValueInternal("YLabelFontWeight"):this.__yLabelFontWeight),this.__lineChart.setYMainTickSteps(void 0===this.__yMainTickSteps?this.getAttributeDefaultValueInternal("YMainTickSteps"):this.__yMainTickSteps),this.__lineChart.setYSubTickSteps(void 0===this.__ySubTickSteps?this.getAttributeDefaultValueInternal("YSubTickSteps"):this.__ySubTickSteps),this.__lineChart.setShowYSubTicks(void 0===this.__showYSubTicks?this.getAttributeDefaultValueInternal("ShowYSubTicks"):this.__showYSubTicks),this.__lineChart.draw()}__createLegend(useOldElements=!1){let legendChildsLength=this.__elementLegend.children().length;if(!useOldElements||this.__lineGraphDataInternal&&legendChildsLength!==this.__lineGraphDataInternal.length){if(this.__elementLegend.children().remove(),this.__showLegend&&(TcHmi.StyleProvider.setSimpleElementStyle(this.__elementLegend,"display",""),this.__lineGraphDataInternal&&this.__lineGraphDescriptions&&this.__lineGraphDescriptions.length>0&&this.__lineGraphDataInternal.length>0)){for(let i=0,ii=Math.min(this.__lineGraphDescriptions.length,this.__lineGraphDataInternal.length);i<ii;i++){let label=document.createElement("label");label.setAttribute("class","TcHmi_Controls_Beckhoff_TcHmiLineChart-template-legend-checkbox-label"),this.__legendFontFamily&&(label.style.fontFamily=this.__legendFontFamily),this.__legendFontSize&&(label.style.fontSize=this.__legendFontSize+"px"),this.__legendFontStyle&&(label.style.fontStyle=this.__legendFontStyle),this.__legendFontWeight&&(label.style.fontWeight=this.__legendFontWeight);let checkbox=document.createElement("input");checkbox.setAttribute("type","checkbox"),checkbox.setAttribute("id",this.__id+"Element"+i),checkbox.setAttribute("class","TcHmi_Controls_Beckhoff_TcHmiLineChart-template-legend-checkbox");let color=document.createElement("div");if(color.setAttribute("class","TcHmi_Controls_Beckhoff_TcHmiLineChart-template-legend-checkbox-color-element"),color.setAttribute("style","background-color: "+this.__lineGraphDescriptions[i].lineColor?.color+";"),label.append(checkbox),label.append(color),this.__lineGraphDescriptions&&this.__lineGraphDescriptions[i]&&this.__lineGraphDescriptions[i].legendName){let text=document.createTextNode(this.__lineGraphDescriptions[i].legendName);label.appendChild(text)}else{let text=document.createTextNode("["+i+"]");label.appendChild(text)}this.__elementLegend.append(label),this.__activeLegendElements?this.__activeLegendElements.includes(i)?checkbox.checked=!0:checkbox.checked=!1:this.__lineGraphDescriptions?.[i]?checkbox.checked=this.__lineGraphDescriptions[i].defaultVisibility??!0:checkbox.checked=!1}return}TcHmi.StyleProvider.setSimpleElementStyle(this.__elementLegend,"display","none")}}__createInternals(){this.__lineGraphDescriptionsInternal=[];for(const[index,lineGraphDescription]of this.__lineGraphDescriptions?.entries()??[]){let cloneLineGraphDescription={...tchmi_clone_object(lineGraphDescription),isSelected:!0};for(const[indexColor,colorRangeObj]of cloneLineGraphDescription.colorRanges?.entries()??[]){let colorRange=tchmi_clone_object(colorRangeObj);if(!TcHmi.isSolidColor(colorRange.color)){let themeColorRangeColor=TcHmi.Theme.Resources.get(this,"DefaultColorRangeColor");TcHmi.isSolidColor(themeColorRangeColor.value)&&(colorRange.color=themeColorRangeColor.value)}if(!TcHmi.isSolidColor(colorRange.fillColor)){let themeFillColorRangeColor=TcHmi.Theme.Resources.get(this,"DefaultFillColorRangeColor");TcHmi.isSolidColor(themeFillColorRangeColor.value)&&(colorRange.fillColor=themeFillColorRangeColor.value)}if(colorRange.expression){let filterInstance=new TcHmi.FilterInstance(colorRange.expression),compile=filterInstance.compile();compile.error!==TcHmi.Errors.NONE?TcHmi.Log.Controls.error(this,TcHmiLineChart.#tchmiFQN,{Attribute:"Filter"},`Error while compiling filter: ${TcHmi.Log.buildMessage(compile.details)}`):colorRange.filterInstance=filterInstance,cloneLineGraphDescription.colorRanges&&cloneLineGraphDescription.colorRanges[indexColor]&&(cloneLineGraphDescription.colorRanges[indexColor]=colorRange)}}!this.__showLegend||this.__activeLegendElements&&this.__activeLegendElements.includes(index)||!this.__activeLegendElements&&(cloneLineGraphDescription.defaultVisibility??1)?cloneLineGraphDescription.isSelected=!0:cloneLineGraphDescription.isSelected=!1,this.__lineGraphDescriptionsInternal.push(cloneLineGraphDescription)}this.__yAxisInternal=[],this.__yAxis?.forEach(x=>{let lineGraphDesc=this.__lineGraphDescriptionsInternal?.find((value,index,obj)=>value.yAxisId===x.id);if(void 0===x.showAxisIfNoData&&TcHmiLineChart.yAxisDefaultValueInternals||!x.showAxisIfNoData&&void 0!==lineGraphDesc&&lineGraphDesc.isSelected||x.showAxisIfNoData){let copy={...tchmi_clone_object(x),isSelected:!0};this.__yAxisInternal?.push(copy)}else{let copy={...tchmi_clone_object(x),isSelected:!1};this.__yAxisInternal?.push(copy)}}),this.__attributesInitialized&&!this.__stopMode.isStopped&&(this.__createLegend(),this.setSectionsPositions(),this.__drawLineChart())}setSectionsPositions(){this.__isAttached&&(this.__menuBarPosition&&this.__showMenuBar?MenuBarPosition.Bottom===MenuBarPosition[this.__menuBarPosition]?this.__showMenuBar&&(this.__elementMenuBar[0].classList.add("TcHmi_Controls_Beckhoff_TcHmiLineChart-template-menu-bar-bottom","tchmi-line-chart-template-menu-bar-bottom"),this.__elementMenuBar[0].classList.remove("TcHmi_Controls_Beckhoff_TcHmiLineChart-template-menu-bar-top","tchmi-line-chart-template-menu-bar-top"),this.__showLegend&&(this.__elementLegend[0].classList.add("TcHmi_Controls_Beckhoff_TcHmiLineChart-template-legend-top"),this.__elementLegend[0].classList.remove("TcHmi_Controls_Beckhoff_TcHmiLineChart-template-legend-bottom"))):(this.__elementMenuBar[0].classList.add("TcHmi_Controls_Beckhoff_TcHmiLineChart-template-menu-bar-top","tchmi-line-chart-template-menu-bar-top"),this.__elementMenuBar[0].classList.remove("TcHmi_Controls_Beckhoff_TcHmiLineChart-template-menu-bar-bottom","tchmi-line-chart-template-menu-bar-bottom"),this.__showLegend&&(this.__elementLegend[0].classList.add("TcHmi_Controls_Beckhoff_TcHmiLineChart-template-legend-bottom"),this.__elementLegend[0].classList.remove("TcHmi_Controls_Beckhoff_TcHmiLineChart-template-legend-top"))):this.__showLegend&&(this.__elementLegend[0].classList.add("TcHmi_Controls_Beckhoff_TcHmiLineChart-template-legend-bottom"),this.__elementLegend[0].classList.remove("TcHmi_Controls_Beckhoff_TcHmiLineChart-template-legend-top")))}getCurrentGraphLength(){return this.__lineGraphDataInternal?this.__lineGraphDataInternal.length:0}__onCheckboxMouseDown(event){if(1!==event.which)return;let childElement=event.target,checkboxElem=null;if(childElement.classList.contains("TcHmi_Controls_Beckhoff_TcHmiLineChart-template-legend-checkbox"))checkboxElem=childElement;else if(childElement.classList.contains("TcHmi_Controls_Beckhoff_TcHmiLineChart-template-legend-checkbox-label")){let checkboxList=childElement.getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiLineChart-template-legend-checkbox");checkboxList&&checkboxList.length>0&&(checkboxElem=checkboxList[0])}else if(childElement.classList.contains("TcHmi_Controls_Beckhoff_TcHmiLineChart-template-legend-checkbox-color-element")&&childElement&&childElement.parentElement){let checkboxList=childElement.parentElement.getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiLineChart-template-legend-checkbox");checkboxList&&checkboxList.length>0&&(checkboxElem=checkboxList[0])}if(checkboxElem){let checked=!checkboxElem.checked,id=checkboxElem.id,elementIndex=parseInt(id.replace(this.__id+"Element",""),10);if(!TcHmi.Access.checkAccess(this,"operate"))return void(checkboxElem.checked=checked);let children=this.__elementLegend.children(),activeLegendElements=[];for(let i=0,ii=children.length;i<ii;i++){let checkedCheckbox=children[i].childNodes[0].checked;i===elementIndex&&(checkedCheckbox=!checkedCheckbox,checkedCheckbox&&this.__lineGraphDescriptionsInternal?this.__lineGraphDescriptionsInternal[i].isSelected=!0:this.__lineGraphDescriptionsInternal&&(this.__lineGraphDescriptionsInternal[i].isSelected=!1)),checkedCheckbox&&activeLegendElements.push(i)}this.__yAxisInternal?.forEach(x=>{let lineGraphDesc=this.__lineGraphDescriptionsInternal?.find((value,index,obj)=>value.yAxisId===x.id&&value.isSelected);void 0===x.showAxisIfNoData&&TcHmiLineChart.yAxisDefaultValueInternals||!x.showAxisIfNoData&&void 0!==lineGraphDesc||x.showAxisIfNoData?x.isSelected=!0:x.isSelected=!1}),this.__stopMode.isStopped&&(this.__stopMode.beginYAxis.forEach(y=>{let yInternal=this.__yAxisInternal.find(x=>x.id===y.id);y.isSelected=yInternal?.isSelected??!1}),this.__stopMode.actualYAxis.forEach(y=>{let yInternal=this.__yAxisInternal.find(x=>x.id===y.id);y.isSelected=yInternal?.isSelected??!1,y.showAxis=!!y.isSelected&&TcHmi.ValueConverter.toBoolean(yInternal?.showAxis,TcHmiLineChart.yAxisDefaultValueInternals.showAxis)})),this.__activeLegendElements=activeLegendElements,this.__storage?.set("activeLegendElements",activeLegendElements),this.__drawLineChart()}}__onCheckboxTouchStart(event){let childElement=event.target;if(childElement){let checkboxList=childElement.getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiLineChart-template-legend-checkbox");if(checkboxList&&checkboxList.length>0){let checkoboxElement=checkboxList[0],id=checkoboxElement.id,checked=!checkoboxElement.checked,elementIndex=parseInt(id.replace(this.__id+"Element",""),10);if(!TcHmi.Access.checkAccess(this,"operate"))return void(checkoboxElement.checked=checked);let activeLegendElements=[],children=this.__elementLegend.children();for(let i=0,ii=children.length;i<ii;i++){let checkedCheckbox=children[i].childNodes[0].checked;i===elementIndex&&(checkedCheckbox=!checkedCheckbox,checkedCheckbox&&this.__lineGraphDescriptionsInternal?this.__lineGraphDescriptionsInternal[i].isSelected=!0:this.__lineGraphDescriptionsInternal&&(this.__lineGraphDescriptionsInternal[i].isSelected=!1)),checkedCheckbox&&activeLegendElements.push(i)}this.__yAxisInternal?.forEach(x=>{let lineGraphDesc=this.__lineGraphDescriptionsInternal?.find((value,index,obj)=>value.yAxisId===x.id&&value.isSelected);void 0===x.showAxisIfNoData&&TcHmiLineChart.yAxisDefaultValueInternals||!x.showAxisIfNoData&&void 0!==lineGraphDesc||x.showAxisIfNoData?x.isSelected=!0:x.isSelected=!1}),this.__stopMode.isStopped&&(this.__stopMode.beginYAxis.forEach(y=>{let yInternal=this.__yAxisInternal.find(x=>x.id===y.id);y.isSelected=yInternal?.isSelected??!1}),this.__stopMode.actualYAxis.forEach(y=>{let yInternal=this.__yAxisInternal.find(x=>x.id===y.id);y.isSelected=yInternal?.isSelected??!1,y.showAxis=!!y.isSelected&&TcHmi.ValueConverter.toBoolean(yInternal?.showAxis,TcHmiLineChart.yAxisDefaultValueInternals.showAxis)})),this.__activeLegendElements=activeLegendElements,this.__storage?.set("activeLegendElements",activeLegendElements),this.__drawLineChart()}}}__onClick(event){if(!this.__stopMode.isManipulating&&this.__lineChart){if(this.__stopMode.click&&null!==event.currentTarget){const target=event.target;if(target.classList.contains("TcHmi_Controls_Beckhoff_Controls-chart-canvas-drawing")){let parentId=null;if(null!==target.parentElement&&null!==target.parentElement.parentElement&&null!==target.parentElement.parentElement.parentElement&&(parentId=target.parentElement.parentElement.parentElement.id),parentId===this.__id){let coords=this.__transformEventCoords(event.clientX,event.clientY,event.target);if(this.__createTooltip(coords.x,coords.y,!0,!1),this.__tooltipInformation.isActive)return}}else this.__elementTooltip.css("visibility","hidden"),this.__tooltipInformation={show:!1,isActive:!1,lineGraph:null,points:[],referenceLine:void 0}}this.__stopMode.click=!0}}__onMouseDown(event){if(this.resetManipulation(),!this.__stopMode.isStopped||this.__stopMode.isManipulating||!this.getIsEnabled())return;if(null===event.target)return;let coords=this.__transformEventCoords(event.clientX,event.clientY,event.target);this.__stopMode.mousePositionStart={x:coords.x,y:coords.y},this.__userInteractionStart(coords.x,coords.y)}__onMouseMove(event){if(!this.__stopMode.isStopped||!this.__stopMode.isManipulating)return;let coords=this.__transformEventCoords(event.clientX,event.clientY);this.__userInteractionMove(coords.x,coords.y)}__onMouseUp(_event){this.__stopMode.isStopped&&this.__stopMode.isManipulating?this.__userInteractionEnd():this.resetManipulation()}__onMouseMoveTooltip(event){if((this.__stopMode.isManipulating&&this.__stopMode.referenceLine||!this.__stopMode.isManipulating)&&!this.__tooltipInformation.isActive&&this.__showTooltip){let offsetX=event.offsetX,offsetY=event.offsetY;requestAnimationFrame(()=>{this.__createTooltip(offsetX,offsetY,!1,!1)}),this.__invisibleTooltip()}}__onMouseWheel(event){if(this.__stopMode.isManipulating)return;if(!this.__lineChart)return;let basicYAxis=this.__lineChart.getYAxisAtPosition(0);if(!basicYAxis)return;let yAxisWidth=basicYAxis.getAxisWidth();if(!yAxisWidth)return;let boundingRect=event.target.getBoundingClientRect(),x=event.clientX-boundingRect.left,y=event.clientY-boundingRect.top,offsetTop=basicYAxis.getDiffEndLabelAndLine()+yAxisWidth/2+5+this.__lineChart.getDrawingBorder(),xAxis=this.__lineChart.getXAxis(),offsetLeft=0;null!==xAxis&&(offsetLeft=xAxis.getXAxisLeftWidth()??0);let xLineWidth=0;null!==xAxis&&(xLineWidth=xAxis.getLineWidth());let delta,yLineHeight=basicYAxis.getLineHeight();if(!(x<offsetLeft||x>offsetLeft+xLineWidth||y<offsetTop||y>offsetTop+yLineHeight||(this.__stopMode.isWheeling=!0,this.__stopMode.mousePositionStart={x,y},this.__stopMode.wheelTimeout))){switch(event.deltaMode){case WheelEvent.DOM_DELTA_PAGE:delta=800*-event.deltaY;break;case WheelEvent.DOM_DELTA_LINE:delta=40*-event.deltaY;break;case WheelEvent.DOM_DELTA_PIXEL:default:delta=-event.deltaY}delta=Math.max(-1,Math.min(1,delta)),this.__stopMode.wheelSteps=this.__stopMode.wheelSteps+delta,this.__stopMode.wheelTimeout=setTimeout(()=>{if(null!==xAxis){let start=xAxis.getMainTickStartValue()??0,end=xAxis.getMainTickEndValue()??0,timespan=end-start,deka=Math.floor(Math.log(timespan)/Math.LN10),newTimespan=timespan*((timespan-delta*Math.pow(10,deka-1)*2)/timespan);newTimespan<1&&(newTimespan=1);let endTimespanMilliSec=0;if(null!==start&&null!==end){endTimespanMilliSec=end-start;let factor=newTimespan/endTimespanMilliSec;if(start+=(endTimespanMilliSec-newTimespan)*((this.__stopMode.mousePositionStart.x-offsetLeft)/xLineWidth),this.__stopMode.actualXAxisStart=start,this.__stopMode.actualXAxisEnd=start+newTimespan,this.__mouseMode===MouseMode.PanXY||this.__mouseMode===MouseMode.ZoomXY){if(this.__lineChart){let yAxis=this.__lineChart.getYAxis();for(const[index,axis]of yAxis?.entries()??[]){let min=axis.getMainTickStartValueOverride()??axis.getMainTickStartValue()??0,max=axis.getMainTickEndValueOverride()??axis.getMainTickEndValue()??0,diff=max-min,newDiff=diff*factor;max-=(diff-newDiff)*((this.__stopMode.mousePositionStart.y-offsetTop)/yLineHeight),min=max-newDiff,this.__stopMode.actualYAxis[index].autoScaling=!1,this.__stopMode.actualYAxis[index].mainTickMaxValue=max,this.__stopMode.actualYAxis[index].mainTickMinValue=min}}}else if(this.__lineChart){let yAxis=this.__lineChart.getYAxis();for(const[index,axis]of yAxis?.entries()??[])if(axis.getAutoScaling()){let startOverride=axis.getMainTickStartValueOverride(),endOverride=axis.getMainTickEndValueOverride();null!==startOverride&&(this.__stopMode.actualYAxis[index].mainTickMinValue=startOverride),null!==endOverride&&(this.__stopMode.actualYAxis[index].mainTickMaxValue=endOverride),this.__stopMode.actualYAxis[index].autoScaling=!1}}this.__drawLineChart()}}this.__stopMode.wheelTimeout&&(clearTimeout(this.__stopMode.wheelTimeout),this.__stopMode.wheelTimeout=0),this.resetManipulation()},400)}}__onTouchStart(event){if(this.resetManipulation(),!this.__lineChart||!this.getIsEnabled())return;if(event.preventDefault(),event.touches.length>1)return void this.__userMultitouchStart(event);let touch=event.touches[0],coords=this.__transformEventCoords(touch.clientX,touch.clientY,event.target);this.__stopMode.mousePositionStart={x:coords.x,y:coords.y},this.__holdTimer&&clearTimeout(this.__holdTimer),this.__holdTimer=setTimeout(()=>{this.__stopMode.multitouchMode||this.__createTooltip(coords.x,coords.y,!1,!0)},this.__holdTimerDuration),this.__stopMode.isManipulating||this.__userInteractionStart(coords.x,coords.y)}__onTouchMove(event){if(!this.__stopMode.isStopped)return;if(this.__stopMode.multitouchMode)return event.preventDefault(),void this.__userMultitouchMove(event);if(!this.__stopMode.isManipulating)return;let touch=event.touches[0],coords=this.__transformEventCoords(touch.clientX,touch.clientY);Math.sqrt(Math.pow(this.__stopMode.mousePositionStart.x-coords.x,2)+Math.pow(this.__stopMode.mousePositionStart.y-coords.y,2))>5&&(this.__holdTimer&&(clearTimeout(this.__holdTimer),this.__holdTimer=0),this.__userInteractionMove(coords.x,coords.y))}__onTouchEnd(event){if(this.__stopMode.multitouchMode)return event.preventDefault(),void this.__userMultitouchEnd(event);if(this.__holdTimer&&(clearTimeout(this.__holdTimer),this.__holdTimer=0),this.__stopMode.isManipulating){let touch=event.changedTouches[0],coords=this.__transformEventCoords(touch.clientX,touch.clientY);Math.sqrt(Math.pow(this.__stopMode.mousePositionStart.x-coords.x,2)+Math.pow(this.__stopMode.mousePositionStart.y-coords.y,2))>5?this.__userInteractionEnd():this.resetManipulation()}}__userMultitouchStart(event){if(this.resetManipulation(),this.__zoomingCanvasContext){let canvasWidth=this.__zoomingCanvasContext.canvas.width/window.devicePixelRatio,canvasHeight=this.__zoomingCanvasContext.canvas.height/window.devicePixelRatio;this.__zoomingCanvasContext.clearRect(0,0,canvasWidth,canvasHeight)}if(!this.__lineChart)return;let basicYAxis=this.__lineChart.getYAxisAtPosition(0);if(!basicYAxis)return;let yAxisWidth=basicYAxis.getAxisWidth();if(!yAxisWidth)return;let offsetTop=basicYAxis.getDiffEndLabelAndLine()+yAxisWidth/2+5+this.__lineChart.getDrawingBorder(),xAxis=this.__lineChart.getXAxis(),offsetLeft=0;null!==xAxis&&(offsetLeft=xAxis.getXAxisLeftWidth()??0);let xLineWidth=0;null!==xAxis&&(xLineWidth=xAxis.getLineWidth());let yLineHeight=basicYAxis.getLineHeight(),coords1=this.__transformEventCoords(event.touches[0].clientX,event.touches[0].clientY,event.target),coords2=this.__transformEventCoords(event.touches[1].clientX,event.touches[1].clientY,event.target);if(coords1.x<offsetLeft||coords1.x>offsetLeft+xLineWidth||coords1.y<offsetTop||coords1.y>offsetTop+yLineHeight)return;if(coords2.x<offsetLeft||coords2.x>offsetLeft+xLineWidth||coords2.y<offsetTop||coords2.y>offsetTop+yLineHeight)return;this.__stopMode.first.identifier=event.touches[0].identifier,this.__stopMode.second.identifier=event.touches[1].identifier,this.__stopMode.multitouchMode=!0;let xDiff=coords1.x-coords2.x,yDiff=coords1.y-coords2.y;this.__stopMode.distance=Math.sqrt(xDiff*xDiff+yDiff*yDiff)}__userMultitouchMove(event){if(!this.__stopMode.multitouchMode||!this.__lineChart)return;let coords1=this.__transformEventCoords(event.touches[0].clientX,event.touches[0].clientY),coords2=this.__transformEventCoords(event.touches[1].clientX,event.touches[1].clientY),xDiff=coords1.x-coords2.x,yDiff=coords1.y-coords2.y,newDistance=Math.sqrt(xDiff*xDiff+yDiff*yDiff),p=1-this.__stopMode.distance/newDistance;if(0===p)return;let direction=p>0?1:-1,xAxis=this.__lineChart.getXAxis();if(!xAxis)return;let start=xAxis.getMainTickStartValue()??0,diff=(xAxis.getMainTickEndValue()??0)-start,deka=Math.floor(Math.log(diff)/Math.LN10),newDiff=diff*((diff-direction*Math.pow(10,deka-1)*1.5)/diff);newDiff<1&&(newDiff=1);let middlePoint={x:0,y:0};middlePoint.x=Math.round((coords1.x+coords2.x)/2),middlePoint.y=Math.round((coords1.y+coords2.y)/2);let basicYAxis=this.__lineChart.getYAxisAtPosition(0);if(basicYAxis){let yAxisWidth=basicYAxis.getAxisWidth();if(null!==yAxisWidth){let offsetTop=basicYAxis.getDiffEndLabelAndLine()+yAxisWidth/2+5+this.__lineChart.getDrawingBorder(),xAxis=this.__lineChart.getXAxis(),offsetLeft=0;null!==xAxis&&(offsetLeft=xAxis.getXAxisLeftWidth()??0);let xLineWidth=0;null!==xAxis&&(xLineWidth=xAxis.getLineWidth());let yLineHeight=basicYAxis.getLineHeight();if(null!==xAxis){let start=xAxis.getMainTickStartValue(),end=xAxis.getMainTickEndValue(),endTimespanMilliSec=0;if(null!==start&&null!==end){endTimespanMilliSec=end-start;let factor=newDiff/endTimespanMilliSec;if(start+=(endTimespanMilliSec-newDiff)*((middlePoint.x-offsetLeft)/xLineWidth),end=start+newDiff,this.__stopMode.actualXAxisStart=start,this.__stopMode.actualXAxisEnd=end,this.__mouseMode===MouseMode.PanXY||this.__mouseMode===MouseMode.ZoomXY){let yAxis=this.__lineChart.getYAxis();for(const[index,axis]of yAxis?.entries()??[]){let min=axis.getMainTickStartValueOverride()??axis.getMainTickStartValue()??0,max=axis.getMainTickEndValueOverride()??axis.getMainTickEndValue()??0,diff=max-min,newYDiff=diff*factor,yDisplacement=(diff-newYDiff)*((middlePoint.y-offsetTop)/yLineHeight);this.__stopMode.actualYAxis[index]&&(this.__stopMode.actualYAxis[index].autoScaling=!1,this.__stopMode.actualYAxis[index].mainTickMaxValue=max-yDisplacement,this.__stopMode.actualYAxis[index].mainTickMinValue=max-newYDiff)}}else{let yAxis=this.__lineChart.getYAxis();for(const[index,axis]of yAxis?.entries()??[])if(axis.getAutoScaling()&&this.__stopMode.actualYAxis[index]){let startOverride=axis.getMainTickStartValueOverride(),endOverride=axis.getMainTickEndValueOverride();null!==startOverride&&(this.__stopMode.actualYAxis[index].mainTickMinValue=startOverride),null!==endOverride&&(this.__stopMode.actualYAxis[index].mainTickMaxValue=endOverride),this.__stopMode.actualYAxis[index].autoScaling=!1}}this.__drawLineChart()}}}}this.__stopMode.distance=newDistance}__userMultitouchEnd(event){if(this.__stopMode.multitouchMode)for(const touch of event.changedTouches??[])if(touch.identifier===this.__stopMode.first.identifier||touch.identifier===this.__stopMode.second.identifier)return void this.resetManipulation()}__createTooltip(offsetX,offsetY,activate,fromTouch){fromTouch&&(this.__holdTimer&&(clearTimeout(this.__holdTimer),this.__holdTimer=0),this.resetManipulation()),this.__zoomingCanvasContext&&this.__zoomingCanvasContext.clearRect(0,0,this.__zoomingCanvasContext.canvas.width,this.__zoomingCanvasContext.canvas.height),this.__elementTooltip.css("visibility","hidden"),this.__tooltipInformation={show:!1,isActive:!1,points:[],lineGraph:null,referenceLine:void 0};let touchRadius=fromTouch?10:0;if(!this.__lineChart)return;let basicYAxis=this.__lineChart.getYAxisAtPosition(0);if(!basicYAxis)return;let yAxisWidth=basicYAxis.getAxisWidth();if(!yAxisWidth)return;let drawingBorder=this.__lineChart.getDrawingBorder(),offsetTopCharting=0;this.__elementChart&&this.__elementChart[0]&&(offsetTopCharting=this.__elementChart[0].offsetTop);let offsetTop=basicYAxis.getDiffEndLabelAndLine()+yAxisWidth/2+5+drawingBorder,xAxis=this.__lineChart.getXAxis(),offsetLeft=0;if(!xAxis)return;offsetLeft=xAxis.getXAxisLeftWidth();let yAxis=this.__lineChart.getYAxis();if(!yAxis)return;let yAxisHeight=yAxis[0].getLineHeight();if(offsetX>=offsetLeft-touchRadius&&offsetX<=offsetLeft+xAxis.getLineWidth()+touchRadius&&offsetY>=offsetTop-touchRadius&&offsetY<=offsetTop+yAxisHeight+touchRadius){let pointTooltips=[],lineGraphs=this.__lineChart.getLineGraphs(),lineGraphId=0;for(const[index,trendLineGraphDescription]of this.__lineGraphDescriptionsInternal?.entries()??[])if(null!==trendLineGraphDescription&&lineGraphs[lineGraphId]){let lineGraph=lineGraphs[lineGraphId],dotRadius=lineGraph.getPointDotRadius();if(null!==dotRadius&&lineGraph.getPointDot())for(const point of lineGraph.getPoints()??[]){let distance,isCorrect;if(fromTouch?(distance=Math.sqrt(Math.pow(offsetX-point.xPosition,2)+Math.pow(offsetY-point.yPosition,2)),isCorrect=distance<=touchRadius+dotRadius):isCorrect=point.xPosition-dotRadius<=offsetX&&offsetX<=point.xPosition+dotRadius&&point.yPosition-dotRadius<=offsetY&&point.yPosition+dotRadius>=offsetY,fromTouch&&isCorrect||!fromTouch&&isCorrect){let yAxis=null;if(trendLineGraphDescription)for(const axis of this.__yAxisInternal??[])if(axis.id===trendLineGraphDescription.yAxisId){yAxis=axis;break}yAxis&&pointTooltips.push({yAxis,coordinates:{x:point.xPosition,y:point.yPosition},values:{x:point.xValue,y:point.yValue},distance:distance??0,lineGraph,name:"["+index+"]"})}}lineGraphId++}if(0===pointTooltips.length){this.__tooltipInformation={show:!1,isActive:!1,points:[],referenceLine:void 0,lineGraph:null};let foundedRefLine,refLines=this.__lineChart.getReferenceLines();if(refLines&&refLines.length>0&&(foundedRefLine=refLines.find(refLine=>{let startPoint=refLine.getStartPoint();if(startPoint&&refLine.getOrientation()===Orientation.Vertical){if(offsetX-15<=startPoint.x&&startPoint.x<=offsetX+15)return!0}else if(startPoint&&refLine.getOrientation()===Orientation.Horizontal&&offsetY-15<=startPoint.y&&startPoint.y<=offsetY+15)return!0;return!1})),foundedRefLine){this.__tooltipInformation={show:!0,isActive:!!fromTouch||activate,points:[],referenceLine:foundedRefLine,lineGraph:null};let tooltipInfos=this.__referenceLineTooltipInformation();return foundedRefLine.getShowTooltip()?this.__designTooltip(tooltipInfos.html||null,offsetX,offsetY,offsetLeft,offsetTopCharting):this.__tooltipInformation={show:!1,isActive:!1,points:[],referenceLine:foundedRefLine,lineGraph:null},void(foundedRefLine.getHighlightDataPoints()&&this.__highlightDataPoints(tooltipInfos.value,offsetTop,offsetLeft,yAxis[0],xAxis))}}else{pointTooltips.sort(function(a,b){return a.distance-b.distance}),this.__tooltipInformation={show:!0,isActive:!!fromTouch||activate,points:[],referenceLine:void 0,lineGraph:null};for(const pointTooltip of pointTooltips??[])this.__tooltipInformation.points.push({yAxis:pointTooltip.yAxis,xValue:pointTooltip.values.x,yValue:pointTooltip.values.y,xPosition:pointTooltip.coordinates.x,yPosition:pointTooltip.coordinates.y,name:pointTooltip.name,lineGraph:pointTooltip.lineGraph});let tooltipFormat=this.__executeTooltipFormatFunction(this.__tooltipInformation.points[0].xValue,this.__tooltipInformation.points[0].yValue);this.__designTooltip(tooltipFormat,offsetX,offsetY,offsetLeft,offsetTopCharting)}}}__designTooltip(tooltipHtml,x,y,offsetLeft,offsetTop){if(!this.__lineChart||!this.__tooltipInformation.show)return;let xAxis=this.__lineChart.getXAxis();if(!xAxis)return;let lineColorGraph=null,themeTooltipFontColor=TcHmi.Theme.Resources.get(this,"TooltipFontColor");if(themeTooltipFontColor&&null!==themeTooltipFontColor.value){let tempColor=themeTooltipFontColor.value;TcHmi.isSolidColor(tempColor)&&(lineColorGraph=TcHmi.StyleProvider.resolveSolidColorAsCssValue(tempColor))}if(TcHmi.isSolidColor(this.__tooltipFontColor)&&(lineColorGraph=TcHmi.StyleProvider.resolveSolidColorAsCssValue(this.__tooltipFontColor)),lineColorGraph&&this.__elementTooltipText.css("color",lineColorGraph),this.__elementTooltip.css("visibility","visible"),!tooltipHtml)return void this.__elementTooltip.css("visibility","hidden");this.__elementTooltipText[0].innerHTML=tooltipHtml;let widthTooltip=this.__elementTooltip.width(),heightTooltip=this.__elementTooltip.height();x-widthTooltip/2>=offsetLeft&&x+widthTooltip/2<=offsetLeft+xAxis.getLineWidth()&&y-heightTooltip>=offsetTop?(this.__elementTooltipArrow[0].classList.remove("TcHmi_Controls_Beckhoff_TcHmiLineChart-template-tooltip-arrow-top","TcHmi_Controls_Beckhoff_TcHmiLineChart-template-tooltip-arrow-bottom","TcHmi_Controls_Beckhoff_TcHmiLineChart-template-tooltip-arrow-left","TcHmi_Controls_Beckhoff_TcHmiLineChart-template-tooltip-arrow-right","tchmiline-chart-template-tooltip-arrow-top","tchmiline-chart-template-tooltip-arrow-bottom","tchmiline-chart-template-tooltip-arrow-left","tchmiline-chart-template-tooltip-arrow-right"),this.__elementTooltipArrow[0].classList.add("TcHmi_Controls_Beckhoff_TcHmiLineChart-template-tooltip-arrow-bottom","tchmiline-chart-template-tooltip-arrow-bottom"),this.__elementTooltip.css({top:y-heightTooltip-4+offsetTop,left:x+5-widthTooltip/2})):x-widthTooltip/2>=offsetLeft&&x+widthTooltip/2<=offsetLeft+xAxis.getLineWidth()?(this.__elementTooltipArrow[0].classList.remove("TcHmi_Controls_Beckhoff_TcHmiLineChart-template-tooltip-arrow-top","TcHmi_Controls_Beckhoff_TcHmiLineChart-template-tooltip-arrow-bottom","TcHmi_Controls_Beckhoff_TcHmiLineChart-template-tooltip-arrow-left","TcHmi_Controls_Beckhoff_TcHmiLineChart-template-tooltip-arrow-right","tchmiline-chart-template-tooltip-arrow-top","tchmiline-chart-template-tooltip-arrow-bottom","tchmiline-chart-template-tooltip-arrow-left","tchmiline-chart-template-tooltip-arrow-right"),this.__elementTooltipArrow[0].classList.add("TcHmi_Controls_Beckhoff_TcHmiLineChart-template-tooltip-arrow-top","tchmiline-chart-template-tooltip-arrow-top"),this.__elementTooltip.css({top:y+4+offsetTop,left:x+5-widthTooltip/2})):x>=offsetLeft&&x+widthTooltip<=offsetLeft+xAxis.getLineWidth()?(this.__elementTooltipArrow[0].classList.remove("TcHmi_Controls_Beckhoff_TcHmiLineChart-template-tooltip-arrow-top","TcHmi_Controls_Beckhoff_TcHmiLineChart-template-tooltip-arrow-bottom","TcHmi_Controls_Beckhoff_TcHmiLineChart-template-tooltip-arrow-left","TcHmi_Controls_Beckhoff_TcHmiLineChart-template-tooltip-arrow-right","tchmiline-chart-template-tooltip-arrow-top","tchmiline-chart-template-tooltip-arrow-bottom","tchmiline-chart-template-tooltip-arrow-left","tchmiline-chart-template-tooltip-arrow-right"),this.__elementTooltipArrow[0].classList.add("TcHmi_Controls_Beckhoff_TcHmiLineChart-template-tooltip-arrow-left","tchmiline-chart-template-tooltip-arrow-left"),this.__elementTooltip.css({top:y-heightTooltip/2+offsetTop,left:x+4+5})):(this.__elementTooltipArrow[0].classList.remove("TcHmi_Controls_Beckhoff_TcHmiLineChart-template-tooltip-arrow-top","TcHmi_Controls_Beckhoff_TcHmiLineChart-template-tooltip-arrow-bottom","TcHmi_Controls_Beckhoff_TcHmiLineChart-template-tooltip-arrow-left","TcHmi_Controls_Beckhoff_TcHmiLineChart-template-tooltip-arrow-right","tchmiline-chart-template-tooltip-arrow-top","tchmiline-chart-template-tooltip-arrow-bottom","tchmiline-chart-template-tooltip-arrow-left","tchmiline-chart-template-tooltip-arrow-right"),this.__elementTooltipArrow[0].classList.add("TcHmi_Controls_Beckhoff_TcHmiLineChart-template-tooltip-arrow-right","tchmiline-chart-template-tooltip-arrow-right"),this.__elementTooltip.css({top:y-heightTooltip/2+offsetTop,left:x-4-widthTooltip+5}))}__referenceLineTooltipInformation(){if(!(this.__tooltipInformation.show&&this.__tooltipInformation.referenceLine&&this.__lineChart&&this.__lineGraphDataInternal))return{html:"",value:0};let table=document.createElement("table");table.classList.add("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-tooltip-info-table"),table.setAttribute("border","1");let header=table.createTHead(),body=table.createTBody(),tableValue=document.createElement("table");tableValue.classList.add("TcHmi_Controls_Beckhoff_TcHmiLineChart-template-tooltip-table"),tableValue.setAttribute("border","1");let refLine=this.__tooltipInformation.referenceLine,orientation=refLine.getOrientation(),yAxisId=refLine.getYAxisId(),axis=orientation===TcHmiCharting.ReferenceLine.Orientation.Vertical?this.__lineChart.getXAxis():this.__lineChart.getYAxis().find(yAxis=>yAxis.getId()===yAxisId);if(!axis)return{html:"",value:0};let value=refLine.getValue()||0;if("%"===refLine.getValueUnit()){let yStartValue=axis.getMainTickStartValueOverride()||axis.getMainTickStartValue()||0,yEndValue=axis.getMainTickEndValueOverride()||axis.getMainTickEndValue()||0;value=yStartValue+(yEndValue-yStartValue)*value/100??0}let xRow=tableValue.insertRow();xRow.insertCell().textContent="Value",xRow.insertCell().textContent=value.toString();let headerRow=header.insertRow();return headerRow.appendChild(document.createElement("th")).textContent="Name",headerRow.appendChild(document.createElement("th")).textContent="X value",headerRow.appendChild(document.createElement("th")).textContent="Y value",this.__lineGraphDataInternal.forEach((data,index)=>{const closestValue=data.map(a=>orientation===TcHmiCharting.ReferenceLine.Orientation.Vertical?a.x:a.y).reduce((prev,curr)=>Math.abs(curr-value)<Math.abs(prev-value)?curr:prev),entry=data.find(a=>orientation===TcHmiCharting.ReferenceLine.Orientation.Vertical?a.x===closestValue:a.y===closestValue);if(entry&&this.__lineGraphDescriptionsInternal&&this.__lineGraphDescriptionsInternal[index]){let lineGraphDesc=this.__lineGraphDescriptionsInternal[index];if(lineGraphDesc.isSelected){let row=body.insertRow();row.insertCell().append(lineGraphDesc.legendName??"["+index+"]"),row.insertCell().append(entry.x?.toString()||"null"),row.insertCell().append(entry.y?.toString()||"null")}}}),{html:tableValue.outerHTML+table.outerHTML,value}}__highlightDataPoints(value,offsetTop,offsetLeft,yAxis,xAxis){this.__lineGraphDataInternal&&this.__zoomingCanvasContext&&this.__tooltipInformation.referenceLine&&this.__lineGraphDataInternal.forEach((data,index)=>{if(!this.__lineChart||!this.__zoomingCanvasContext)return;let position=this.__tooltipInformation.referenceLine.getOrientation();const closestValue=data.map(a=>position===Orientation.Vertical?a.x:a.y).reduce((prev,curr)=>Math.abs(curr-value)<Math.abs(prev-value)?curr:prev),entry=data.find(a=>position===Orientation.Vertical?a.x===closestValue:a.y===closestValue);if(entry&&this.__lineGraphDescriptionsInternal&&this.__lineGraphDescriptionsInternal[index]){let lineGraphDesc=this.__lineGraphDescriptionsInternal[index],lineGraph=this.__lineChart.getLineGraphs()[index];if(lineGraphDesc.isSelected){const dotColor=TcHmi.Theme.Resources.get(this,"HighlightDotColor").value,strokeColor=TcHmi.Theme.Resources.get(this,"HighlightDotStrokeColor").value;if(TcHmi.isSolidColor(dotColor)&&TcHmi.isSolidColor(strokeColor)){let point=lineGraph.getPoints().find(point=>point.xValue===entry.x);if(point){this.__zoomingCanvasContext.beginPath(),this.__zoomingCanvasContext.fillStyle=strokeColor.color,this.__zoomingCanvasContext.arc(point.xPosition,point.yPosition,(lineGraph.getPointDotRadius()??0)+2,0,2*Math.PI),this.__zoomingCanvasContext.fill(),this.__zoomingCanvasContext.beginPath(),this.__zoomingCanvasContext.fillStyle=dotColor.color,this.__zoomingCanvasContext.arc(point.xPosition,point.yPosition,lineGraph.getPointDotRadius()||0,0,2*Math.PI),this.__zoomingCanvasContext.fill();let canvasWidth=this.__zoomingCanvasContext.canvas.width/window.devicePixelRatio,canvasHeight=this.__zoomingCanvasContext.canvas.height/window.devicePixelRatio;this.__zoomingCanvasContext.clearRect(0,0,canvasWidth,offsetTop),this.__zoomingCanvasContext.clearRect(0,0,offsetLeft,canvasHeight),this.__zoomingCanvasContext.clearRect(0,canvasHeight,canvasWidth,-(canvasHeight-yAxis.getLineHeight()-offsetTop)),this.__zoomingCanvasContext.clearRect(canvasWidth,0,-(canvasWidth-offsetLeft-xAxis.getLineWidth()),canvasHeight)}}}}})}__userInteractionStart(x,y){if(!this.__lineChart)return;let basicYAxis=this.__lineChart.getYAxisAtPosition(0);if(!basicYAxis)return;let yAxisWidth=basicYAxis.getAxisWidth();if(!yAxisWidth)return;let offsetTop=basicYAxis.getDiffEndLabelAndLine()+yAxisWidth/2+5+this.__lineChart.getDrawingBorder(),xAxis=this.__lineChart.getXAxis(),offsetLeft=0;null!==xAxis&&(offsetLeft=xAxis.getXAxisLeftWidth()??0);let xLineWidth=0;null!==xAxis&&(xLineWidth=xAxis.getLineWidth());let yLineHeight=basicYAxis.getLineHeight();if(x<offsetLeft||x>offsetLeft+xLineWidth||y<offsetTop||y>offsetTop+yLineHeight)return;let refLines=this.__lineChart.getReferenceLines();if(refLines&&refLines.length>0){let foundedRefLine=refLines.find(refLine=>{if(!refLine.getLocked()){let startPoint=refLine.getStartPoint();if(startPoint&&refLine.getOrientation()===Orientation.Horizontal){if(y-15<=startPoint.y&&startPoint.y<=y+15)return!0}else if(startPoint&&refLine.getOrientation()===Orientation.Vertical&&x-15<=startPoint.x&&startPoint.x<=x+15)return!0}return!1});if(foundedRefLine)return this.__stopMode.isManipulating=!0,this.__stopMode.mousePositionStart={x,y},this.__stopMode.mousePositionEnd={x,y},this.__stopMode.moveReferenceLine=!0,void(this.__stopMode.referenceLine=foundedRefLine)}this.__mouseMode!==MouseMode.ZoomX&&this.__mouseMode!==MouseMode.ZoomXY&&this.__mouseMode!==MouseMode.PanX&&this.__mouseMode!==MouseMode.PanXY||(this.__stopMode.mousePositionStart.x=x,this.__stopMode.mousePositionStart.y=y,this.__stopMode.mousePositionEnd.x=x,this.__stopMode.mousePositionEnd.y=y),this.__stopMode.isManipulating=!0,this.__stopMode.transform={x:0,y:0}}__userInteractionMove(x,y){if(this.__tooltipInformation.show&&(this.__elementTooltip.css("visibility","hidden"),this.__tooltipInformation={show:!1,isActive:!1,points:[],lineGraph:null,referenceLine:void 0}),!this.__lineChart)return;let basicYAxis=this.__lineChart.getYAxisAtPosition(0),xAxis=this.__lineChart.getXAxis(),yAxisWidth=basicYAxis.getAxisWidth();if(!basicYAxis||!yAxisWidth||!xAxis)return;let offsetTop=basicYAxis.getDiffEndLabelAndLine()+yAxisWidth/2+5+this.__lineChart.getDrawingBorder(),offsetLeft=xAxis.getXAxisLeftWidth()??0;if(this.__stopMode.moveReferenceLine){this.__zoomingCanvasContext&&this.__zoomingCanvasContext.clearRect(0,0,this.__zoomingCanvasContext.canvas.width,this.__zoomingCanvasContext.canvas.height);let canvasLines=this.__lineChart.getCanvasLines();if(canvasLines&&canvasLines[0]&&this.__stopMode.referenceLine){let context=canvasLines[0].getContext("2d");if(context){context.clearRect(0,0,context.canvas.width,context.canvas.height);let dX=x-this.__stopMode.mousePositionEnd.x,dY=y-this.__stopMode.mousePositionEnd.y,refLine=this.__stopMode.referenceLine,orientation=refLine.getOrientation(),axis=orientation===Orientation.Horizontal?this.__lineChart.getYAxis().find(yAxis=>yAxis.getId()===refLine.getYAxisId()):xAxis;if(axis){let min=axis.getMainTickStartValueOverride()||axis.getMainTickStartValue()||0,max=axis.getMainTickEndValueOverride()||axis.getMainTickEndValue()||0,diff=max-min,pixelPerValue=(axis instanceof TcHmiCharting.XAxis?axis.getLineWidth():axis.getLineHeight())/diff,newDiff=orientation===Orientation.Horizontal?dY/pixelPerValue:dX/pixelPerValue,indexOfRef=this.__lineChart.getReferenceLines().indexOf(refLine),internalRefLine=this.__internalReferenceLines?.at(indexOfRef),refLineOfCharting=this.__lineChart.getReferenceLinesAtPosition(indexOfRef);if(internalRefLine&&refLineOfCharting.getValueUnit()===ValueUnit.Value){let newValue=orientation===Orientation.Horizontal?(refLineOfCharting.getValue()||0)-newDiff:(refLineOfCharting.getValue()||0)+newDiff;newValue=newValue>max?max:newValue<min?min:newValue,refLineOfCharting.setValue(newValue),internalRefLine.value=newValue}else if(internalRefLine&&refLineOfCharting.getValueUnit()===ValueUnit["%"]){let newValueAsPercent=newDiff/diff*100,newValue=orientation===Orientation.Horizontal?(refLineOfCharting.getValue()||0)-newValueAsPercent:(refLineOfCharting.getValue()||0)+newValueAsPercent;newValue=newValue>100?100:newValue<0?0:newValue,refLineOfCharting.setValue(newValue),internalRefLine.value=newValue}this.__lineChart.drawReferenceLines(!this.__showXAxis)}}}}else if(this.__mouseMode===MouseMode.ZoomX||this.__mouseMode===MouseMode.ZoomXY){if(null===this.__zoomingCanvasContext)return;let canvasWidth=this.__zoomingCanvasContext.canvas.width/window.devicePixelRatio,canvasHeight=this.__zoomingCanvasContext.canvas.height/window.devicePixelRatio,beginRect=this.__mouseMode===MouseMode.ZoomX?offsetTop:this.__stopMode.mousePositionStart.y,width=x-this.__stopMode.mousePositionStart.x,height=this.__mouseMode===MouseMode.ZoomX?basicYAxis.getLineHeight():y-this.__stopMode.mousePositionStart.y;this.__zoomingCanvasContext.clearRect(0,0,canvasWidth,canvasHeight),this.__zoomingCanvasContext.beginPath(),this.__zoomingCanvasContext.rect(this.__stopMode.mousePositionStart.x,beginRect,width,height),this.__zoomingCanvasContext.fillStyle="rgba(51,153,255,0.3)",this.__zoomingCanvasContext.lineWidth=1,this.__zoomingCanvasContext.strokeStyle="rgba(51,153,255,1)",this.__zoomingCanvasContext.fill(),this.__zoomingCanvasContext.stroke(),this.__zoomingCanvasContext.clearRect(0,0,canvasWidth,offsetTop),this.__zoomingCanvasContext.clearRect(0,0,offsetLeft,canvasHeight),this.__zoomingCanvasContext.clearRect(0,canvasHeight,canvasWidth,-(canvasHeight-basicYAxis.getLineHeight()-offsetTop)),this.__zoomingCanvasContext.clearRect(canvasWidth,0,-(canvasWidth-offsetLeft-xAxis.getLineWidth()),canvasHeight)}else if(this.__mouseMode===MouseMode.PanX||this.__mouseMode===MouseMode.PanXY){let dX=x-this.__stopMode.mousePositionEnd.x,dY=y-this.__stopMode.mousePositionEnd.y;const canvas=this.__lineChart.getCanvasDrawing();if(null===canvas)return;const htmlCanvas=canvas[0];let context=htmlCanvas.getContext("2d");if(null===context)return;let canvasWidth=htmlCanvas.width/window.devicePixelRatio,canvasHeight=htmlCanvas.height/window.devicePixelRatio;this.__mouseMode===MouseMode.PanXY?(context.translate(dX,dY),this.__stopMode.transform={x:this.__stopMode.transform.x+dX,y:this.__stopMode.transform.y+dY}):(dY=0,context.translate(dX,0),this.__stopMode.transform.x=this.__stopMode.transform.x+dX),this.__lineChart.setLineChanged(!0),this.__lineChart.draw();const transform=this.__stopMode.transform;transform.y>=0?(context.clearRect(-transform.x,-transform.y,canvasWidth+transform.x,offsetTop+transform.y),context.clearRect(-transform.x,canvasHeight-transform.y,canvasWidth+transform.x,-(canvasHeight-basicYAxis.getLineHeight()-offsetTop))):(context.clearRect(-transform.x,-transform.y,canvasWidth+transform.x,offsetTop),context.clearRect(-transform.x,canvasHeight-transform.y,canvasWidth+transform.x,-(canvasHeight-basicYAxis.getLineHeight()-offsetTop-transform.y))),transform.x>=0?(context.clearRect(-transform.x,-transform.y,offsetLeft+transform.x,canvasHeight+transform.y),context.clearRect(canvasWidth-transform.x,-transform.y,-(canvasWidth-offsetLeft-xAxis.getLineWidth()),canvasHeight+transform.y)):(context.clearRect(-transform.x,-transform.y,offsetLeft,canvasHeight+transform.y),context.clearRect(canvasWidth-transform.x,-transform.y,-(canvasWidth-offsetLeft-xAxis.getLineWidth()-transform.x),canvasHeight+transform.y))}this.__stopMode.mousePositionEnd.x=x,this.__stopMode.mousePositionEnd.y=y}__userInteractionEnd(){if(this.__stopMode.moveReferenceLine){let staticMouse=this.__stopMode.mousePositionStart.x===this.__stopMode.mousePositionEnd.x&&this.__stopMode.mousePositionStart.y===this.__stopMode.mousePositionEnd.y;return this.resetManipulation(),void(staticMouse||(this.__stopMode.click=!1))}if(this.__stopMode.mousePositionStart.x===this.__stopMode.mousePositionEnd.x&&this.__stopMode.mousePositionStart.y===this.__stopMode.mousePositionEnd.y)return void this.resetManipulation();if(null===this.__zoomingCanvasContext)return;if(null!==this.__lineChart){let basicYAxis=this.__lineChart.getYAxisAtPosition(0);if(basicYAxis){let yAxisWidth=basicYAxis.getAxisWidth();if(null!==yAxisWidth){let offsetTop=basicYAxis.getDiffEndLabelAndLine()+yAxisWidth/2+5+this.__lineChart.getDrawingBorder(),xAxis=this.__lineChart.getXAxis(),offsetLeft=0;if(xAxis){let start=xAxis.getMainTickStartValue()??0,end=xAxis.getMainTickEndValue()??0;offsetLeft=xAxis.getXAxisLeftWidth()??0;let diffPixelWidth=this.__zoomingCanvasContext.canvas.width-offsetLeft-(this.__zoomingCanvasContext.canvas.width-offsetLeft-xAxis.getLineWidth()),diffPixelHeight=this.__zoomingCanvasContext.canvas.height-offsetTop-(this.__zoomingCanvasContext.canvas.height-basicYAxis.getLineHeight()-offsetTop);this.__zoomingCanvasContext.clearRect(0,0,this.__zoomingCanvasContext.canvas.width,this.__zoomingCanvasContext.canvas.height);let diff=end-start;if(this.__mouseMode===MouseMode.ZoomX||this.__mouseMode===MouseMode.ZoomXY){let startX,endX,drawingEnd=offsetLeft+xAxis.getLineWidth();this.__stopMode.mousePositionStart.x<this.__stopMode.mousePositionEnd.x?(startX=this.__stopMode.mousePositionStart.x,this.__stopMode.mousePositionStart.x<offsetLeft&&(startX=offsetLeft),endX=this.__stopMode.mousePositionEnd.x,this.__stopMode.mousePositionEnd.x>drawingEnd&&(endX=drawingEnd)):(startX=this.__stopMode.mousePositionEnd.x,this.__stopMode.mousePositionEnd.x<offsetLeft&&(startX=offsetLeft),endX=this.__stopMode.mousePositionStart.x,this.__stopMode.mousePositionStart.x>drawingEnd&&(endX=drawingEnd));let newDiff=(endX-startX)/diffPixelWidth*diff;if(newDiff=newDiff<1?1:newDiff,this.__mouseMode===MouseMode.ZoomXY){let yAxis=this.__lineChart.getYAxis();if(yAxis&&yAxis.length>0){let startY,endY,drawingEndY=offsetTop+yAxis[0].getLineHeight();this.__stopMode.mousePositionStart.y<this.__stopMode.mousePositionEnd.y?(endY=this.__stopMode.mousePositionStart.y,this.__stopMode.mousePositionStart.y<offsetTop&&(endY=offsetTop),startY=this.__stopMode.mousePositionEnd.y,this.__stopMode.mousePositionEnd.y>drawingEndY&&(startY=drawingEndY)):(endY=this.__stopMode.mousePositionEnd.y,this.__stopMode.mousePositionEnd.y<offsetTop&&(endY=offsetTop),startY=this.__stopMode.mousePositionStart.y,this.__stopMode.mousePositionStart.y>drawingEndY&&(startY=drawingEndY));for(const[index,axis]of yAxis.entries()??[]){let decimalPlaces=axis.getDecimalPlaces(),min=axis.getMainTickStartValueOverride()??axis.getMainTickStartValue()??0,diff=(axis.getMainTickEndValueOverride()??axis.getMainTickEndValue()??0)-min,minDisplacement=diff*(1-(startY-offsetTop)/diffPixelHeight)+min,maxDisplacement=diff*(1-(endY-offsetTop)/diffPixelHeight)+min,multiplier=0;null!==decimalPlaces&&(multiplier=Math.pow(10,decimalPlaces),minDisplacement=Math.round(minDisplacement*multiplier)/multiplier,maxDisplacement=Math.round(maxDisplacement*multiplier)/multiplier),this.__stopMode.actualYAxis[index].autoScaling=!1,this.__stopMode.actualYAxis[index].mainTickMaxValue=maxDisplacement,this.__stopMode.actualYAxis[index].mainTickMinValue=minDisplacement}}}let pixelWidthPercentStart=(startX-offsetLeft)/diffPixelWidth,newStart=start+Math.abs(diff*pixelWidthPercentStart);this.__stopMode.actualXAxisStart=newStart,this.__stopMode.actualXAxisEnd=newStart+newDiff}if(this.__mouseMode===MouseMode.PanX||this.__mouseMode===MouseMode.PanXY){let canvas=this.__lineChart.getCanvasDrawing();if(null!==canvas){let context=canvas[0].getContext("2d");if(null!==context){context.setTransform(1,0,0,1,0,0);let deviceDPI=window.devicePixelRatio;context.scale(deviceDPI,deviceDPI)}}let newStart=start-diff*(this.__stopMode.transform.x/diffPixelWidth);if(this.__stopMode.actualXAxisStart=newStart,this.__stopMode.actualXAxisEnd=newStart+diff,this.__mouseMode===MouseMode.PanXY){let yAxis=this.__lineChart.getYAxis();if(yAxis&&yAxis.length>0)for(const[index,axis]of yAxis.entries()??[]){let min=axis.getMainTickStartValueOverride()??axis.getMainTickStartValue()??0,max=axis.getMainTickEndValueOverride()??axis.getMainTickEndValue()??0,heightDisplacement=(max-min)*(this.__stopMode.transform.y/diffPixelHeight),minDisplacement=min+heightDisplacement,maxDisplacement=max+heightDisplacement;this.__stopMode.actualYAxis[index].autoScaling=!1,this.__stopMode.actualYAxis[index].mainTickMaxValue=maxDisplacement,this.__stopMode.actualYAxis[index].mainTickMinValue=minDisplacement}}}}}}}this.__stopMode.click=!1,this.__drawLineChart(),this.resetManipulation();let canvasZoomingElem=this.__elementChart[0].getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiLineChart-canvas-zooming");canvasZoomingElem.length>0&&canvasZoomingElem[0].classList.add("tchmi-no-pointer-events")}__invisibleTooltip(){this.__elementTooltip.css("visibility","hidden"),this.__tooltipInformation={show:!1,isActive:!1,lineGraph:null,points:[],referenceLine:void 0}}__transformEventCoords(clientX,clientY,targetElement){if(targetElement){let renderedWidth=this.getRenderedWidth(),renderedHeight=this.getRenderedHeight();if(null===renderedWidth||null===renderedHeight)return{x:0,y:0};let controlRect=this.__element[0].getBoundingClientRect();this.__stopMode.scale.x=renderedWidth/controlRect.width,this.__stopMode.scale.y=renderedHeight/controlRect.height;let targetRect=targetElement.getBoundingClientRect();this.__stopMode.offset.left=targetRect.left,this.__stopMode.offset.top=targetRect.top}return{x:(clientX-this.__stopMode.offset.left)*this.__stopMode.scale.x,y:(clientY-this.__stopMode.offset.top)*this.__stopMode.scale.y}}resetManipulation(){this.__stopMode.isManipulating=!1,this.__stopMode.mousePositionStart={x:0,y:0},this.__stopMode.mousePositionEnd={x:0,y:0},this.__stopMode.offset={left:0,top:0},this.__stopMode.scale={x:0,y:0},this.__stopMode.transform={x:0,y:0},this.__stopMode.click=!0,this.__stopMode.isWheeling=!1,this.__stopMode.wheelSteps=0,this.__stopMode.wheelTimeout=0,this.__stopMode.multitouchMode=!1,this.__stopMode.first={identifier:null},this.__stopMode.second={identifier:null},this.__stopMode.distance=0,this.__stopMode.moveReferenceLine=!1,this.__stopMode.referenceLine=null}pause(){if(!this.__stopMode.isStopped&&this.__lineChart){this.__menubar?.setMenubarButtonsEnabled({playButtonEnable:!0,pauseButtonEnable:!1,panXToggleButtonEnable:!0,panXYToggleButtonEnable:!0,zoomXToggleButtonEnable:!0,zoomXYToggleButtonEnable:!0,resetZoomButtonEnable:!0}),this.resetManipulation(),this.__stopMode.isStopped=!0,this.__stopMode.beginXAxisStart=this.__lineChart.getXAxis()?.getMainTickStartValueOverride()??this.__lineChart.getXAxis()?.getMainTickStartValue()??0,this.__stopMode.beginXAxisEnd=this.__lineChart.getXAxis()?.getMainTickEndValueOverride()??this.__lineChart.getXAxis()?.getMainTickEndValue()??0,this.__stopMode.actualXAxisStart=this.__lineChart.getXAxis()?.getMainTickStartValueOverride()??this.__lineChart.getXAxis()?.getMainTickStartValue()??0,this.__stopMode.actualXAxisEnd=this.__lineChart.getXAxis()?.getMainTickEndValueOverride()??this.__lineChart.getXAxis()?.getMainTickEndValue()??0,this.__stopMode.beginYAxis=tchmi_clone_object(this.__yAxisInternal)??[],this.__stopMode.actualYAxis=tchmi_clone_object(this.__yAxisInternal)??[],this.__stopMode.beginData=tchmi_clone_object(this.__lineGraphDataInternal)??[];for(let i=0,ii=this.__stopMode.beginYAxis.length;i<ii;i++){let yAxis=this.__lineChart.getYAxisAtPosition(i);this.__stopMode.beginYAxis[i].mainTickMinValue=yAxis?.getMainTickStartValueOverride()??yAxis?.getMainTickStartValue()??0,this.__stopMode.beginYAxis[i].mainTickMaxValue=yAxis?.getMainTickEndValueOverride()??yAxis?.getMainTickEndValue()??0,this.__stopMode.actualYAxis[i].mainTickMinValue=yAxis?.getMainTickStartValueOverride()??yAxis?.getMainTickStartValue()??0,this.__stopMode.actualYAxis[i].mainTickMaxValue=yAxis?.getMainTickEndValueOverride()??yAxis?.getMainTickEndValue()??0,this.__stopMode.actualYAxis[i].autoScaling=!1,this.__stopMode.beginYAxis[i].isSelected||(this.__stopMode.actualYAxis[i].showAxis=!1)}this.__drawLineChart()}}play(){this.__stopMode.isStopped=!1,this.__menubar?.setMenubarButtonsEnabled({playButtonEnable:!1,pauseButtonEnable:!0,panXToggleButtonEnable:!1,panXYToggleButtonEnable:!1,zoomXToggleButtonEnable:!1,zoomXYToggleButtonEnable:!1,resetZoomButtonEnable:!1}),this.__createInternals()}resetZoom(){if(this.__lineChart){this.__stopMode.actualXAxisStart=this.__stopMode.beginXAxisStart,this.__stopMode.actualXAxisEnd=this.__stopMode.beginXAxisEnd,this.__stopMode.actualYAxis=tchmi_clone_object(this.__stopMode.beginYAxis);for(let i=0,ii=this.__stopMode.beginYAxis.length;i<ii;i++)this.__stopMode.actualYAxis[i].autoScaling=!1,this.__stopMode.beginYAxis[i].isSelected||(this.__stopMode.actualYAxis[i].showAxis=!1);this.__drawLineChart()}}setSectionsBackgroundColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("SectionsBackgroundColor"));let resolverInfo=this.__objectResolvers.get("sectionsBackgroundColor");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("SectionsBackgroundColor")?.type});this.__objectResolvers.set("sectionsBackgroundColor",{resolver,watchCallback:this.__onResolverForSectionsBackgroundColorWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForSectionsBackgroundColorWatchCallback)})}__onResolverForSectionsBackgroundColorWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("sectionsBackgroundColor"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__sectionsBackgroundColor)||(this.__sectionsBackgroundColor=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"SectionsBackgroundColor"}),this.__processSectionsBackgroundColor()):TcHmi.Log.Controls.error(this,TcHmiLineChart.#tchmiFQN,{Attribute:"SectionsBackgroundColor"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getSectionsBackgroundColor(){return this.__sectionsBackgroundColor}__processSectionsBackgroundColor(){TcHmi.StyleProvider.processBackgroundColor(this.__elementMenuBar,this.__sectionsBackgroundColor),TcHmi.StyleProvider.processBackgroundColor(this.__elementChart,this.__sectionsBackgroundColor),TcHmi.StyleProvider.processBackgroundColor(this.__elementLegend,this.__sectionsBackgroundColor)}setYAxisWidth(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("YAxisWidth")),convertedValue!==this.__yAxisWidth&&(this.__yAxisWidth=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"YAxisWidth"}),this.__processYAxisWidth())}getYAxisWidth(){return this.__yAxisWidth}__processYAxisWidth(){null!==this.__lineChart&&void 0!==this.__lineChart&&(this.__lineChart.setYAxisWidth(void 0===this.__yAxisWidth?this.getAttributeDefaultValueInternal("YAxisWidth"):this.__yAxisWidth),this.__lineChart.draw())}setYLabelFontFamily(valueNew){let convertedValue=TcHmi.ValueConverter.toFontFamily(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("YLabelFontFamily")),convertedValue!==this.__yLabelFontFamily&&(this.__yLabelFontFamily=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"YLabelFontFamily"}),this.__processYLabelFontFamily())}getYLabelFontFamily(){return this.__yLabelFontFamily}__processYLabelFontFamily(){null!==this.__lineChart&&void 0!==this.__lineChart&&(this.__lineChart.setYLabelFontFamily(this.__yLabelFontFamily),this.__lineChart.draw())}setYLabelFontSize(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("YLabelFontSize")),convertedValue!==this.__yLabelFontSize&&(this.__yLabelFontSize=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"YLabelFontSize"}),this.__processYLabelFontSize())}getYLabelFontSize(){return this.__yLabelFontSize}__processYLabelFontSize(){null!==this.__lineChart&&void 0!==this.__lineChart&&(this.__lineChart.setYLabelFontSize(void 0===this.__yLabelFontSize?this.getAttributeDefaultValueInternal("YLabelFontSize"):this.__yLabelFontSize),this.__lineChart.draw())}setYLabelFontSizeUnit(valueNew){}getYLabelFontSizeUnit(){return"px"}setYLabelFontWeight(valueNew){let convertedValue=TcHmi.ValueConverter.toFontWeight(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("YLabelFontWeight")),convertedValue!==this.__yLabelFontWeight&&(this.__yLabelFontWeight=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"YLabelFontWeight"}),this.__processYLabelFontWeight())}getYLabelFontWeight(){return this.__yLabelFontWeight}__processYLabelFontWeight(){null!==this.__lineChart&&void 0!==this.__lineChart&&(this.__lineChart.setYLabelFontWeight(void 0===this.__yLabelFontWeight?this.getAttributeDefaultValueInternal("YLabelFontWeight"):this.__yLabelFontWeight),this.__lineChart.draw())}setYMainTickSteps(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("YMainTickSteps")),convertedValue!==this.__yMainTickSteps&&(this.__yMainTickSteps=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"YMainTickSteps"}),this.__processYMainTickSteps())}getYMainTickSteps(){return this.__yMainTickSteps}__processYMainTickSteps(){null!==this.__lineChart&&void 0!==this.__lineChart&&(this.__lineChart.setYMainTickSteps(void 0===this.__yMainTickSteps?this.getAttributeDefaultValueInternal("YMainTickSteps"):this.__yMainTickSteps),this.__lineChart.draw())}setShowYSubTicks(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("ShowYSubTicks")),convertedValue!==this.__showYSubTicks&&(this.__showYSubTicks=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ShowYSubTicks"}),this.__processShowYSubTicks())}getShowYSubTicks(){return this.__showYSubTicks}__processShowYSubTicks(){null!==this.__lineChart&&void 0!==this.__lineChart&&(this.__lineChart.setShowYSubTicks(void 0===this.__showYSubTicks?this.getAttributeDefaultValueInternal("ShowYSubTicks"):this.__showYSubTicks),this.__lineChart.draw())}setYSubTickSteps(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("YSubTickSteps")),convertedValue!==this.__ySubTickSteps&&(this.__ySubTickSteps=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"YSubTickSteps"}),this.__processYSubTickSteps())}getYSubTickSteps(){return this.__ySubTickSteps}__processYSubTickSteps(){null!==this.__lineChart&&void 0!==this.__lineChart&&(this.__lineChart.setYSubTickSteps(void 0===this.__ySubTickSteps?this.getAttributeDefaultValueInternal("YSubTickSteps"):this.__ySubTickSteps),this.__lineChart.draw())}setShowXAxis(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("ShowXAxis")),convertedValue!==this.__showXAxis&&(this.__showXAxis=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ShowXAxis"}),this.__processShowXAxis())}getShowXAxis(){return this.__showXAxis}__processShowXAxis(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let xAxis=this.__lineChart.getXAxis();null!=xAxis&&(xAxis.setShowAxis(void 0===this.__showXAxis?this.getAttributeDefaultValueInternal("ShowXAxis"):this.__showXAxis),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXLogarithmicScale(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("XLogarithmicScale")),convertedValue!==this.__xLogarithmicScale&&(this.__xLogarithmicScale=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"XLogarithmicScale"}),this.__processXLogarithmicScale())}getXLogarithmicScale(){return this.__xLogarithmicScale}__processXLogarithmicScale(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let xAxis=this.__lineChart.getXAxis();null!=xAxis&&(xAxis.setLogarithmicScale(void 0===this.__xLogarithmicScale?this.getAttributeDefaultValueInternal("XLogarithmicScale"):this.__xLogarithmicScale),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXShowLabels(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("XShowLabels")),convertedValue!==this.__xShowLabels&&(this.__xShowLabels=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"XShowLabels"}),this.__processXShowLabels())}getXShowLabels(){return this.__xShowLabels}__processXShowLabels(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let xAxis=this.__lineChart.getXAxis();null!=xAxis&&(xAxis.setShowLabels(void 0===this.__xShowLabels?this.getAttributeDefaultValueInternal("XShowLabels"):this.__xShowLabels),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXAxisLabeling(valueNew){let convertedValue=TcHmi.ValueConverter.toString(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("XAxisLabeling")),convertedValue!==this.__xAxisLabeling&&(this.__xAxisLabeling=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"XAxisLabeling"}),this.__processXAxisLabeling())}getXAxisLabeling(){return this.__xAxisLabeling}__processXAxisLabeling(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let xAxis=this.__lineChart.getXAxis();null!=xAxis&&(xAxis.setAxisLabeling(AxisLabeling[this.__xAxisLabeling??this.getAttributeDefaultValueInternal("XAxisLabeling")]),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXMainTickMinValue(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("XMainTickMinValue")),convertedValue!==this.__xMainTickMinValue&&(this.__xMainTickMinValue=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"XMainTickMinValue"}),this.__processXMainTickMinValue())}getXMainTickMinValue(){return this.__xMainTickMinValue}__processXMainTickMinValue(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let xAxis=this.__lineChart.getXAxis();null!=xAxis&&(xAxis.setMainTickStartValue(void 0===this.__xMainTickMinValue?this.getAttributeDefaultValueInternal("XMainTickMinValue"):this.__xMainTickMinValue),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXMainTickMaxValue(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("XMainTickMaxValue")),convertedValue!==this.__xMainTickMaxValue&&(this.__xMainTickMaxValue=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"XMainTickMaxValue"}),this.__processXMainTickMaxValue())}getXMainTickMaxValue(){return this.__xMainTickMaxValue}__processXMainTickMaxValue(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let xAxis=this.__lineChart.getXAxis();null!=xAxis&&(xAxis.setMainTickEndValue(void 0===this.__xMainTickMaxValue?this.getAttributeDefaultValueInternal("XMainTickMaxValue"):this.__xMainTickMaxValue),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXMainTickSteps(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("XMainTickSteps")),convertedValue!==this.__xMainTickSteps&&(this.__xMainTickSteps=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"XMainTickSteps"}),this.__processXMainTickSteps())}getXMainTickSteps(){return this.__xMainTickSteps}__processXMainTickSteps(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let xAxis=this.__lineChart.getXAxis();null!=xAxis&&(xAxis.setMainTickSteps(void 0===this.__xMainTickSteps?this.getAttributeDefaultValueInternal("XMainTickSteps"):this.__xMainTickSteps),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setShowXSubTicks(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("ShowXSubTicks")),convertedValue!==this.__showXSubTicks&&(this.__showXSubTicks=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ShowXSubTicks"}),this.__processShowXSubTicks())}getShowXSubTicks(){return this.__showXSubTicks}__processShowXSubTicks(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let xAxis=this.__lineChart.getXAxis();null!=xAxis&&(xAxis.setShowSubTicks(void 0===this.__showXSubTicks?this.getAttributeDefaultValueInternal("ShowXSubTicks"):this.__showXSubTicks),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXSubTickSteps(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("XSubTickSteps")),convertedValue!==this.__xSubTickSteps&&(this.__xSubTickSteps=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"XSubTickSteps"}),this.__processXSubTickSteps())}getXSubTickSteps(){return this.__xSubTickSteps}__processXSubTickSteps(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let xAxis=this.__lineChart.getXAxis();null!=xAxis&&(xAxis.setSubTickSteps(void 0===this.__xSubTickSteps?this.getAttributeDefaultValueInternal("XSubTickSteps"):this.__xSubTickSteps),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXLabelFontFamily(valueNew){let convertedValue=TcHmi.ValueConverter.toFontFamily(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("XLabelFontFamily")),convertedValue!==this.__xLabelFontFamily&&(this.__xLabelFontFamily=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"XLabelFontFamily"}),this.__processXLabelFontFamily())}getXLabelFontFamily(){return this.__xLabelFontFamily}__processXLabelFontFamily(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let xAxis=this.__lineChart.getXAxis();null!=xAxis&&(xAxis.setLabelFontFamily(this.__xLabelFontFamily),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXLabelFontSize(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("XLabelFontSize")),convertedValue!==this.__xLabelFontSize&&(this.__xLabelFontSize=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"XLabelFontSize"}),this.__processXLabelFontSize())}getXLabelFontSize(){return this.__xLabelFontSize}__processXLabelFontSize(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let xAxis=this.__lineChart.getXAxis();null!=xAxis&&(xAxis.setLabelFontSize(void 0===this.__xLabelFontSize?this.getAttributeDefaultValueInternal("XLabelFontSize"):this.__xLabelFontSize),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXLabelFontSizeUnit(valueNew){}getXLabelFontSizeUnit(){return"px"}setXLabelFontWeight(valueNew){let convertedValue=TcHmi.ValueConverter.toFontWeight(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("XLabelFontWeight")),convertedValue!==this.__xLabelFontWeight&&(this.__xLabelFontWeight=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"XLabelFontWeight"}),this.__processXLabelFontWeight())}getXLabelFontWeight(){return this.__xLabelFontWeight}__processXLabelFontWeight(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let xAxis=this.__lineChart.getXAxis();null!=xAxis&&(xAxis.setLabelFontWeight(void 0===this.__xLabelFontWeight?this.getAttributeDefaultValueInternal("XLabelFontWeight"):this.__xLabelFontWeight),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXLabelFontColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("XLabelFontColor"));let resolverInfo=this.__objectResolvers.get("xLabelFontColor");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("XLabelFontColor")?.type});this.__objectResolvers.set("xLabelFontColor",{resolver,watchCallback:this.__onResolverForXLabelFontColorWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForXLabelFontColorWatchCallback)})}__onResolverForXLabelFontColorWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("xLabelFontColor"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__xLabelFontColor)||(this.__xLabelFontColor=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"XLabelFontColor"}),this.__processXLabelFontColor()):TcHmi.Log.Controls.error(this,TcHmiLineChart.#tchmiFQN,{Attribute:"XLabelFontColor"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getXLabelFontColor(){return this.__xLabelFontColor}__processXLabelFontColor(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let xAxis=this.__lineChart.getXAxis();null!=xAxis&&(TcHmi.isSolidColor(this.__xLabelFontColor)?xAxis.setLabelFontColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(this.__xLabelFontColor)):xAxis.setLabelFontColor(null),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXAxisWidth(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("XAxisWidth")),convertedValue!==this.__xAxisWidth&&(this.__xAxisWidth=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"XAxisWidth"}),this.__processXAxisWidth())}getXAxisWidth(){return this.__xAxisWidth}__processXAxisWidth(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let xAxis=this.__lineChart.getXAxis();null!=xAxis&&(xAxis.setAxisWidth(void 0===this.__xAxisWidth?this.getAttributeDefaultValueInternal("XAxisWidth"):this.__xAxisWidth),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXAxisColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("XAxisColor"));let resolverInfo=this.__objectResolvers.get("xAxisColor");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("XAxisColor")?.type});this.__objectResolvers.set("xAxisColor",{resolver,watchCallback:this.__onResolverForXAxisColorWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForXAxisColorWatchCallback)})}__onResolverForXAxisColorWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("xAxisColor"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__xAxisColor)||(this.__xAxisColor=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"XAxisColor"}),this.__processXAxisColor()):TcHmi.Log.Controls.error(this,TcHmiLineChart.#tchmiFQN,{Attribute:"XAxisColor"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getXAxisColor(){return this.__xAxisColor}__processXAxisColor(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let xAxis=this.__lineChart.getXAxis();null!=xAxis&&(TcHmi.isSolidColor(this.__xAxisColor)?xAxis.setAxisColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(this.__xAxisColor)):xAxis.setAxisColor(null),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setShowXAxisName(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("ShowXAxisName")),convertedValue!==this.__showXAxisName&&(this.__showXAxisName=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ShowXAxisName"}),this.__processShowXAxisName())}getShowXAxisName(){return this.__showXAxisName}__processShowXAxisName(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let xAxis=this.__lineChart.getXAxis();null!=xAxis&&(xAxis.setShowAxisName(void 0===this.__showXAxisName?this.getAttributeDefaultValueInternal("ShowXAxisName"):this.__showXAxisName),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXAxisName(valueNew){let convertedValue=TcHmi.ValueConverter.toString(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("XAxisName")),convertedValue!==this.__xAxisName&&(this.__xAxisName=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"XAxisName"}),this.__processXAxisName())}getXAxisName(){return this.__xAxisName}__processXAxisName(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let xAxis=this.__lineChart.getXAxis();null!=xAxis&&(xAxis.setAxisName(void 0===this.__xAxisName?this.getAttributeDefaultValueInternal("XAxisName"):this.__xAxisName),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXAxisNameFontFamily(valueNew){let convertedValue=TcHmi.ValueConverter.toFontFamily(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("XAxisNameFontFamily")),convertedValue!==this.__xAxisNameFontFamily&&(this.__xAxisNameFontFamily=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"XAxisNameFontFamily"}),this.__processXAxisNameFontFamily())}getXAxisNameFontFamily(){return this.__xAxisNameFontFamily}__processXAxisNameFontFamily(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let xAxis=this.__lineChart.getXAxis();null!=xAxis&&(xAxis.setAxisNameFontFamily(this.__xAxisNameFontFamily),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXAxisNameFontSize(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("XAxisNameFontSize")),convertedValue!==this.__xAxisNameFontSize&&(this.__xAxisNameFontSize=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"XAxisNameFontSize"}),this.__processXAxisNameFontSize())}getXAxisNameFontSize(){return this.__xAxisNameFontSize}__processXAxisNameFontSize(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let xAxis=this.__lineChart.getXAxis();null!=xAxis&&(xAxis.setAxisNameFontSize(void 0===this.__xAxisNameFontSize?this.getAttributeDefaultValueInternal("XAxisNameFontSize"):this.__xAxisNameFontSize),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXAxisNameFontSizeUnit(valueNew){}getXAxisNameFontSizeUnit(){return"px"}setXAxisNameFontWeight(valueNew){let convertedValue=TcHmi.ValueConverter.toFontWeight(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("XAxisNameFontWeight")),convertedValue!==this.__xAxisNameFontWeight&&(this.__xAxisNameFontWeight=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"XAxisNameFontWeight"}),this.__processXAxisNameFontWeight())}getXAxisNameFontWeight(){return this.__xAxisNameFontWeight}__processXAxisNameFontWeight(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let xAxis=this.__lineChart.getXAxis();null!=xAxis&&(xAxis.setAxisNameFontWeight(void 0===this.__xAxisNameFontWeight?this.getAttributeDefaultValueInternal("XAxisNameFontWeight"):this.__xAxisNameFontWeight),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXAxisNameFontColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("XAxisNameFontColor"));let resolverInfo=this.__objectResolvers.get("xAxisNameFontColor");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("XAxisNameFontColor")?.type});this.__objectResolvers.set("xAxisNameFontColor",{resolver,watchCallback:this.__onResolverForXAxisNameFontColorWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForXAxisNameFontColorWatchCallback)})}__onResolverForXAxisNameFontColorWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("xAxisNameFontColor"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__xAxisNameFontColor)||(this.__xAxisNameFontColor=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"XAxisNameFontColor"}),this.__processXAxisNameFontColor()):TcHmi.Log.Controls.error(this,TcHmiLineChart.#tchmiFQN,{Attribute:"XAxisNameFontColor"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getXAxisNameFontColor(){return this.__xAxisNameFontColor}__processXAxisNameFontColor(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let xAxis=this.__lineChart.getXAxis();null!=xAxis&&(TcHmi.isSolidColor(this.__xAxisNameFontColor)?xAxis.setAxisNameFontColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(this.__xAxisNameFontColor)):xAxis.setAxisNameFontColor(null),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXAxisDecimalPlaces(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("XAxisDecimalPlaces")),convertedValue!==this.__xAxisDecimalPlaces&&(this.__xAxisDecimalPlaces=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"XAxisDecimalPlaces"}),this.__processXAxisDecimalPlaces())}getXAxisDecimalPlaces(){return this.__xAxisDecimalPlaces}__processXAxisDecimalPlaces(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let xAxis=this.__lineChart.getXAxis();null!=xAxis&&(xAxis.setDecimalPlaces(void 0===this.__xAxisDecimalPlaces?this.getAttributeDefaultValueInternal("XAxisDecimalPlaces"):this.__xAxisDecimalPlaces),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXAxisUnit(valueNew){let convertedValue=TcHmi.ValueConverter.toString(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("XAxisUnit")),convertedValue!==this.__xAxisUnit&&(this.__xAxisUnit=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"XAxisUnit"}),this.__processXAxisUnit())}getXAxisUnit(){return this.__xAxisUnit}__processXAxisUnit(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let xAxis=this.__lineChart.getXAxis();null!=xAxis&&(xAxis.setUnit(void 0===this.__xAxisUnit?this.getAttributeDefaultValueInternal("XAxisUnit"):this.__xAxisUnit),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXAxisAutoScaling(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("XAxisAutoScaling")),convertedValue!==this.__xAxisAutoScaling&&(this.__xAxisAutoScaling=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"XAxisAutoScaling"}),this.__processXAxisAutoScaling())}getXAxisAutoScaling(){return this.__xAxisAutoScaling}__processXAxisAutoScaling(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let xAxis=this.__lineChart.getXAxis();null!=xAxis&&(xAxis.setAutoScaling(void 0===this.__xAxisAutoScaling?this.getAttributeDefaultValueInternal("XAxisAutoScaling"):this.__xAxisAutoScaling),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXAxisFormat(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("XAxisFormat"));let resolverInfo=this.__objectResolvers.get("xAxisFormat");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("XAxisFormat")?.type});this.__objectResolvers.set("xAxisFormat",{resolver,watchCallback:this.__onResolverForXAxisFormatWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForXAxisFormatWatchCallback)})}__onResolverForXAxisFormatWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("xAxisFormat"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__xAxisFormat)||(this.__xAxisFormat=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"XAxisFormat"}),this.__processXAxisFormat()):TcHmi.Log.Controls.error(this,TcHmiLineChart.#tchmiFQN,{Attribute:"XAxisFormat"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getXAxisFormat(){return this.__xAxisFormat}__processXAxisFormat(){if(this.__lineChart){let xAxis=this.__lineChart.getXAxis();xAxis&&(xAxis.setXAxisCallback(this.__executeXAxisFormatFunction),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}__executeXAxisFormatFunction(result){if(void 0!==this.__xAxisFormat&&null!==this.__xAxisFormat&&!1!==this.__xAxisFormat.active){const args=[result];let res=null,f=new TcHmi.Function(this.__xAxisFormat);if(!f.isProcessedAsync())return f.executeEx(args,data=>{data.error===TcHmi.Errors.NONE&&void 0!==data.result?res=data.result:TcHmi.Log.Controls.error(this,TcHmiLineChart.#tchmiFQN,`Execution of function=${this.__xAxisFormat?.fn} failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}),f.destroy(),res;TcHmi.Log.Controls.error(this,TcHmiLineChart.#tchmiFQN,`Execution of function=${this.__xAxisFormat?.fn} was aborted because it will be processed asynchronous and a synchronous running function call is required. Either the function is running asynchronous by definition or asynchronous running symbols were added to the list of parameters.`)}if(TcHmi.ValueConverter.toEnum(this.__xAxisLabeling,AxisLabeling,AxisLabeling.Number)===AxisLabeling.Scientific&&this.__xAxisUnit)return result.toExponential()+this.__xAxisUnit;if(TcHmi.ValueConverter.toEnum(this.__xAxisLabeling,AxisLabeling,AxisLabeling.Number)===AxisLabeling.Number&&this.__xAxisUnit){let powSplit=result.toExponential().split("e");if(1===powSplit.length)return powSplit[0]+" "+this.__xAxisUnit;if(2===powSplit.length&&Number(powSplit[1])<1&&0!==Number(powSplit[1])){let expo=Math.abs(Number(powSplit[1]));return Number(result.toExponential()).toFixed(expo)+" "+this.__xAxisUnit}return result+" "+this.__xAxisUnit}return this.__xAxisUnit?result+" "+this.__xAxisUnit:result.toString()}__executeYAxisFormatFunction(format,value){if(null!=format&&!1!==format.active){const args=[value];let res=null,f=new TcHmi.Function(format);if(f.isProcessedAsync())TcHmi.Log.Controls.error(this,TcHmiLineChart.#tchmiFQN,`Execution of function=${format.fn} was aborted because it will be processed asynchronous and a synchronous running function call is required. Either the function is running asynchronous by definition or asynchronous running symbols were added to the list of parameters.`);else{const parameters=f.getDescription()?.function.arguments;if(parameters?.length){const parameterSchema=tchmi_clone_object(TcHmi.Type.getSchema(parameters[0].type));if(parameterSchema&&TcHmi.Type.Schema.matchesSchemaType(value,parameterSchema))return f.executeEx(args,data=>{data.error===TcHmi.Errors.NONE&&void 0!==data.result?res=data.result:TcHmi.Log.Controls.error(this,TcHmiLineChart.#tchmiFQN,{Attribute:"Data"},"Execution of function="+format.fn+" failed with error: "+TcHmi.Log.buildMessage(data.details))}),f.destroy(),res}}}return null!=value?value+"":""}setYAxis(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("YAxis"));let resolverInfo=this.__objectResolvers.get("yAxis");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("YAxis")?.type});this.__objectResolvers.set("yAxis",{resolver,watchCallback:this.__onResolverForYAxisWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForYAxisWatchCallback)})}__onResolverForYAxisWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("yAxis"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__yAxis)||(this.__yAxis=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"YAxis"}),this.__processYAxis()):TcHmi.Log.Controls.error(this,TcHmiLineChart.#tchmiFQN,{Attribute:"YAxis"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getYAxis(){return this.__yAxis}__processYAxis(){this.__lineChart&&!this.__stopMode.isStopped&&this.__createInternals()}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,TcHmiLineChart.#tchmiFQN,{Attribute:"LineGraphDescriptions"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getLineGraphDescriptions(){return this.__lineGraphDescriptions}__processLineGraphDescriptions(){this.__createInternals()}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,TcHmiLineChart.#tchmiFQN,{Attribute:"LineGraphData"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getLineGraphData(){return this.__lineGraphData}__processLineGraphData(){if(this.__lineGraphDataInternal=[],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(const data of this.__lineGraphData??[]){let internalArray=[];for(let j=0,jj=data.length;j<jj;j++)internalArray.push({x:j,y:data[j]});array.push(internalArray)}this.__lineGraphDataInternal=array}else this.__lineGraphDataInternal=null}else{let array=[];for(const[index,data]of this.__lineGraphData.entries()??[])array.push({x:index,y:data});this.__lineGraphDataInternal=[array]}}else this.__lineGraphDataInternal=null;else this.__lineGraphDataInternal=null;this.__createInternals()}setReferenceLines(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("ReferenceLines"));let resolverInfo=this.__objectResolvers.get("referenceLines");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("ReferenceLines")?.type});this.__objectResolvers.set("referenceLines",{resolver,watchCallback:this.__onResolverForReferenceLinesWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForReferenceLinesWatchCallback)})}__onResolverForReferenceLinesWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("referenceLines"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__referenceLines)||(this.__referenceLines=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ReferenceLines"}),this.__processReferenceLines()):TcHmi.Log.Controls.error(this,TcHmiLineChart.#tchmiFQN,{Attribute:"ReferenceLines"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getReferenceLines(){return this.__referenceLines}__processReferenceLines(){this.__internalReferenceLines=tchmi_clone_object(this.__referenceLines),null!==this.__lineChart&&void 0!==this.__lineChart&&this.__drawLineChart()}setReferenceLinesPosition(valueNew){let convertedValue=TcHmi.ValueConverter.toString(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("ReferenceLinesPosition")),convertedValue!==this.__referenceLinesPosition&&(this.__referenceLinesPosition=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ReferenceLinesPosition"}),this.__processReferenceLinesPosition())}getReferenceLinesPosition(){return this.__referenceLinesPosition}__processReferenceLinesPosition(){!this.__attributesInitialized||null!==this.__lineChart&&void 0!==this.__lineChart?this.__attributesInitialized&&null!==this.__lineChart&&void 0!==this.__lineChart&&(this.__lineChart.remove(),this.__lineChart=null,this.__drawLineChart()):this.__drawLineChart()}setShowGrid(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("ShowGrid")),convertedValue!==this.__showGrid&&(this.__showGrid=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ShowGrid"}),this.__processShowGrid())}getShowGrid(){return this.__showGrid}__processShowGrid(){if(null!==this.__lineChart&&void 0!==this.__lineChart){if(this.__showGrid){let grid=this.__lineChart.getGrid();null==grid&&(this.__lineChart.addGrid(),grid=this.__lineChart.getGrid(),null!=grid&&(TcHmi.isSolidColor(this.__gridBackgroundColor)?grid.setBackgroundColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(this.__gridBackgroundColor)):grid.setBackgroundColor(null),TcHmi.isSolidColor(this.__gridLineColor)?grid.setLineColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(this.__gridLineColor)):grid.setLineColor(null),grid.setLineWidth(void 0===this.__gridLineWidth?this.getAttributeDefaultValueInternal("GridLineWidth"):this.__gridLineWidth),grid.setLineStyle(this.__gridLineStyle??this.getAttributeDefaultValueInternal("GridLineStyle")),grid.setShowHorizontalLines(void 0===this.__gridShowHorizontalLines?this.getAttributeDefaultValueInternal("GridShowHorizontalLines"):this.__gridShowHorizontalLines),grid.setShowVerticalLines(void 0===this.__gridShowVerticalLines?this.getAttributeDefaultValueInternal("GridShowVerticalLines"):this.__gridShowVerticalLines)))}else this.__lineChart.deleteGrid();this.__lineChart.setHasChanged(!0),this.__lineChart.draw()}}setGridBackgroundColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("GridBackgroundColor"));let resolverInfo=this.__objectResolvers.get("gridBackgroundColor");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("GridBackgroundColor")?.type});this.__objectResolvers.set("gridBackgroundColor",{resolver,watchCallback:this.__onResolverForGridBackgroundColorWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForGridBackgroundColorWatchCallback)})}__onResolverForGridBackgroundColorWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("gridBackgroundColor"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__gridBackgroundColor)||(this.__gridBackgroundColor=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"GridBackgroundColor"}),this.__processGridBackgroundColor()):TcHmi.Log.Controls.error(this,TcHmiLineChart.#tchmiFQN,{Attribute:"GridBackgroundColor"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getGridBackgroundColor(){return this.__gridBackgroundColor}__processGridBackgroundColor(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let grid=this.__lineChart.getGrid();null!=grid&&(TcHmi.isSolidColor(this.__gridBackgroundColor)?grid.setBackgroundColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(this.__gridBackgroundColor)):grid.setBackgroundColor(null),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setGridShowHorizontalLines(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("GridShowHorizontalLines")),convertedValue!==this.__gridShowHorizontalLines&&(this.__gridShowHorizontalLines=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"GridShowHorizontalLines"}),this.__processGridShowHorizontalLines())}getGridShowHorizontalLines(){return this.__gridShowHorizontalLines}__processGridShowHorizontalLines(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let grid=this.__lineChart.getGrid();null!=grid&&(grid.setShowHorizontalLines(void 0===this.__gridShowHorizontalLines?this.getAttributeDefaultValueInternal("GridShowHorizontalLines"):this.__gridShowHorizontalLines),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setGridShowVerticalLines(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("GridShowVerticalLines")),convertedValue!==this.__gridShowVerticalLines&&(this.__gridShowVerticalLines=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"GridShowVerticalLines"}),this.__processGridShowVerticalLines())}getGridShowVerticalLines(){return this.__gridShowVerticalLines}__processGridShowVerticalLines(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let grid=this.__lineChart.getGrid();null!=grid&&(grid.setShowVerticalLines(void 0===this.__gridShowVerticalLines?this.getAttributeDefaultValueInternal("GridShowVerticalLines"):this.__gridShowVerticalLines),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setGridLineWidth(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("GridLineWidth")),convertedValue!==this.__gridLineWidth&&(this.__gridLineWidth=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"GridLineWidth"}),this.__processGridLineWidth())}getGridLineWidth(){return this.__gridLineWidth}__processGridLineWidth(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let grid=this.__lineChart.getGrid();null!=grid&&(grid.setLineWidth(void 0===this.__gridLineWidth?this.getAttributeDefaultValueInternal("GridLineWidth"):this.__gridLineWidth),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setGridLineStyle(valueNew){let convertedValue=TcHmi.ValueConverter.toString(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("GridLineStyle")),convertedValue!==this.__gridLineStyle&&(this.__gridLineStyle=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"GridLineStyle"}),this.__processGridLineStyle())}getGridLineStyle(){return this.__gridLineStyle}__processGridLineStyle(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let grid=this.__lineChart.getGrid();null!=grid&&(grid.setLineStyle(this.__gridLineStyle??this.getAttributeDefaultValueInternal("GridLineStyle")),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setGridLineColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("GridLineColor"));let resolverInfo=this.__objectResolvers.get("gridLineColor");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("GridLineColor")?.type});this.__objectResolvers.set("gridLineColor",{resolver,watchCallback:this.__onResolverForGridLineColorWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForGridLineColorWatchCallback)})}__onResolverForGridLineColorWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("gridLineColor"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__gridLineColor)||(this.__gridLineColor=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"GridLineColor"}),this.__processGridLineColor()):TcHmi.Log.Controls.error(this,TcHmiLineChart.#tchmiFQN,{Attribute:"GridLineColor"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getGridLineColor(){return this.__gridLineColor}__processGridLineColor(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let grid=this.__lineChart.getGrid();null!=grid&&(TcHmi.isSolidColor(this.__gridLineColor)?grid.setLineColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(this.__gridLineColor)):grid.setLineColor(null),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setSubgridShowHorizontalLines(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("SubgridShowHorizontalLines")),convertedValue!==this.__subgridShowHorizontalLines&&(this.__subgridShowHorizontalLines=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"SubgridShowHorizontalLines"}),this.__processSubgridShowHorizontalLines())}getSubgridShowHorizontalLines(){return this.__subgridShowHorizontalLines}__processSubgridShowHorizontalLines(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let subgrid=this.__lineChart.getSubgrid();null!=subgrid&&(subgrid.setShowHorizontalLines(void 0===this.__subgridShowHorizontalLines?this.getAttributeDefaultValueInternal("SubgridShowHorizontalLines"):this.__subgridShowHorizontalLines),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setSubgridShowVerticalLines(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("SubgridShowVerticalLines")),convertedValue!==this.__subgridShowVerticalLines&&(this.__subgridShowVerticalLines=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"SubgridShowVerticalLines"}),this.__processSubgridShowVerticalLines())}getSubgridShowVerticalLines(){return this.__subgridShowVerticalLines}__processSubgridShowVerticalLines(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let subgrid=this.__lineChart.getSubgrid();null!=subgrid&&(subgrid.setShowVerticalLines(void 0===this.__subgridShowVerticalLines?this.getAttributeDefaultValueInternal("SubgridShowVerticalLines"):this.__subgridShowVerticalLines),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setSubgridLineWidth(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("SubgridLineWidth")),convertedValue!==this.__subgridLineWidth&&(this.__subgridLineWidth=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"SubgridLineWidth"}),this.__processSubgridLineWidth())}getSubgridLineWidth(){return this.__subgridLineWidth}__processSubgridLineWidth(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let subgrid=this.__lineChart.getSubgrid();null!=subgrid&&(subgrid.setLineWidth(void 0===this.__subgridLineWidth?this.getAttributeDefaultValueInternal("SubgridLineWidth"):this.__subgridLineWidth),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setSubgridLineStyle(valueNew){let convertedValue=TcHmi.ValueConverter.toString(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("SubgridLineStyle")),convertedValue!==this.__subgridLineStyle&&(this.__subgridLineStyle=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"SubgridLineStyle"}),this.__processSubgridLineStyle())}getSubgridLineStyle(){return this.__subgridLineStyle}__processSubgridLineStyle(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let subgrid=this.__lineChart.getSubgrid();null!=subgrid&&(subgrid.setLineStyle(this.__subgridLineStyle??this.getAttributeDefaultValueInternal("SubgridLineStyle")),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setSubgridLineColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("SubgridLineColor"));let resolverInfo=this.__objectResolvers.get("subgridLineColor");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("SubgridLineColor")?.type});this.__objectResolvers.set("subgridLineColor",{resolver,watchCallback:this.__onResolverForSubgridLineColorWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForSubgridLineColorWatchCallback)})}__onResolverForSubgridLineColorWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("subgridLineColor"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__subgridLineColor)||(this.__subgridLineColor=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"SubgridLineColor"}),this.__processSubgridLineColor()):TcHmi.Log.Controls.error(this,TcHmiLineChart.#tchmiFQN,{Attribute:"SubgridLineColor"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getSubgridLineColor(){return this.__subgridLineColor}__processSubgridLineColor(){if(null!==this.__lineChart&&void 0!==this.__lineChart){let subgrid=this.__lineChart.getSubgrid();null!=subgrid&&(TcHmi.isSolidColor(this.__subgridLineColor)?subgrid.setLineColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(this.__subgridLineColor)):subgrid.setLineColor(null),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setShowTooltip(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("ShowTooltip")),convertedValue!==this.__showTooltip&&(this.__showTooltip=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ShowTooltip"}),this.__processShowTooltip())}getShowTooltip(){return this.__showTooltip}__processShowTooltip(){}setTooltipFormat(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("TooltipFormat"));let resolverInfo=this.__objectResolvers.get("tooltipFormat");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("TooltipFormat")?.type});this.__objectResolvers.set("tooltipFormat",{resolver,watchCallback:this.__onResolverForTooltipFormatWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForTooltipFormatWatchCallback)})}__onResolverForTooltipFormatWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("tooltipFormat"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__tooltipFormat)||(this.__tooltipFormat=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TooltipFormat"}),this.__processTooltipFormat()):TcHmi.Log.Controls.error(this,TcHmiLineChart.#tchmiFQN,{Attribute:"TooltipFormat"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getTooltipFormat(){return this.__tooltipFormat}__processTooltipFormat(){if(this.__tooltipInformation.show&&this.__tooltipInformation.points.length>0){let tooptipFormat=this.__executeTooltipFormatFunction(this.__tooltipInformation.points[0].xValue,this.__tooltipInformation.points[0].yValue)??"";this.__elementTooltipText[0].innerHTML=tooptipFormat}}__executeTooltipFormatFunction(xValue,yValue){if(void 0!==this.__tooltipFormat&&null!==this.__tooltipFormat&&!1!==this.__tooltipFormat.active){const args=[xValue,yValue];let res=null,f=new TcHmi.Function(this.__tooltipFormat);if(!f.isProcessedAsync())return f.executeEx(args,data=>{data.error===TcHmi.Errors.NONE&&void 0!==data.result?res=data.result:TcHmi.Log.Controls.error(this,TcHmiLineChart.#tchmiFQN,`Execution of function=${this.__tooltipFormat?.fn} failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}),f.destroy(),res;TcHmi.Log.Controls.error(this,TcHmiLineChart.#tchmiFQN,`Execution of function=${this.__tooltipFormat?.fn} was aborted because it will be processed asynchronous and a synchronous running function call is required. Either the function is running asynchronous by definition or asynchronous running symbols were added to the list of parameters.`)}return"x: "+xValue+"<br/>y: "+yValue}setTooltipFontFamily(valueNew){let convertedValue=TcHmi.ValueConverter.toFontFamily(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("TooltipFontFamily")),convertedValue!==this.__tooltipFontFamily&&(this.__tooltipFontFamily=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TooltipFontFamily"}),this.__processTooltipFontFamily())}getTooltipFontFamily(){return this.__tooltipFontFamily}__processTooltipFontFamily(){TcHmi.StyleProvider.setSimpleElementStyle(this.__elementTooltip,{"font-family":this.__tooltipFontFamily})}setTooltipFontSize(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("TooltipFontSize")),convertedValue!==this.__tooltipFontSize&&(this.__tooltipFontSize=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TooltipFontSize"}),this.__processTooltipFontSize())}getTooltipFontSize(){return this.__tooltipFontSize}__processTooltipFontSize(){TcHmi.StyleProvider.setSimpleElementStyle(this.__elementTooltip,{"font-size":(this.__tooltipFontSize?this.__tooltipFontSize:this.getAttributeDefaultValueInternal("TooltipFontSize"))+"px"})}setTooltipFontSizeUnit(valueNew){}getTooltipFontSizeUnit(){return"px"}setTooltipFontWeight(valueNew){let convertedValue=TcHmi.ValueConverter.toFontWeight(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("TooltipFontWeight")),convertedValue!==this.__tooltipFontWeight&&(this.__tooltipFontWeight=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TooltipFontWeight"}),this.__processTooltipFontWeight())}getTooltipFontWeight(){return this.__tooltipFontWeight}__processTooltipFontWeight(){TcHmi.StyleProvider.setSimpleElementStyle(this.__elementTooltip,{"font-weight":this.__tooltipFontWeight})}setTooltipFontColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("TooltipFontColor"));let resolverInfo=this.__objectResolvers.get("tooltipFontColor");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("TooltipFontColor")?.type});this.__objectResolvers.set("tooltipFontColor",{resolver,watchCallback:this.__onResolverForTooltipFontColorWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForTooltipFontColorWatchCallback)})}__onResolverForTooltipFontColorWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("tooltipFontColor"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__tooltipFontColor)||(this.__tooltipFontColor=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TooltipFontColor"}),this.__processTooltipFontColor()):TcHmi.Log.Controls.error(this,TcHmiLineChart.#tchmiFQN,{Attribute:"TooltipFontColor"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getTooltipFontColor(){return this.__tooltipFontColor}__processTooltipFontColor(){let lineColor=null,lineGraph=this.__tooltipInformation.lineGraph;null!==lineGraph&&(lineColor=lineGraph.getLineColor()),TcHmi.isSolidColor(this.__tooltipFontColor)&&(lineColor=TcHmi.StyleProvider.resolveSolidColorAsCssValue(this.__tooltipFontColor)),null!=lineColor&&this.__elementTooltipText.css("color",lineColor)}setTooltipBackgroundColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("TooltipBackgroundColor"));let resolverInfo=this.__objectResolvers.get("tooltipBackgroundColor");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("TooltipBackgroundColor")?.type});this.__objectResolvers.set("tooltipBackgroundColor",{resolver,watchCallback:this.__onResolverForTooltipBackgroundColorWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForTooltipBackgroundColorWatchCallback)})}__onResolverForTooltipBackgroundColorWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("tooltipBackgroundColor"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__tooltipBackgroundColor)||(this.__tooltipBackgroundColor=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TooltipBackgroundColor"}),this.__processTooltipBackgroundColor()):TcHmi.Log.Controls.error(this,TcHmiLineChart.#tchmiFQN,{Attribute:"TooltipBackgroundColor"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getTooltipBackgroundColor(){return this.__tooltipBackgroundColor}__processTooltipBackgroundColor(){TcHmi.StyleProvider.processBackgroundColor(this.__elementTooltipText,this.__tooltipBackgroundColor),TcHmi.StyleProvider.processBackgroundColor(this.__elementTooltipArrow,this.__tooltipBackgroundColor)}setShowLegend(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("ShowLegend")),convertedValue!==this.__showLegend&&(this.__showLegend=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ShowLegend"}),this.__processShowLegend())}getShowLegend(){return this.__showLegend}__processShowLegend(){this.__createInternals()}setLegendFontFamily(valueNew){let convertedValue=TcHmi.ValueConverter.toFontFamily(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("LegendFontFamily")),convertedValue!==this.__legendFontFamily&&(this.__legendFontFamily=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"LegendFontFamily"}),this.__processLegendFontFamily())}getLegendFontFamily(){return this.__legendFontFamily}__processLegendFontFamily(){this.__isAttached&&(TcHmi.StyleProvider.processFontFamily(this.__elementLegend.children(".TcHmi_Controls_Beckhoff_TcHmiLineChart-template-legend-checkbox-label"),this.__legendFontFamily),this.__drawLineChart())}setLegendFontSize(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("LegendFontSize")),convertedValue!==this.__legendFontSize&&(this.__legendFontSize=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"LegendFontSize"}),this.__processLegendFontSize())}getLegendFontSize(){return this.__legendFontSize}__processLegendFontSize(){this.__isAttached&&(TcHmi.StyleProvider.processFontSize(this.__elementLegend.children(".TcHmi_Controls_Beckhoff_TcHmiLineChart-template-legend-checkbox-label"),this.__legendFontSize,"px"),this.__drawLineChart())}getLegendFontSizeUnit(){return"px"}setLegendFontStyle(valueNew){let convertedValue=TcHmi.ValueConverter.toFontStyle(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("LegendFontStyle")),convertedValue!==this.__legendFontStyle&&(this.__legendFontStyle=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"LegendFontStyle"}),this.__processLegendFontStyle())}getLegendFontStyle(){return this.__legendFontStyle}__processLegendFontStyle(){this.__isAttached&&(TcHmi.StyleProvider.processFontStyle(this.__elementLegend.children(".TcHmi_Controls_Beckhoff_TcHmiLineChart-template-legend-checkbox-label"),this.__legendFontStyle),this.__drawLineChart())}setLegendFontWeight(valueNew){let convertedValue=TcHmi.ValueConverter.toFontWeight(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("LegendFontWeight")),convertedValue!==this.__legendFontWeight&&(this.__legendFontWeight=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"LegendFontWeight"}),this.__processLegendFontWeight())}getLegendFontWeight(){return this.__legendFontWeight}__processLegendFontWeight(){this.__isAttached&&(TcHmi.StyleProvider.processFontWeight(this.__elementLegend.children(".TcHmi_Controls_Beckhoff_TcHmiLineChart-template-legend-checkbox-label"),this.__legendFontWeight),this.__drawLineChart())}setShowMenuBar(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew)??this.getAttributeDefaultValueInternal("ShowMenuBar");convertedValue!==this.__showMenuBar&&(this.__showMenuBar=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ShowMenuBar"}),this.__processShowMenuBar())}getShowMenuBar(){return this.__showMenuBar}__processShowMenuBar(){this.__isAttached&&(this.__showMenuBar&&!this.__menubar&&(this.__menubar=new Menubar(this),this.__elementMenuBar.append(this.__menubar.getMenubar()),this.__stopMode.isStopped?this.__menubar?.setMenubarButtonsEnabled({playButtonEnable:!0,pauseButtonEnable:!1,panXToggleButtonEnable:!0,panXYToggleButtonEnable:!0,zoomXToggleButtonEnable:!0,zoomXYToggleButtonEnable:!0,resetZoomButtonEnable:!0}):this.__menubar?.setMenubarButtonsEnabled({playButtonEnable:!1,pauseButtonEnable:!0,panXToggleButtonEnable:!1,panXYToggleButtonEnable:!1,zoomXToggleButtonEnable:!1,zoomXYToggleButtonEnable:!1,resetZoomButtonEnable:!1})),this.__showMenuBar&&void 0!==this.__menuBarPosition?this.__elementMenuBar[0].style.display="flex":this.__elementMenuBar[0].style.display="none",this.setSectionsPositions(),this.__drawLineChart())}setMenuBarPosition(valueNew){let convertedValue=TcHmi.ValueConverter.toString(valueNew)??this.getAttributeDefaultValueInternal("MenuBarPosition");tchmi_equal(convertedValue,this.__menuBarPosition)||(this.__menuBarPosition=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"MenuBarPosition"}),this.__processMenuBarPosition())}getMenuBarPosition(){return this.__menuBarPosition}__processMenuBarPosition(){if(this.__isAttached){if(this.__showMenuBar&&void 0!==this.__menuBarPosition){let sizes=this.__calcSizes();MenuBarPosition[this.__menuBarPosition]===MenuBarPosition.Top?this.__elementChart.css({height:`${sizes.height}px`,top:`${sizes.top}px`}):MenuBarPosition[this.__menuBarPosition]===MenuBarPosition.Bottom&&(this.__showLegend?this.__elementChart.css({height:`${sizes.height}px`,top:`${sizes.top}px`}):this.__elementChart.css({height:`${sizes.height}px`,top:"0px"}))}else this.__elementChart.css({height:"calc(100% - 10px)",top:"0px"});this.setSectionsPositions()}}getMenuBarElement(){return this.__elementMenuBar}setMouseMode(valueNew){let convertedValue=TcHmi.ValueConverter.toEnum(valueNew,MouseMode)??TcHmi.ValueConverter.toEnum(this.getAttributeDefaultValueInternal("MouseMode"),MouseMode,MouseMode.PanX);tchmi_equal(convertedValue,this.__mouseMode)||(this.__mouseMode=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"MouseMode"}),this.__processMouseMode())}getMouseMode(){if(this.__mouseMode!==MouseMode.None)return MouseMode[this.__mouseMode]}__processMouseMode(){this.__menubar?.setActiveToggleButton(this.__mouseMode)}static Position=Position;static LineStyle=LineStyle;static AxisLabeling=AxisLabeling;static Orientation=Orientation;static ValueUnit=ValueUnit;static FillMode=FillMode;static MenuBarPosition=MenuBarPosition;static MouseMode=MouseMode}})();TcHmi.Controls.registerEx("TcHmiLineChart","TcHmi.Controls.Beckhoff",TcHmiLineChart,{injectInGlobalObject:!0});export{TcHmiLineChart as Control};