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

1 line
203 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";import*as Helper from"./TcHmiTrendHelper.js";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={}));export var MenuBarPosition;!function(MenuBarPosition){MenuBarPosition[MenuBarPosition.Bottom=0]="Bottom",MenuBarPosition[MenuBarPosition.Top=1]="Top"}(MenuBarPosition||(MenuBarPosition={}));export var Datatype;!function(Datatype){Datatype[Datatype.Datetime=0]="Datetime",Datatype[Datatype.Timespan=1]="Timespan",Datatype[Datatype.Keyword=2]="Keyword"}(Datatype||(Datatype={}));export var Position;!function(Position){Position[Position.Left=0]="Left",Position[Position.Right=1]="Right"}(Position||(Position={}));export var 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 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 ValueUnit;!function(ValueUnit){ValueUnit.Value="Value",ValueUnit["%"]="%"}(ValueUnit||(ValueUnit={}));let TcHmiTrendLineChart=(()=>{var _a,_b,_c,_d,_e,_f,_g,_h,_j,_k,_l,_m,_o,_p,_q,_r,_s,_t,_u,_v,_w,_x;let ___rebuild_decorators,___getDataCallback_decorators,___onCheckboxMouseDown_decorators,___onCheckboxTouchStart_decorators,___onMouseMoveTooltip_decorators,___onClick_decorators,___onMouseDown_decorators,___onMouseMove_decorators,___onMouseUp_decorators,___onTouchStart_decorators,___onTouchMove_decorators,___onTouchEnd_decorators,___onMouseWheel_decorators,___onResolverForXAxisFormatWatchCallback_decorators,___xAxisCallbackFunction_decorators,___onResolverForSectionsBackgroundColorWatchCallback_decorators,___onResolverForXLabelFontColorWatchCallback_decorators,___onResolverForXAxisColorWatchCallback_decorators,___onResolverForXAxisNameFontColorWatchCallback_decorators,___onResolverForYAxisWatchCallback_decorators,___onResolverForLineGraphDescriptionsWatchCallback_decorators,___onResolverForGridBackgroundColorWatchCallback_decorators,___onResolverForGridLineColorWatchCallback_decorators,___onResolverForSubgridLineColorWatchCallback_decorators,___onResolverForMenuBarLabelFontColorWatchCallback_decorators,___onResolverForTooltipFormatWatchCallback_decorators,___executeYAxisFormatFunction_decorators,___onResolverForTooltipFontColorWatchCallback_decorators,___onResolverForTooltipBackgroundColorWatchCallback_decorators,___onResolverForStartPresetsWatchCallback_decorators,___onResolverForEndPresetsWatchCallback_decorators,___onResolverForReferenceLinesWatchCallback_decorators,___onResolverForStatisticalDataConfigurationWatchCallback_decorators,_classSuper=TcHmiControl.Control,_instanceExtraInitializers=[];return class TcHmiTrendLineChart extends _classSuper{static{const _metadata="function"==typeof Symbol&&Symbol.metadata?Object.create(_classSuper[Symbol.metadata]??null):void 0;___rebuild_decorators=[(_a=TcHmi).CallbackMethod.bind(_a)],___getDataCallback_decorators=[(_b=TcHmi).CallbackMethod.bind(_b)],___onCheckboxMouseDown_decorators=[TcHmi.EventHandler({checkIsEnabled:!0})],___onCheckboxTouchStart_decorators=[TcHmi.EventHandler({checkIsEnabled:!0})],___onMouseMoveTooltip_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})],___onTouchStart_decorators=[TcHmi.EventHandler({checkIsEnabled:!0})],___onTouchMove_decorators=[TcHmi.EventHandler({checkIsEnabled:!0})],___onTouchEnd_decorators=[TcHmi.EventHandler({checkIsEnabled:!0})],___onMouseWheel_decorators=[TcHmi.EventHandler({checkIsEnabled:!0})],___onResolverForXAxisFormatWatchCallback_decorators=[(_c=TcHmi).CallbackMethod.bind(_c)],___xAxisCallbackFunction_decorators=[(_d=TcHmi).CallbackMethod.bind(_d)],___onResolverForSectionsBackgroundColorWatchCallback_decorators=[(_e=TcHmi).CallbackMethod.bind(_e)],___onResolverForXLabelFontColorWatchCallback_decorators=[(_f=TcHmi).CallbackMethod.bind(_f)],___onResolverForXAxisColorWatchCallback_decorators=[(_g=TcHmi).CallbackMethod.bind(_g)],___onResolverForXAxisNameFontColorWatchCallback_decorators=[(_h=TcHmi).CallbackMethod.bind(_h)],___onResolverForYAxisWatchCallback_decorators=[(_j=TcHmi).CallbackMethod.bind(_j)],___onResolverForLineGraphDescriptionsWatchCallback_decorators=[(_k=TcHmi).CallbackMethod.bind(_k)],___onResolverForGridBackgroundColorWatchCallback_decorators=[(_l=TcHmi).CallbackMethod.bind(_l)],___onResolverForGridLineColorWatchCallback_decorators=[(_m=TcHmi).CallbackMethod.bind(_m)],___onResolverForSubgridLineColorWatchCallback_decorators=[(_o=TcHmi).CallbackMethod.bind(_o)],___onResolverForMenuBarLabelFontColorWatchCallback_decorators=[(_p=TcHmi).CallbackMethod.bind(_p)],___onResolverForTooltipFormatWatchCallback_decorators=[(_q=TcHmi).CallbackMethod.bind(_q)],___executeYAxisFormatFunction_decorators=[(_r=TcHmi).CallbackMethod.bind(_r)],___onResolverForTooltipFontColorWatchCallback_decorators=[(_s=TcHmi).CallbackMethod.bind(_s)],___onResolverForTooltipBackgroundColorWatchCallback_decorators=[(_t=TcHmi).CallbackMethod.bind(_t)],___onResolverForStartPresetsWatchCallback_decorators=[(_u=TcHmi).CallbackMethod.bind(_u)],___onResolverForEndPresetsWatchCallback_decorators=[(_v=TcHmi).CallbackMethod.bind(_v)],___onResolverForReferenceLinesWatchCallback_decorators=[(_w=TcHmi).CallbackMethod.bind(_w)],___onResolverForStatisticalDataConfigurationWatchCallback_decorators=[(_x=TcHmi).CallbackMethod.bind(_x)],__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,___getDataCallback_decorators,{kind:"method",name:"__getDataCallback",static:!1,private:!1,access:{has:obj=>"__getDataCallback"in obj,get:obj=>obj.__getDataCallback},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,___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,___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,___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,___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,___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,___xAxisCallbackFunction_decorators,{kind:"method",name:"__xAxisCallbackFunction",static:!1,private:!1,access:{has:obj=>"__xAxisCallbackFunction"in obj,get:obj=>obj.__xAxisCallbackFunction},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,___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,___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,___onResolverForMenuBarLabelFontColorWatchCallback_decorators,{kind:"method",name:"__onResolverForMenuBarLabelFontColorWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForMenuBarLabelFontColorWatchCallback"in obj,get:obj=>obj.__onResolverForMenuBarLabelFontColorWatchCallback},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,___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,___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),__esDecorate(this,null,___onResolverForStartPresetsWatchCallback_decorators,{kind:"method",name:"__onResolverForStartPresetsWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForStartPresetsWatchCallback"in obj,get:obj=>obj.__onResolverForStartPresetsWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForEndPresetsWatchCallback_decorators,{kind:"method",name:"__onResolverForEndPresetsWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForEndPresetsWatchCallback"in obj,get:obj=>obj.__onResolverForEndPresetsWatchCallback},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,___onResolverForStatisticalDataConfigurationWatchCallback_decorators,{kind:"method",name:"__onResolverForStatisticalDataConfigurationWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForStatisticalDataConfigurationWatchCallback"in obj,get:obj=>obj.__onResolverForStatisticalDataConfigurationWatchCallback},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.TcHmiTrendLineChart.ChartYAxisDefinitionList")?.propertiesMeta;TcHmiTrendLineChart.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}}__elementTemplateRoot=__runInitializers(this,_instanceExtraInitializers);__elementChart;__elementMenuBar;__elementTooltip;__elementTooltipText;__elementTooltipArrow;__elementLoading;__elementLegend;__elementStatisticalData;__lineChart=null;__start;__internalStart=null;__internalStartServer=null;__actualStartTime=null;__startPresets;__end;__internalEnd=null;__internalEndServer=null;__actualEndTime=null;__endPresets;__sectionsBackgroundColor;__yAxisWidth;__yLabelFontFamily;__yLabelFontSize;__yLabelFontWeight;__yMainTickSteps;__showYSubTicks;__ySubTickSteps;__showXAxis;__xShowLabels;__xMainTickSteps;__showXSubTicks;__xSubTickSteps;__xLabelFontFamily;__xLabelFontSize;__xLabelFontWeight;__xLabelFontColor;__xAxisWidth;__xAxisColor;__showXAxisName;__xAxisName;__xAxisNameFontFamily;__xAxisNameFontSize;__xAxisNameFontWeight;__xAxisNameFontColor;__xAxisFormat;__yAxis;__yAxisInternal=[];__lineGraphDescriptions;__lineGraphDescriptionsOverride=null;__lineGraphDescriptionsInternal=null;__showGrid;__gridBackgroundColor;__gridShowHorizontalLines;__gridShowVerticalLines;__gridLineWidth;__gridLineStyle;__gridLineColor;__subgridShowHorizontalLines;__subgridShowVerticalLines;__subgridLineWidth;__subgridLineStyle;__subgridLineColor;__showMenuBar;__menuBarPosition;__menuBarLabelFontFamily;__menuBarLabelFontSize;__menuBarLabelFontWeight;__menuBarLabelFontStyle;__menuBarLabelFontColor;__showTooltip;__tooltipFormat;__tooltipFontFamily;__tooltipFontSize;__tooltipFontWeight;__tooltipFontColor;__tooltipBackgroundColor;__referenceLines;__referenceLinesPosition;__interval;__legendFontFamily;__legendFontSize;__legendFontStyle;__legendFontWeight;__showLegend;__serverDomain;__intServerDomain;__watchDomainFirstTick=!1;__actServerDomain;__showStatisticalData;__statisticalDataConfiguration;__analyticsType=["average","minimum","maximum"];__statisticalDataSrcColumn={symbol:{name:"symbol",label:"%l%Control::TcHmi.Controls.Beckhoff.TcHmiTrendLineChart::Column_Header_Symbol%/l%",control:"TextBlock",width:25,widthUnit:"%",resize:!0,minWidth:10,minWidthUnit:"px",editable:!1,horizontalAlignment:"Center",verticalAlignment:"Center"},min:{name:"min",label:"%l%Control::TcHmi.Controls.Beckhoff.TcHmiTrendLineChart::Column_Header_Min%/l%",control:"TextBlock",width:25,widthUnit:"%",resize:!0,minWidth:10,minWidthUnit:"px",editable:!1,horizontalAlignment:"Center",verticalAlignment:"Center"},max:{name:"max",label:"%l%Control::TcHmi.Controls.Beckhoff.TcHmiTrendLineChart::Column_Header_Max%/l%",control:"TextBlock",width:25,widthUnit:"%",resize:!0,minWidth:10,minWidthUnit:"px",editable:!1,horizontalAlignment:"Center",verticalAlignment:"Center"},average:{name:"average",label:"%l%Control::TcHmi.Controls.Beckhoff.TcHmiTrendLineChart::Column_Header_Average%/l%",control:"TextBlock",width:25,widthUnit:"%",resize:!0,minWidth:10,minWidthUnit:"px",editable:!1,horizontalAlignment:"Center",verticalAlignment:"Center"}};__lineGraphData=null;__lineGraphRawData=null;__startBeforeManipulation=null;__endBeforeManipulation=null;__mouseMode=MouseMode.None;__manipulationInfo={isStopped:!1,isManipulating:!1,multitouchMode:!1,click:!0,beginXAxisStart:null,beginXAxisEnd:null,beginYAxis:[],actualXAxisStart:null,actualXAxisEnd:null,beginData:[],actualYAxis:[],mousePositionStart:{x:0,y:0},mousePositionEnd:{x:0,y:0},offset:{left:0,top:0},scale:{x:1,y:1},transform:{x:0,y:0},first:{identifier:null},second:{identifier:null},distance:0,isWheeling:!1,wheelSteps:0,wheelTimeout:0,moveReferenceLine:!1,referenceLine:null};__zoomingCanvasContext=null;__lastInteraction=!1;__startEndBeforeZoom={end:null,start:null};__subscriptionId=null;__requestId=null;__getDataCounter=0;__tooltipInformation={show:!1,isActive:!1,time:0,points:[],errors:[],referenceLine:void 0};__startDatatype=null;__endDatatype=null;__utcOffset=0;__nowIsValueChanged=!1;__loadingSpinner;__holdTimer=0;__holdTimerDuration=300;__reconnectTimer=0;__reconnectTime=0;__localizedElements=new Map;__localizationReader=void 0;__storage;__activeLegendElements;__menubar;__statisticalDataDatagrid;__virtualMappingForControlRecord=[{controlRight:"operate",virtualControlRight:"changeSettings"}];__internalReferenceLines;__controlWidthInSubscription;__previnit(){if(this.__elementTemplateRoot=this.__element.find(".TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template, .tchmi-textbox-template"),this.__elementChart=this.__elementTemplateRoot.find(".TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-chart, .tchmi-textbox-template-chart"),this.__elementMenuBar=this.__elementTemplateRoot.find(".TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-menu-bar, .tchmi-textbox-template-menu-bar"),this.__elementTooltip=this.__elementTemplateRoot.find(".TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-tooltip, .tchmi-textbox-template-tooltip"),this.__elementTooltipText=this.__elementTemplateRoot.find(".TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-tooltip-text, .tchmi-textbox-template-tooltip-text"),this.__elementTooltipArrow=this.__elementTemplateRoot.find(".TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-tooltip-arrow, .tchmi-textbox-template-tooltip-arrow"),this.__elementLoading=this.__elementTemplateRoot.find(".TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-loading, .tchmi-textbox-template-loading"),this.__elementLegend=this.__elementTemplateRoot.find(".TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-legend"),this.__elementStatisticalData=this.__elementTemplateRoot.find(".TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-statistical-data"),this.__statisticalDataDatagrid=TcHmi.Controls.get(this.getId()+".statisticalData"),0===this.__elementTemplateRoot.length||0===this.__elementChart.length||0===this.__elementMenuBar.length||0===this.__elementTooltip.length||0===this.__elementTooltipText.length||0===this.__elementTooltipArrow.length||0===this.__elementLoading.length||0===this.__elementLegend.length||0===this.__elementStatisticalData.length||void 0===this.__statisticalDataDatagrid)throw new Error("Invalid Template.html");let loadingSpinnerDivTempDiv=document.createElement("div");loadingSpinnerDivTempDiv.innerHTML='<div\n class="TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-loading-spinner-container"\n >\n <div class="TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-loading-spinner">\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n </div>\n </div>',this.__loadingSpinner=loadingSpinnerDivTempDiv.firstElementChild;let localizedElements=this.__element[0].querySelectorAll("[data-tchmi-localized-content-key]");for(const element of localizedElements){let localizeKey=element.dataset.tchmiLocalizedContentKey;localizeKey&&this.__localizedElements.set(element,{key:localizeKey})}this.__destroyOnDestroy.push(this.__localization.watch(data=>{if(data.error===TcHmi.Errors.NONE&&data.reader){this.__localizationReader=data.reader;for(const[element,info]of this.__localizedElements){let localizedText=data.reader.get(info.key);info.parameters&&(localizedText=tchmi_format_string(localizedText,...info.parameters)),element.textContent=tchmi_decode_control_characters(localizedText)}}})),super.__previnit()}__init(){super.__init(),this.__storage=new TcHmi.LocalStorage(this,{activeLegendElements:this.getCurrentGraphLength(),lineGraphDescriptions:this.getCurrentGraphLength()}),this.__activeLegendElements=this.__storage.get("activeLegendElements"),this.__lineGraphDescriptionsOverride=this.__storage.get("lineGraphDescriptions")||null,this.__destroyOnDestroy.push(TcHmi.EventProvider.registerDomEvent(this.__elementLegend,"mousedown",this.__onCheckboxMouseDown),TcHmi.EventProvider.registerDomEvent(this.__elementLegend,"touchstart",this.__onCheckboxTouchStart))}__attach(){super.__attach();const passiveEventOptions={passive:!0,capture:!1},activeEventOptions={passive:!1,capture:!1};this.__destroyOnDetach.push(TcHmi.EventProvider.registerDomEvent(document,"mousemove",this.__onMouseMove,passiveEventOptions),TcHmi.EventProvider.registerDomEvent(document,"mouseup",this.__onMouseUp,passiveEventOptions),TcHmi.EventProvider.registerDomEvent(document,"touchmove",this.__onTouchMove,activeEventOptions),TcHmi.EventProvider.registerDomEvent(document,"touchend",this.__onTouchEnd,activeEventOptions),TcHmi.EventProvider.register(this.__id+".onResized",this.__rebuild),TcHmi.EventProvider.register("onThemeDataChanged",this.__rebuild),TcHmi.Server.Historize.watchDefaultDomain(data=>{this.__watchDomainFirstTick=!0,data.error?this.__intServerDomain=void 0:tchmi_equal(data.value,this.__intServerDomain)||(this.__intServerDomain=data.value,tchmi_equal(this.__intServerDomain,this.__actServerDomain)||this.__openWebsocket())}));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=>value.yAxisId===x.id);void 0===x.showAxisIfNoData&&TcHmiTrendLineChart.yAxisDefaultValueInternals||!x.showAxisIfNoData&&void 0!==lineGraphDesc&&lineGraphDesc.isSelected||x.showAxisIfNoData?x.isSelected=!0:x.isSelected=!1}),this.__processShowLegend(!1),this.__processShowMenuBar(),this.__processMenuBarPosition(),this.__processStatisticalDataConfiguration(),this.__processMenuBarLabelFontFamily(!1),this.__processMenuBarLabelFontSize(!1),this.__processMenuBarLabelFontStyle(!1),this.__processMenuBarLabelFontWeight(!1),this.__processMenuBarLabelFontColor(!1),this.__lineGraphDescriptionsInternal&&this.__lineGraphDescriptionsInternal.length>0&&this.__openWebsocket()}__detach(){super.__detach(),null!==this.__subscriptionId&&(TcHmi.Server.unsubscribeEx(this.__subscriptionId,{parallel:!0}),this.__subscriptionId=null),null!==this.__requestId&&(TcHmi.Server.releaseRequest(this.__requestId),this.__requestId=null),this.__lineChart&&(this.__lineChart.remove(),this.__lineChart=null),this.__holdTimer&&(clearTimeout(this.__holdTimer),this.__holdTimer=0),this.__manipulationInfo.wheelTimeout&&(window.clearTimeout(this.__manipulationInfo.wheelTimeout),this.__manipulationInfo.wheelTimeout=0)}destroy(){this.__keepAlive||(super.destroy(),this.__menubar?.destroy())}__addLocalizedElement(element,key,...parameters){let info={key};if(0!==parameters.length&&(info.parameters=parameters),this.__localizedElements.set(element,info),this.__localizationReader){let localizedText=this.__localizationReader.get(key);info.parameters&&(localizedText=tchmi_format_string(localizedText,...info.parameters)),element.textContent=tchmi_decode_control_characters(localizedText)}}__removeLocalizedElement(element){this.__localizedElements.delete(element)}__rebuild(_event,_ctrl){let width=this.__elementTemplateRoot.width();if(this.__isAttached&&!TCHMI_DESIGNER&&this.__lineGraphDescriptionsInternal&&this.__lineGraphDescriptionsInternal.length>0&&this.__controlWidthInSubscription!==width){const floodProtectionTime=500,now=Date.now();now-this.__reconnectTime>=floodProtectionTime?this.__openWebsocket():(clearTimeout(this.__reconnectTimer),this.__reconnectTimer=window.setTimeout(()=>{this.__reconnectTimer=0,this.__openWebsocket()},floodProtectionTime),this.__drawLineChart()),this.__reconnectTime=now}else this.__drawLineChart();this.__controlWidthInSubscription=width,this.__menubar?.calcMenuButtons()}__openWebsocket(){TCHMI_DESIGNER||(this.__elementLoading[0].appendChild(this.__loadingSpinner),this.__getData())}__getData(){if(this.__isAttached){if(this.__tooltipInformation.show&&(this.__elementTooltip.css("visibility","hidden"),this.__tooltipInformation={show:!1,isActive:!1,time:0,points:[],errors:[],referenceLine:void 0}),null!==this.__subscriptionId&&(TcHmi.Server.unsubscribeEx(this.__subscriptionId,{parallel:!0}),this.__subscriptionId=null),!this.__lineGraphDescriptionsInternal)return;const domain=this.getResolvedServerDomain();if(!domain&&!this.__watchDomainFirstTick)return;if(!domain)return this.__loadingSpinner.remove(),void TcHmi.Log.Controls.error(this,TcHmiTrendLineChart.#tchmiFQN,"Extension not found.");this.__actServerDomain=domain;let yAxis=[];for(const item of this.__lineGraphDescriptionsInternal)yAxis.push({symbol:item.symbol});this.__controlWidthInSubscription||(this.__controlWidthInSubscription=this.__elementTemplateRoot.width()||0);let writeValue={chartName:this.__id,xAxisStart:this.__internalStart,xAxisEnd:this.__internalEnd,yAxes:yAxis,displayWidth:this.__controlWidthInSubscription,analyticsType:this.__showStatisticalData?this.__analyticsType:[]},writeValueWindow={chartName:this.__id,xAxisStart:this.__internalStart,xAxisEnd:this.__internalEnd,yAxes:yAxis};if(this.__menubar?.setMenubarButtonsEnabled({startCombobox:!1,startTimespanPicker:!1,startTimespanButton:!1,startDateTimePicker:!1,startDateTimeButton:!1,endCombobox:!1,endTimespanPicker:!1,endTimespanButton:!1,endDateTimePicker:!1,endDateTimeButton:!1,resetButton:!1,stopButton:!1,panXToggleButton:!1,panXYToggleButton:!1,zoomXToggleButton:!1,zoomXYToggleButton:!1,resetZoomButton:!1,settingsButton:!1,showStatisticalDataToggleButton:!1,optionsButton:!0}),"Latest"===this.__internalEnd&&null!==this.__internalStart||null!==this.__internalEnd&&"First"===this.__internalStart)this.__subscriptionId=TcHmi.Server.subscribeEx([{commandOptions:["SendErrorMessage","SendWriteValue"],symbol:domain+".GetTrendLineData",version:this.__showStatisticalData?2:1,writeValue},{commandOptions:["SendErrorMessage"],symbol:domain+".GetTrendLineWindow",writeValue:writeValueWindow}],this.__interval??this.getAttributeDefaultValueInternal("Interval"),{parallel:!0},this.__getDataCallback);else{let request={requestType:"ReadWrite",commands:[{commandOptions:["SendErrorMessage","SendWriteValue"],symbol:domain+".GetTrendLineData",version:this.__showStatisticalData?2:1,writeValue}]};this.__requestId=TcHmi.Server.request(request,this.__getDataCallback)}}}__getDataCallback(result){if(this.__requestId=null,result.error===TcHmi.Errors.NONE&&result.response){if(result.response.error)return this.__lastInteraction?(this.__loadingSpinner.remove(),TcHmi.Log.Controls.error(this,TcHmiTrendLineChart.#tchmiFQN,`Server responds with error. Details: ${TcHmi.Log.buildMessage(result.response.error)}`),void this.__resetBeforeLastManipulation()):274===result.response.error.code&&this.__getDataCounter<100?(this.__getDataCounter++,void window.setTimeout(()=>{this.__getData()},50)):(this.__loadingSpinner.remove(),result.response.commands&&TcHmi.Log.Controls.error(this,TcHmiTrendLineChart.#tchmiFQN,`Server responds with error. Details: ${TcHmi.Log.buildMessage(result.response.error)}`),void this.__reset());if(this.__getDataCounter=0,result.response.commands){let isError=!1;for(const{symbol,readValue,error,writeValue}of result.response.commands)if(error){if(this.__loadingSpinner.remove(),isError=!0,TcHmi.Log.Controls.error(this,TcHmiTrendLineChart.#tchmiFQN,`Server responds with error for command for symbol=${symbol}. Details: ${TcHmi.Log.buildMessage(error)}`),this.__lastInteraction)return void this.__resetBeforeLastManipulation();this.__reset()}else if(readValue)if(0===this.__getDataCounter){if(this.__loadingSpinner.remove(),void 0!==this.__subscriptionId){const domain=this.getResolvedServerDomain();if(symbol===domain+".GetTrendLineData"){if(null!==this.__lineGraphData&&this.__lineGraphData.splice(0,this.__lineGraphData.length),null!==this.__lineGraphRawData&&this.__lineGraphRawData.splice(0,this.__lineGraphRawData.length),readValue.axesData?.length>0){let lineGraphData=[];for(let i of readValue.axesData.keys()){let line=[];for(let j of readValue.axesData[i].keys()){let x=new Date(readValue.axesData[i][j].x).getTime();readValue.axesData[i][j].x=x;let bindPoints=!0,flag=readValue.axesData[i][j].flags;void 0!==flag&&("Start"===flag&&j>0?line[j-1].bindPoints=!1:"Stop"===flag&&(bindPoints=!1));let isArea=!!readValue.axesData[i][j].error;isArea&&j>0&&(line[j-1].bindPoints=!1),line.push({x,y:readValue.axesData[i][j].y,bindPoints,isArea})}lineGraphData.push(line)}this.__lineGraphData=lineGraphData,this.__lineGraphRawData=readValue.axesData,this.__endBeforeManipulation=this.__internalEnd,this.__startBeforeManipulation=this.__internalStart}if(readValue.analyticsData?.length>0){const statisticalData=readValue.analyticsData.map((data,index)=>{const result={symbol:writeValue?.yAxes[index].symbol};let lineGraphDesc=this.__lineGraphDescriptionsInternal?.find(x=>x.symbol===result.symbol);if(void 0!==data.minimum){let value=data.minimum,unit=this.__statisticalDataConfiguration?.minimum?.unit||"";if(this.__statisticalDataConfiguration?.minimum?.useScaleFactor){value*=lineGraphDesc?.scaleFactor||1}if(void 0!==this.__statisticalDataConfiguration?.minimum?.decimalPlaces){let multiplier=Math.pow(10,this.__statisticalDataConfiguration?.minimum?.decimalPlaces);value=Math.round(value*multiplier)/multiplier}result.min=value+" "+unit}if(void 0!==data.maximum){let value=data.maximum,unit=this.__statisticalDataConfiguration?.maximum?.unit||"";if(this.__statisticalDataConfiguration?.maximum?.useScaleFactor){value*=lineGraphDesc?.scaleFactor||1}if(void 0!==this.__statisticalDataConfiguration?.maximum?.decimalPlaces){let multiplier=Math.pow(10,this.__statisticalDataConfiguration?.maximum?.decimalPlaces);value=Math.round(value*multiplier)/multiplier}result.max=value+" "+unit}if(void 0!==data.average){let value=data.average,unit=this.__statisticalDataConfiguration?.average?.unit||"";if(this.__statisticalDataConfiguration?.average?.useScaleFactor){value*=lineGraphDesc?.scaleFactor||1}if(void 0!==this.__statisticalDataConfiguration?.average?.decimalPlaces){let multiplier=Math.pow(10,this.__statisticalDataConfiguration?.average?.decimalPlaces);value=Math.round(value*multiplier)/multiplier}result.average=value+" "+unit}return result});this.__statisticalDataDatagrid?.setSrcData(statisticalData)}else this.__statisticalDataDatagrid?.setSrcData(null);this.__manipulationInfo.isStopped&&(this.__manipulationInfo.beginData=this.__lineGraphData??[])}else symbol===domain+".GetTrendLineWindow"&&(this.__internalStartServer=new Date(readValue.xAxisStart).getTime(),this.__internalEndServer=new Date(readValue.xAxisEnd).getTime())}}else{if(isError=!0,this.__loadingSpinner.remove(),this.__lastInteraction)return void this.__resetBeforeLastManipulation();this.__reset()}else{if(isError=!0,this.__loadingSpinner.remove(),this.__lastInteraction)return void this.__resetBeforeLastManipulation();this.__reset()}isError||this.__drawLineChart()}else{if(this.__loadingSpinner.remove(),this.__lastInteraction)return void this.__resetBeforeLastManipulation();this.__reset()}}else{if(this.__loadingSpinner.remove(),result.error&&TcHmi.Log.Controls.error(this,TcHmiTrendLineChart.#tchmiFQN,`Framework error=${result.error}, name=${TcHmi.Errors[result.error]} while fetching data from server.`),this.__lastInteraction)return void this.__resetBeforeLastManipulation();this.__reset()}"First"!==this.__internalStart&&"Latest"!==this.__internalEnd?this.__menubar?.setMenubarButtonsEnabled({startCombobox:!0,startTimespanPicker:!0,startTimespanButton:!0,startDateTimePicker:!0,startDateTimeButton:!0,endCombobox:!0,endTimespanPicker:!0,endTimespanButton:!0,endDateTimePicker:!0,endDateTimeButton:!0,resetButton:"First"===this.__start||"Latest"===this.__end,stopButton:!1,panXToggleButton:!0,panXYToggleButton:!0,zoomXToggleButton:!0,zoomXYToggleButton:!0,resetZoomButton:!0,settingsButton:!0,showStatisticalDataToggleButton:!0,optionsButton:!0}):(this.__menubar?.setMenubarButtonsEnabled({startCombobox:!0,startTimespanPicker:!0,startTimespanButton:!0,startDateTimePicker:!0,startDateTimeButton:!0,endCombobox:!0,endTimespanPicker:!0,endTimespanButton:!0,endDateTimePicker:!0,endDateTimeButton:!0,resetButton:!1,stopButton:!0,panXToggleButton:!1,panXYToggleButton:!1,zoomXToggleButton:!1,zoomXYToggleButton:!1,resetZoomButton:!1,settingsButton:!0,showStatisticalDataToggleButton:!0,optionsButton:!0}),this.__startEndBeforeZoom={end:this.__internalEnd,start:this.__internalStart})}__resetBeforeLastManipulation(){if(!this.__lineChart)return;let canvas=this.__lineChart.getCanvasDrawing();if(!canvas)return;let context=canvas[0].getContext("2d");if(!context)return;context.setTransform(1,0,0,1,0,0);let deviceDPI=window.devicePixelRatio;if(context.scale(deviceDPI,deviceDPI),this.__lineChart.setLineChanged(!0),this.__lineChart.draw(),null===this.__lineGraphData||null===this.__internalEnd)return;this.__endBeforeManipulation!==this.__internalEnd&&(this.__internalEnd=this.__endBeforeManipulation,null===this.__internalEnd?this.__endDatatype=null:Helper.isDatetime(this.__internalEnd)?this.__endDatatype=Datatype.Datetime:Helper.isKeyword(this.__internalEnd)?this.__endDatatype=Datatype.Keyword:this.__endDatatype=Datatype.Timespan),this.__internalStart!==this.__startBeforeManipulation&&(this.__internalStart=this.__startBeforeManipulation,null===this.__internalStart?this.__startDatatype=null:Helper.isDatetime(this.__internalStart)?this.__startDatatype=Datatype.Datetime:Helper.isKeyword(this.__internalStart)?this.__startDatatype=Datatype.Keyword:this.__startDatatype=Datatype.Timespan);let canvasZoomingElem=this.__elementChart[0].getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-canvas-zooming");canvasZoomingElem.length>0&&canvasZoomingElem[0].classList.add("tchmi-no-pointer-events"),"First"!==this.__internalStart&&"Latest"!==this.__internalEnd?this.__menubar?.setMenubarButtonsEnabled({startCombobox:!0,startTimespanPicker:!0,startTimespanButton:!0,startDateTimePicker:!0,startDateTimeButton:!0,endCombobox:!0,endTimespanPicker:!0,endTimespanButton:!0,endDateTimePicker:!0,endDateTimeButton:!0,resetButton:"First"===this.__start||"Latest"===this.__end,stopButton:!1,panXToggleButton:!0,panXYToggleButton:!0,zoomXToggleButton:!0,zoomXYToggleButton:!0,resetZoomButton:!0,settingsButton:!0,showStatisticalDataToggleButton:!0,optionsButton:!0}):this.__menubar?.setMenubarButtonsEnabled({startCombobox:!0,startTimespanPicker:!0,startTimespanButton:!0,startDateTimePicker:!0,startDateTimeButton:!0,endCombobox:!0,endTimespanPicker:!0,endTimespanButton:!0,endDateTimePicker:!0,endDateTimeButton:!0,resetButton:!1,stopButton:!0,panXToggleButton:!1,panXYToggleButton:!1,zoomXToggleButton:!1,zoomXYToggleButton:!1,resetZoomButton:!1,settingsButton:!0,showStatisticalDataToggleButton:!0,optionsButton:!0})}__drawLineChart(){let yAxes=[],showXAxis=this.__showXAxis??this.getAttributeDefaultValueInternal("ShowXAxis"),lineGraphDescriptions=[],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`}),this.__lineChart){this.__lineChart.clear(size.width,size.height);let canvasZoomingElem=this.__elementChart[0].getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-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.LineAreaChart(this.__elementChart,size.width,size.height,TcHmi.ValueConverter.toEnum(this.__referenceLinesPosition,TcHmiCharting.IChart.Position,TcHmiCharting.IChart.Position.Background));let deviceDPI=window.devicePixelRatio,canvasZooming=this.__elementChart[0].getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-canvas-zooming")[0];canvasZooming||(canvasZooming=document.createElement("canvas"),canvasZooming.classList.add("tchmi-no-pointer-events","TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-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);let canvas=this.__lineChart.getCanvasDrawing();if(null!==canvas){const passiveEventOptions={passive:!0,capture:!1},activeEventOptions={passive:!1,capture:!1};this.__destroyOnDetach.push(TcHmi.EventProvider.registerDomEvent(canvas[0],"click",this.__onClick,passiveEventOptions),TcHmi.EventProvider.registerDomEvent(canvas[0],"mousedown",this.__onMouseDown,passiveEventOptions),TcHmi.EventProvider.registerDomEvent(canvas[0],"touchstart",this.__onTouchStart,activeEventOptions),TcHmi.EventProvider.registerDomEvent(canvas[0],"mousemove",this.__onMouseMoveTooltip,passiveEventOptions),TcHmi.EventProvider.registerDomEvent(canvas[0],"wheel",this.__onMouseWheel,passiveEventOptions))}}this.__lineChart.addXAxis();let xAxis=this.__lineChart.getXAxis();if(null!==xAxis){if(xAxis.setShowAxis(showXAxis),xAxis.setShowSubTicks(this.__showXSubTicks??this.getAttributeDefaultValueInternal("ShowXSubTicks")),xAxis.setShowAxisName(this.__showXAxisName??this.getAttributeDefaultValueInternal("ShowXAxisName")),TcHmi.isSolidColor(this.__xAxisColor)?xAxis.setAxisColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(this.__xAxisColor)):xAxis.setAxisColor(null),xAxis.setDecimalPlaces(0),xAxis.setAxisName(TcHmi.ValueConverter.toString(this.__xAxisName)),TcHmi.isSolidColor(this.__xAxisNameFontColor)?xAxis.setAxisNameFontColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(this.__xAxisNameFontColor)):xAxis.setAxisNameFontColor(null),xAxis.setAxisNameFontFamily(this.__xAxisNameFontFamily),xAxis.setAxisNameFontSize(this.__xAxisNameFontSize??this.getAttributeDefaultValueInternal("XAxisNameFontSize")),xAxis.setAxisNameFontWeight(this.__xAxisNameFontWeight??this.getAttributeDefaultValueInternal("XAxisNameFontWeight")),xAxis.setAxisWidth(this.__xAxisWidth??this.getAttributeDefaultValueInternal("XAxisWidth")),TcHmi.isSolidColor(this.__xLabelFontColor)?xAxis.setLabelFontColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(this.__xLabelFontColor)):xAxis.setLabelFontColor(null),xAxis.setLabelFontFamily(this.__xLabelFontFamily),xAxis.setLabelFontSize(this.__xLabelFontSize??this.getAttributeDefaultValueInternal("XLabelFontSize")),xAxis.setLabelFontWeight(this.__xLabelFontWeight??this.getAttributeDefaultValueInternal("XLabelFontWeight")),xAxis.setMainTickSteps(this.__xMainTickSteps??this.getAttributeDefaultValueInternal("XMainTickSteps")),TCHMI_DESIGNER)xAxis.setShowLabels(!1),yAxes=this.__manipulationInfo.isStopped?this.__manipulationInfo.actualYAxis:this.__yAxisInternal||[];else if(this.__internalEnd&&this.__internalStart&&this.__lineGraphDescriptionsInternal&&this.__lineGraphDescriptionsInternal.length>0){let start,diffStart,end,diffEnd;Helper.isDatetime(this.__internalStart)?start=new Date(this.__internalStart).getTime():Helper.isKeyword(this.__internalStart)?start=this.__internalStartServer:diffStart=Helper.__isoToMilliSec(this.__internalStart),Helper.isDatetime(this.__internalEnd)?end=new Date(this.__internalEnd).getTime():Helper.isKeyword(this.__internalEnd)?end=this.__internalEndServer:diffEnd=Helper.__isoToMilliSec(this.__internalEnd),start||end?(start?xAxis.setMainTickStartValue(start):end&&void 0!==diffStart&&xAxis.setMainTickStartValue(end-diffStart),end?xAxis.setMainTickEndValue(end):start&&void 0!==diffEnd&&xAxis.setMainTickEndValue(start+diffEnd),showXAxis?xAxis.setShowLabels(this.__xShowLabels??this.getAttributeDefaultValueInternal("XShowLabels")):xAxis.setShowLabels(!1),xAxis.setXAxisCallback(this.__xAxisCallbackFunction)):(xAxis.setShowAxis(!1),xAxis.setShowLabels(!1)),null===this.__lineGraphData||0===this.__lineGraphData.length?(xAxis.setShowLabels(!1),yAxes=this.__manipulationInfo.isStopped?this.__manipulationInfo.actualYAxis:this.__yAxisInternal||[]):(lineGraphDescriptions=this.__lineGraphDescriptionsInternal||[],yAxes=this.__manipulationInfo.isStopped?this.__manipulationInfo.actualYAxis:this.__yAxisInternal||[])}else xAxis.setShowLabels(!1),yAxes=this.__manipulationInfo.isStopped?this.__manipulationInfo.actualYAxis:this.__yAxisInternal||[];xAxis.setSubTickSteps(this.__xSubTickSteps??this.getAttributeDefaultValueInternal("XSubTickSteps")),xAxis.setAutoScaling(!1)}for(const axis of yAxes??[]){this.__lineChart.addYAxis(TcHmi.ValueConverter.toEnum(axis.position,Position,TcHmiTrendLineChart.yAxisDefaultValueInternals.position));let yAxis=this.__lineChart.getYAxisAtPosition(this.__lineChart.getYAxis().length-1);yAxis.setShowAxis(!!axis.isSelected&&TcHmi.ValueConverter.toBoolean(axis.showAxis,TcHmiTrendLineChart.yAxisDefaultValueInternals.showAxis)),yAxis.setLogarithmicScale(TcHmi.ValueConverter.toBoolean(axis.logarithmicScale,TcHmiTrendLineChart.yAxisDefaultValueInternals.logarithmicScale)),yAxis.setAxisLabeling(TcHmi.ValueConverter.toEnum(axis.axisLabeling,AxisLabeling,TcHmiTrendLineChart.yAxisDefaultValueInternals.axisLabeling)),yAxis.setAutoScaling(TcHmi.ValueConverter.toBoolean(axis.autoScaling,TcHmiTrendLineChart.yAxisDefaultValueInternals.autoScaling));let axisColor=axis.axisColor;if(TcHmi.isSolidColor(axisColor))yAxis.setAxisColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(axisColor));else{let themeLineColor=TcHmi.Theme.Resources.get(this,"YAxisAxisColor");TcHmi.isSolidColor(themeLineColor.value)?yAxis.setAxisColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(themeLineColor.value)):yAxis.setAxisColor(null)}yAxis.setAxisName(TcHmi.ValueConverter.toString(axis.axisName,TcHmiTrendLineChart.yAxisDefaultValueInternals.axisName));let axisNameFontColor=axis.axisNameFontColor;if(TcHmi.isSolidColor(axisNameFontColor))yAxis.setAxisNameFontColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(axisNameFontColor));else{let themeAxisNameFontColor=TcHmi.Theme.Resources.get(this,"YAxisAxisNameFontColor");TcHmi.isSolidColor(themeAxisNameFontColor.value)?yAxis.setAxisNameFontColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(themeAxisNameFontColor.value)):yAxis.setAxisNameFontColor(null)}yAxis.setAxisNameFontFamily(TcHmi.ValueConverter.toFontFamily(axis.axisNameFontFamily,TcHmiTrendLineChart.yAxisDefaultValueInternals.axisNameFontFamily)),yAxis.setAxisNameFontSize(TcHmi.ValueConverter.toNumber(axis.axisNameFontSize,TcHmiTrendLineChart.yAxisDefaultValueInternals.axisNameFontSize)),yAxis.setAxisNameFontWeight(axis.axisNameFontWeight??TcHmiTrendLineChart.yAxisDefaultValueInternals.axisNameFontWeight),yAxis.setDecimalPlaces(TcHmi.ValueConverter.toNumber(axis.decimalPlaces,TcHmiTrendLineChart.yAxisDefaultValueInternals.decimalPlaces));let labelFontColor=axis.labelFontColor;if(TcHmi.isSolidColor(labelFontColor))yAxis.setLabelFontColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(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.setMainTickStartValue(TcHmi.ValueConverter.toNumber(axis.mainTickMinValue,TcHmiTrendLineChart.yAxisDefaultValueInternals.mainTickMinValue)),yAxis.setMainTickEndValue(TcHmi.ValueConverter.toNumber(axis.mainTickMaxValue,TcHmiTrendLineChart.yAxisDefaultValueInternals.mainTickMaxValue)),yAxis.setShowLabels(TcHmi.ValueConverter.toBoolean(axis.showLabels,TcHmiTrendLineChart.yAxisDefaultValueInternals.showLabels)),yAxis.setShowAxisName(TcHmi.ValueConverter.toBoolean(axis.showAxisName,TcHmiTrendLineChart.yAxisDefaultValueInternals.showAxisName)),yAxis.setUnit(TcHmi.ValueConverter.toString(axis.unit,TcHmiTrendLineChart.yAxisDefaultValueInternals.unit)),yAxis.setAxisWidth(this.__yAxisWidth??this.getAttributeDefaultValueInternal("YAxisWidth")),yAxis.setLabelFontFamily(this.__yLabelFontFamily),yAxis.setLabelFontSize(this.__yLabelFontSize??this.getAttributeDefaultValueInternal("YLabelFontSize")),yAxis.setLabelFontWeight(this.__yLabelFontWeight??this.getAttributeDefaultValueInternal("YLabelFontWeight")),yAxis.setMainTickSteps(this.__yMainTickSteps??this.getAttributeDefaultValueInternal("YMainTickSteps")),yAxis.setSubTickSteps(this.__ySubTickSteps??this.getAttributeDefaultValueInternal("YSubTickSteps")),yAxis.setShowSubTicks(this.__showYSubTicks??this.getAttributeDefaultValueInternal("ShowYSubTicks")),axis.format?yAxis.setYAxisCallback(value=>this.__executeYAxisFormatFunction(axis.format??void 0,value)):yAxis.setYAxisCallback(null)}if(this.__showGrid){this.__lineChart.addGrid();let grid=this.__lineChart.getGrid();null!==grid&&(grid.setShowHorizontalLines(this.__gridShowHorizontalLines??this.getAttributeDefaultValueInternal("GridShowHorizontalLines")),grid.setShowVerticalLines(this.__gridShowVerticalLines??this.getAttributeDefaultValueInternal("GridShowVerticalLines")),grid.setLineWidth(this.__gridLineWidth??this.getAttributeDefaultValueInternal("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(this.__subgridShowHorizontalLines??this.getAttributeDefaultValueInternal("SubgridShowHorizontalLines")),subgrid.setShowVerticalLines(this.__subgridShowVerticalLines??this.getAttributeDefaultValueInternal("SubgridShowVerticalLines")),subgrid.setLineWidth(this.__subgridLineWidth??this.getAttributeDefaultValueInternal("SubgridLineWidth")),subgrid.setLineStyle(this.__subgridLineStyle??this.getAttributeDefaultValueInternal("SubgridLineStyle")),TcHmi.isSolidColor(this.__subgridLineColor)?subgrid.setLineColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(this.__subgridLineColor)):subgrid.setLineColor(null));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.setValueUnit(TcHmi.ValueConverter.toEnum(tempReferenceLine.valueUnit,ValueUnit,ValueUnit.Value)),referenceLine.setOrientation(TcHmi.ValueConverter.toEnum(tempReferenceLine.orientation,Orientation,Orientation.Horizontal)),referenceLine.setLocked(TcHmi.ValueConverter.toBoolean(tempReferenceLine.locked,!0)),referenceLine.setShowTooltip(TcHmi.ValueConverter.toBoolean(tempReferenceLine.showTooltip,!1)),referenceLine.setHighlightDataPoints(TcHmi.ValueConverter.toBoolean(tempReferenceLine.highlightDataPoints,!1)),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))}let baseData=this.__manipulationInfo.isStopped?this.__manipulationInfo.beginData:this.__lineGraphData;if(baseData&&this.__lineGraphDescriptionsInternal)for(const[index,tempLineGraphDescription]of lineGraphDescriptions?.entries()??[])if(yAxes&&null!==tempLineGraphDescription&&tempLineGraphDescription.isSelected&&this.__yAxisInternal){let yAxisSelectedIndex=this.__yAxisInternal.findIndex(x=>x.id===tempLineGraphDescription.yAxisId);if(-1!==yAxisSelectedIndex){this.__lineChart.addGraph({points:baseData[index],yAxis:this.__lineChart.getYAxisAtPosition(yAxisSelectedIndex)});let lineGraph=this.__lineChart.getLineGraphsAtPosition(this.__lineChart.getLineGraphs().length-1);if(lineGraph&&tempLineGraphDescription.isSelected){let backgroundColor,themeErrorMarkingColor=TcHmi.Theme.Resources.get(this,"ErrorMarkingColor");if(backgroundColor=TcHmi.isSolidColor(themeErrorMarkingColor.value)?TcHmi.StyleProvider.resolveSolidColorAsCssValue(themeErrorMarkingColor.value):"rgba(255, 0, 0, 0.4)",null!==this.__lineGraphRawData){let beginX=null,lastAreaX=null,errorCode=null;for(const[indexData,rawData]of this.__lineGraphRawData[index]?.entries()??[]){let errorCodeNow=rawData.error;if(void 0!==errorCodeNow)null===beginX?beginX=0===indexData?rawData.x:this.__lineGraphRawData[index][indexData-1].x:errorCodeNow!==errorCode&&lastAreaX&&(lineGraph.addArea({beginX,endX:lastAreaX,backgroundColor}),beginX=lastAreaX),lastAreaX=rawData.x,errorCode=errorCodeNow;else if(beginX){let mainTickEndValue=xAxis?xAxis.getMainTickEndValue():null;0===indexData&&mainTickEndValue?lineGraph.addArea({beginX,endX:mainTickEndValue,backgroundColor}):lineGraph.addArea({beginX,endX:rawData.x,backgroundColor}),beginX=null}}if(beginX){let mainTickEndValue=xAxis?xAxis.getMainTickEndValue():null;this.__lineGraphRawData[index].length-1==0&&mainTickEndValue?Helper.isTimespan(this.__internalStart)?lineGraph.addArea({beginX,endX:mainTickEndValue,backgroundColor,drawLineWithOnePixel:!0}):lineGraph.addArea({beginX,endX:mainTickEndValue,backgroundColor}):lineGraph.addArea({beginX,endX:this.__lineGraphRawData[index][this.__lineGraphRawData[index].length-1].x,backgroundColor}),beginX=null}}let lineColor=tempLineGraphDescription.lineColor;if(TcHmi.isSolidColor(lineColor))lineGraph.setLineColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(lineColor));else{let themeLineColor=TcHmi.Theme.Resources.get(this,"LineGraphDescriptionLineColor");TcHmi.isSolidColor(themeLineColor.value)?lineGraph.setLineColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(themeLineColor.value)):lineGraph.setLineColor(null)}lineGraph.setLineWidth(TcHmi.ValueConverter.toNumber(tempLineGraphDescription.lineWidth)),"Latest"!==this.__internalEnd&&"First"!==this.__internalStart?lineGraph.setPointDot(TcHmi.ValueConverter.toBoolean(tempLineGraphDescription.pointDotInStopMode,!0)):lineGraph.setPointDot(TcHmi.ValueConverter.toBoolean(tempLineGraphDescription.pointDot,!1));let pointDotFillColor=tempLineGraphDescription.pointDotFillColor;if(TcHmi.isSolidColor(pointDotFillColor))lineGraph.setPointDotFillColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(pointDotFillColor));else{let themePointDotFillColor=TcHmi.Theme.Resources.get(this,"LineGraphDescriptionPointDotFillColor");TcHmi.isSolidColor(themePointDotFillColor.value)?lineGraph.setPointDotFillColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(themePointDotFillColor.value)):lineGraph.setPointDotFillColor(null)}lineGraph.setPointDotRadius(TcHmi.ValueConverter.toNumber(tempLineGraphDescription.pointDotRadius));let pointDotStrokeColor=tempLineGraphDescription.pointDotStrokeColor;if(TcHmi.isSolidColor(pointDotStrokeColor))lineGraph.setPointDotStrokeColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(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(lineGraph.setPointDotStrokeWidth(TcHmi.ValueConverter.toNumber(tempLineGraphDescription.pointDotStrokeWidth)),lineGraph.setScaleFactor(tempLineGraphDescription.scaleFactor),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)}}}if(this.__lineChart.setYAxisWidth(this.__yAxisWidth??this.getAttributeDefaultValueInternal("YAxisWidth")),this.__lineChart.setYLabelFontFamily(this.__yLabelFontFamily),this.__lineChart.setYLabelFontSize(this.__yLabelFontSize??this.getAttributeDefaultValueInternal("YLabelFontSize")),this.__lineChart.setYLabelFontWeight(this.__yLabelFontWeight??this.getAttributeDefaultValueInternal("YLabelFontWeight")),this.__lineChart.setYMainTickSteps(this.__yMainTickSteps??this.getAttributeDefaultValueInternal("YMainTickSteps")),this.__lineChart.setYSubTickSteps(this.__ySubTickSteps??this.getAttributeDefaultValueInternal("YSubTickSteps")),this.__lineChart.setShowYSubTicks(this.__showYSubTicks??this.getAttributeDefaultValueInternal("ShowYSubTicks")),this.__lineChart.draw(),null!==xAxis){let startValue=xAxis.getMainTickStartValue();startValue!==this.__actualStartTime&&(this.__actualStartTime=startValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ActualStartTime"}));let endValue=xAxis.getMainTickEndValue();endValue!==this.__actualEndTime&&(this.__actualEndTime=endValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ActualEndTime"}))}}__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,this.__showStatisticalData&&(height-=this.__elementStatisticalData.outerHeight(!0)??0),{width,height,top}}__reset(){if(!TCHMI_DESIGNER){if(this.__lineGraphData&&this.__lineGraphData.splice(0,this.__lineGraphData.length),this.__lineChart){let size=this.__calcSizes();if(null===size.width||null===size.height)return;this.__lineChart.clear(size.width,size.height)}let canvasZoomingElem=this.__elementChart[0].getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-canvas-zooming");canvasZoomingElem.length>0&&canvasZoomingElem[0].classList.add("tchmi-no-pointer-events"),this.__menubar?.setMenubarButtonsEnabled({startCombobox:!0,startTimespanButton:!0,startTimespanPicker:!0,startDateTimePicker:!0,startDateTimeButton:!0,endCombobox:!0,endTimespanPicker:!0,endTimespanButton:!0,endDateTimePicker:!0,endDateTimeButton:!0,resetButton:!1,stopButton:!1,panXToggleButton:!1,panXYToggleButton:!1,zoomXToggleButton:!1,zoomXYToggleButton:!1,resetZoomButton:!1,settingsButton:!0,showStatisticalDataToggleButton:!0,optionsButton:!0}),this.__menubar?.setActiveToggleButton(this.__mouseMode)}}__createLegend(){if(this.__elementLegend.children().remove(),this.__showLegend){this.__elementLegend[0].style.display="";for(const[index,lineGraphDescriptionInternal]of this.__lineGraphDescriptionsInternal?.entries()??[]){const label=document.createElement("label");label.classList.add("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-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"+index),checkbox.classList.add("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-legend-checkbox");let color=document.createElement("div");color.classList.add("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-legend-checkbox-color-element"),color.style.backgroundColor=lineGraphDescriptionInternal.lineColor?.color??"",label.append(checkbox,color),label.append(lineGraphDescriptionInternal?.legendName??"["+index+"]"),this.__elementLegend.append(label),this.__activeLegendElements?checkbox.checked=this.__activeLegendElements.includes(index):checkbox.checked=!!lineGraphDescriptionInternal&&(lineGraphDescriptionInternal.defaultVisibility??!0)}}else this.__elementLegend[0].style.display="none"}getCurrentGraphLength(){return this.__lineGraphDescriptions?.length??0}__createInternals(){let internalYAxis=tchmi_clone_object(this.__yAxis)??[];this.__lineGraphDescriptionsInternal=[];let lineGraphDescriptionToUse=this.__lineGraphDescriptionsOverride??this.__lineGraphDescriptions;if(lineGraphDescriptionToUse)for(const[index,lineGraphDescription]of lineGraphDescriptionToUse?.entries()??[]){let cloneLineGraphDescription={...tchmi_clone_object(lineGraphDescription),isSelected:!0};if(cloneLineGraphDescription.colorRanges)for(const[indexColorRange,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,TcHmiTrendLineChart.#tchmiFQN,{Attribute:"Filter"},`Error while compiling filter: ${TcHmi.Log.buildMessage(compile.details)}`):colorRange.filterInstance=filterInstance,cloneLineGraphDescription.colorRanges[indexColorRange]=colorRange}}if(void 0===cloneLineGraphDescription.yAxisId||null===cloneLineGraphDescription.yAxisId){let id=-1,exists=!1;do{id++,exists=internalYAxis.filter(function(yAxis){return yAxis.id===id}).length>0}while(exists&&id<=1e3);if(!exists){let themeYAxisGenerated=TcHmi.Theme.Resources.get(this,"YAxisGenerated");themeYAxisGenerated&&null!==themeYAxisGenerated.value?(themeYAxisGenerated.value.id=id,themeYAxisGenerated.value.axisName=cloneLineGraphDescription.symbol,internalYAxis.push(themeYAxisGenerated.value)):internalYAxis.push({id,showAxis:!0,logarithmicScale:!1,axisLabeling:AxisLabeling.Number,position:Position.Left,labelFontColor:{color:"#4794da"},showLabels:!0,axisColor:{color:"#4794da"},showAxisName:!0,axisName:cloneLineGraphDescription.symbol,axisNameFontFamily:null,axisNameFontSize:15,axisNameFontSizeUnit:"px",axisNameFontWeight:"Bold",axisNameFontColor:{color:"#4794da"},decimalPlaces:2,autoScaling:!0}),cloneLineGraphDescription.yAxisId=id}}!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=[],internalYAxis.forEach(x=>{let lineGraphDesc=this.__lineGraphDescriptionsInternal?.find(value=>value.yAxisId===x.id);if(void 0===x.showAxisIfNoData&&TcHmiTrendLineChart.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)}})}setSectionsPositions(){if(this.__isAttached)if(this.__menuBarPosition&&this.__showMenuBar?MenuBarPosition.Bottom===MenuBarPosition[this.__menuBarPosition]?this.__showMenuBar&&(this.__elementMenuBar[0].classList.add("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-menu-bar-bottom","tchmi-trend-line-chart-template-menu-bar-bottom"),this.__elementMenuBar[0].classList.remove("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-menu-bar-top","tchmi-trend-line-chart-template-menu-bar-top"),this.__showLegend&&(this.__elementLegend[0].classList.add("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-legend-top"),this.__elementLegend[0].classList.remove("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-legend-bottom"))):(this.__elementMenuBar[0].classList.add("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-menu-bar-top","tchmi-trend-line-chart-template-menu-bar-top"),this.__elementMenuBar[0].classList.remove("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-menu-bar-bottom","tchmi-trend-line-chart-template-menu-bar-bottom"),this.__showLegend&&(this.__elementLegend[0].classList.add("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-legend-bottom"),this.__elementLegend[0].classList.remove("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-legend-top"))):this.__showLegend&&(this.__elementLegend[0].classList.add("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-legend-bottom"),this.__elementLegend[0].classList.remove("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-legend-top")),this.__showStatisticalData){let bottom=this.__showMenuBar&&"Bottom"===this.__menuBarPosition?this.__elementMenuBar.outerHeight(!0):this.__showLegend?this.__elementLegend.outerHeight(!0):0;this.__elementStatisticalData.css({display:"",bottom:bottom+"px"})}else this.__elementStatisticalData.css("display","none")}__onCheckboxMouseDown(event){let childElement=event.target,checkboxElem=null;if(childElement.classList.contains("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-legend-checkbox"))checkboxElem=childElement;else if(childElement.classList.contains("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-legend-checkbox-label")){let checkboxList=childElement.getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-legend-checkbox");checkboxList&&checkboxList.length>0&&(checkboxElem=checkboxList[0])}else if(childElement.classList.contains("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-legend-checkbox-color-element")&&childElement&&childElement.parentElement){let checkboxList=childElement.parentElement.getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-legend-checkbox");checkboxList&&checkboxList.length>0&&(checkboxElem=checkboxList[0])}if(!checkboxElem)return;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=>value.yAxisId===x.id&&value.isSelected);void 0===x.showAxisIfNoData&&TcHmiTrendLineChart.yAxisDefaultValueInternals||!x.showAxisIfNoData&&void 0!==lineGraphDesc||x.showAxisIfNoData?x.isSelected=!0:x.isSelected=!1}),this.__manipulationInfo.isStopped&&(this.__manipulationInfo.beginYAxis.forEach(y=>{let yInternal=this.__yAxisInternal.find(x=>x.id===y.id);y.isSelected=yInternal?.isSelected||!1}),this.__manipulationInfo.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,TcHmiTrendLineChart.yAxisDefaultValueInternals.showAxis)})),this.__activeLegendElements=activeLegendElements,this.__storage?.set("activeLegendElements",activeLegendElements),this.__drawLineChart()}__onCheckboxTouchStart(event){let childElement=event.target;if(!childElement)return;let checkboxList=childElement.getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-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=>value.yAxisId===x.id&&value.isSelected);void 0===x.showAxisIfNoData&&TcHmiTrendLineChart.yAxisDefaultValueInternals||!x.showAxisIfNoData&&void 0!==lineGraphDesc||x.showAxisIfNoData?x.isSelected=!0:x.isSelected=!1}),this.__manipulationInfo.isStopped&&(this.__manipulationInfo.beginYAxis.forEach(y=>{let yInternal=this.__yAxisInternal.find(x=>x.id===y.id);y.isSelected=yInternal?.isSelected||!1}),this.__manipulationInfo.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,TcHmiTrendLineChart.yAxisDefaultValueInternals.showAxis)})),this.__activeLegendElements=activeLegendElements,this.__storage?.set("activeLegendElements",activeLegendElements),this.__drawLineChart()}}__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);let touchRadiusPoints=fromTouch?10:0,touchRadiusErrors=fromTouch?5:0;if(this.__elementTooltip.css("visibility","hidden"),this.__tooltipInformation={show:!1,isActive:!1,time:0,points:[],errors:[],referenceLine:void 0},!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-touchRadiusPoints&&offsetX<=offsetLeft+xAxis.getLineWidth()+touchRadiusPoints&&offsetY>=offsetTop-touchRadiusPoints&&offsetY<=offsetTop+yAxisHeight+touchRadiusPoints){let lineGraphs=this.__lineChart.getLineGraphs(),errorTooltips=[],pointTooltips=[],xTime=0,startValue=xAxis.getMainTickStartValue(),endValue=xAxis.getMainTickEndValue();if(startValue&&endValue){let diffTime=endValue-startValue,diffLine=xAxis.getLineWidth()+2*drawingBorder;xTime=startValue+(offsetX-offsetLeft)*(diffTime/diffLine);let tooltipFormat,lineGraphId=0;if(this.__lineGraphDescriptionsInternal)for(const[index,lineGraphDescription]of this.__lineGraphDescriptionsInternal?.entries()??[])if(null!==lineGraphDescription&&lineGraphs[lineGraphId]){let lineGraph=lineGraphs[lineGraphId],dotRadius=lineGraph.getPointDotRadius();if(null!==dotRadius&&lineGraph.getPointDot()){if(lineGraph.getPoints())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<=touchRadiusPoints+dotRadius):isCorrect=point.xPosition-dotRadius<=offsetX&&offsetX<=point.xPosition+dotRadius&&point.yPosition-dotRadius<=offsetY&&point.yPosition+dotRadius>=offsetY,fromTouch&&isCorrect||!fromTouch&&isCorrect){let symbolname=lineGraphDescription.symbol,yAxis=null;if(this.__yAxisInternal)for(const axis of this.__yAxisInternal??[])if(axis.id===lineGraphDescription.yAxisId){yAxis=axis;break}yAxis&&pointTooltips.push({yAxis,coordinates:{x:point.xPosition,y:point.yPosition},values:{x:point.xValue,y:point.yValue},symbolname,distance:distance??0})}}}for(const area of lineGraph.getAreaPoints()??[])if(offsetX>=offsetLeft-touchRadiusErrors&&offsetX<=offsetLeft+xAxis.getLineWidth()+touchRadiusErrors&&offsetY>=offsetTop-touchRadiusErrors&&offsetY<=offsetTop+yAxisHeight+touchRadiusErrors&&area.xBeginPosition-touchRadiusErrors<=offsetX&&offsetX<=area.xEndPosition+touchRadiusErrors){let errorCode=0;if(null!==this.__lineGraphRawData){let elementWithX=this.__lineGraphRawData[index].filter(x=>x.x===area.xBeginValue),indexRawData=this.__lineGraphRawData[index].indexOf(elementWithX[0]);errorCode=this.__lineGraphRawData[index][indexRawData].error}let yAxis=null;if(this.__yAxisInternal)for(let h=0,hh=this.__yAxisInternal.length;h<hh;h++)if(this.__yAxisInternal[h].id===lineGraphDescription.yAxisId){yAxis=this.__yAxisInternal[h];break}yAxis&&errorTooltips.push({yAxis,xBeginTime:area.xBeginValue,xEndTime:area.xEndValue,xBegin:area.xBeginPosition,xEnd:area.xEndPosition,error:errorCode,symbolname:lineGraphDescription.symbol})}lineGraphId++}if(0===pointTooltips.length){0===errorTooltips.length&&(this.__tooltipInformation={show:!1,isActive:!1,time:0,points:[],errors:[],referenceLine:void 0});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,time:0,points:[],errors:[],referenceLine:foundedRefLine};let tooltipInfos=this.__referenceLineTooltipInformation();return foundedRefLine.getShowTooltip()?this.__designTooltip(tooltipInfos.html||null,offsetX,offsetY,offsetLeft,offsetTopCharting):this.__tooltipInformation={show:!1,isActive:!1,time:0,points:[],errors:[],referenceLine:foundedRefLine},void(foundedRefLine.getHighlightDataPoints()&&this.__highlightDataPoints(tooltipInfos.value,offsetTop,offsetLeft,yAxis[0],xAxis))}if(void 0===foundedRefLine&&0===errorTooltips.length)return}this.__tooltipInformation={show:!0,isActive:!!fromTouch||activate,time:xTime,points:[],errors:[],referenceLine:void 0};for(const errorTooltip of errorTooltips??[])this.__tooltipInformation.errors.push({yAxis:errorTooltip.yAxis,beginTime:errorTooltip.xBeginTime,endTime:errorTooltip.xEndTime,errorCode:errorTooltip.error,symbolname:errorTooltip.symbolname});fromTouch&&pointTooltips.sort(function(a,b){return a.distance-b.distance});for(const pointTooltip of pointTooltips??[])this.__tooltipInformation.points.push({yAxis:pointTooltip.yAxis,point:{x:pointTooltip.values.x,y:pointTooltip.values.y},symbolname:pointTooltip.symbolname});tooltipFormat=fromTouch?this.__executeTooltipFormatFunction(xTime,this.__tooltipInformation.points,this.__tooltipInformation.errors.reverse()):this.__executeTooltipFormatFunction(xTime,this.__tooltipInformation.points.reverse(),this.__tooltipInformation.errors.reverse()),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_TcHmiTrendLineChart-template-tooltip-arrow-top","TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-tooltip-arrow-bottom","TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-tooltip-arrow-left","TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-tooltip-arrow-right","tchmi-trend-line-chart-template-tooltip-arrow-top","tchmi-trend-line-chart-template-tooltip-arrow-bottom","tchmi-trend-line-chart-template-tooltip-arrow-left","tchmi-trend-line-chart-template-tooltip-arrow-right"),this.__elementTooltipArrow[0].classList.add("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-tooltip-arrow-bottom","tchmi-trend-line-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_TcHmiTrendLineChart-template-tooltip-arrow-top","TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-tooltip-arrow-bottom","TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-tooltip-arrow-left","TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-tooltip-arrow-right","tchmi-trend-line-chart-template-tooltip-arrow-top","tchmi-trend-line-chart-template-tooltip-arrow-bottom","tchmi-trend-line-chart-template-tooltip-arrow-left","tchmi-trend-line-chart-template-tooltip-arrow-right"),this.__elementTooltipArrow[0].classList.add("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-tooltip-arrow-top","tchmi-trend-line-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_TcHmiTrendLineChart-template-tooltip-arrow-top","TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-tooltip-arrow-bottom","TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-tooltip-arrow-left","TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-tooltip-arrow-right","tchmi-trend-line-chart-template-tooltip-arrow-top","tchmi-trend-line-chart-template-tooltip-arrow-bottom","tchmi-trend-line-chart-template-tooltip-arrow-left","tchmi-trend-line-chart-template-tooltip-arrow-right"),this.__elementTooltipArrow[0].classList.add("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-tooltip-arrow-left","tchmi-trend-line-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_TcHmiTrendLineChart-template-tooltip-arrow-top","TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-tooltip-arrow-bottom","TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-tooltip-arrow-left","TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-tooltip-arrow-right","tchmi-trend-line-chart-template-tooltip-arrow-top","tchmi-trend-line-chart-template-tooltip-arrow-bottom","tchmi-trend-line-chart-template-tooltip-arrow-left","tchmi-trend-line-chart-template-tooltip-arrow-right"),this.__elementTooltipArrow[0].classList.add("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-tooltip-arrow-right","tchmi-trend-line-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.__lineGraphRawData))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(),tableTime=document.createElement("table");tableTime.classList.add("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-tooltip-time-table"),tableTime.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,headerValue="";if("%"===refLine.getValueUnit()){let yStartValue=axis.getMainTickStartValueOverride()||axis.getMainTickStartValue()||0,refLineValue=yStartValue+((axis.getMainTickEndValueOverride()||axis.getMainTickEndValue()||0)-yStartValue)*value/100;if(value=refLineValue??0,orientation===TcHmiCharting.ReferenceLine.Orientation.Vertical){let t=new Date(refLineValue);headerValue=TcHmi.Localization.formatDate(t)||""}else headerValue=value.toString()}let timeRow=tableTime.insertRow();timeRow.insertCell().textContent=orientation===TcHmiCharting.ReferenceLine.Orientation.Vertical?"Time":"Value",timeRow.insertCell().textContent=headerValue;let headerRow=header.insertRow();return headerRow.appendChild(document.createElement("th")).textContent="Symbol",headerRow.appendChild(document.createElement("th")).textContent="Timestamp",headerRow.appendChild(document.createElement("th")).textContent="Value",this.__lineGraphRawData.forEach((data,index)=>{const closestValue=data.map(a=>this.__tooltipInformation.referenceLine?.getOrientation()===TcHmiCharting.ReferenceLine.Orientation.Vertical?a.x:void 0!==a.y?a.y:void 0).filter(v=>"number"==typeof v).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.symbol);let cellTimestamp=row.insertCell(),date=new Date(entry.x);cellTimestamp.append(TcHmi.Localization.formatDate(date)||"null"),row.insertCell().append(entry.y?.toString()||"null")}}}),{html:tableTime.outerHTML+table.outerHTML,value}}__highlightDataPoints(value,offsetTop,offsetLeft,yAxis,xAxis){let refLine=this.__tooltipInformation.referenceLine;this.__lineGraphRawData&&this.__zoomingCanvasContext&&refLine&&this.__lineGraphRawData.forEach((data,index)=>{if(!this.__lineChart||!this.__zoomingCanvasContext)return;let orientation=refLine.getOrientation();const closestValue=data.map(a=>refLine.getOrientation()===TcHmiCharting.ReferenceLine.Orientation.Vertical?a.x:void 0!==a.y?a.y:void 0).filter(v=>"number"==typeof v).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],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)}}}}})}__onMouseMoveTooltip(event){if(!this.__tooltipInformation.isActive&&this.__showTooltip&&this.getIsEnabled()&&(this.__manipulationInfo.isManipulating&&this.__manipulationInfo.referenceLine||!this.__manipulationInfo.isManipulating)){let offsetX=event.offsetX,offsetY=event.offsetY;requestAnimationFrame(()=>{null!==this.__internalEnd&&null!==this.__internalStart&&"Latest"!==this.__internalEnd&&"First"!==this.__internalStart&&this.__createTooltip(offsetX,offsetY,!1,!1)})}}__onClick(event){if(this.__manipulationInfo.click&&this.__lineChart){if(this.__manipulationInfo.isManipulating)return;if(!this.getIsEnabled()||0===this.__lineChart.getLineGraphs().length)return;if("Latest"===this.__internalEnd||"First"===this.__internalStart||null===this.__internalEnd||null===this.__internalStart)return;if(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,time:0,points:[],errors:[],referenceLine:void 0}}}this.__manipulationInfo.click=!0}__onMouseDown(event){if(this.resetManipulation(),this.__lineChart){if(this.__manipulationInfo.isManipulating)return;if(!this.getIsEnabled()||0===this.__lineChart.getLineGraphs().length)return;if("Latest"===this.__internalEnd||"First"===this.__internalStart||null===this.__internalEnd||null===this.__internalStart)return;if(null===event.target)return;let coords=this.__transformEventCoords(event.clientX,event.clientY,event.target);this.__manipulationInfo.mousePositionStart={x:coords.x,y:coords.y},this.__userInteractionStart(coords.x,coords.y)}}__onMouseMove(event){if(!this.__manipulationInfo.isManipulating)return;let coords=this.__transformEventCoords(event.clientX,event.clientY);this.__userInteractionMove(coords.x,coords.y)}__onMouseUp(event){this.__manipulationInfo.isManipulating&&this.__userInteractionEnd()}__onTouchStart(event){if(this.resetManipulation(),!this.__lineChart||0===this.__lineChart.getLineGraphs().length)return;if("Latest"===this.__internalEnd||"First"===this.__internalStart||null===this.__internalEnd||null===this.__internalStart)return;event.preventDefault();let touch=event.touches[0],coords=this.__transformEventCoords(touch.clientX,touch.clientY,event.target);this.__holdTimer=setTimeout(()=>this.__createTooltip(coords.x,coords.y,!1,!0),this.__holdTimerDuration),this.__manipulationInfo.mousePositionStart={x:coords.x,y:coords.y},event.touches.length>1?this.__userMultitouchStart(event):this.__manipulationInfo.isManipulating||this.__userInteractionStart(coords.x,coords.y)}__onTouchMove(event){if(this.__manipulationInfo.multitouchMode)return event.preventDefault(),void this.__userMultitouchMove(event);if(this.__manipulationInfo.isManipulating){let touch=event.touches[0],coords=this.__transformEventCoords(touch.clientX,touch.clientY);Math.sqrt(Math.pow(this.__manipulationInfo.mousePositionStart.x-coords.x,2)+Math.pow(this.__manipulationInfo.mousePositionStart.y-coords.y,2))>5&&(this.__holdTimer&&(clearTimeout(this.__holdTimer),this.__holdTimer=0),this.__userInteractionMove(coords.x,coords.y))}}__onTouchEnd(event){if(this.__holdTimer&&(clearTimeout(this.__holdTimer),this.__holdTimer=0),this.__manipulationInfo.multitouchMode)return event.preventDefault(),void this.__userMultitouchEnd(event);if(this.__manipulationInfo.isManipulating){let touch=event.changedTouches[0],coords=this.__transformEventCoords(touch.clientX,touch.clientY);Math.sqrt(Math.pow(this.__manipulationInfo.mousePositionStart.x-coords.x,2)+Math.pow(this.__manipulationInfo.mousePositionStart.y-coords.y,2))>5?this.__userInteractionEnd():this.resetManipulation()}}__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.__manipulationInfo.scale.x=renderedWidth/controlRect.width,this.__manipulationInfo.scale.y=renderedHeight/controlRect.height;let targetRect=targetElement.getBoundingClientRect();this.__manipulationInfo.offset.left=targetRect.left,this.__manipulationInfo.offset.top=targetRect.top}return{x:(clientX-this.__manipulationInfo.offset.left)*this.__manipulationInfo.scale.x,y:(clientY-this.__manipulationInfo.offset.top)*this.__manipulationInfo.scale.y}}__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.__manipulationInfo.isManipulating=!0,this.__manipulationInfo.mousePositionStart={x,y},this.__manipulationInfo.mousePositionEnd={x,y},this.__manipulationInfo.moveReferenceLine=!0,void(this.__manipulationInfo.referenceLine=foundedRefLine)}this.__mouseMode!==MouseMode.ZoomX&&this.__mouseMode!==MouseMode.ZoomXY&&this.__mouseMode!==MouseMode.PanX&&this.__mouseMode!==MouseMode.PanXY||(this.__manipulationInfo.mousePositionStart.x=x,this.__manipulationInfo.mousePositionStart.y=y,this.__manipulationInfo.mousePositionEnd.x=x,this.__manipulationInfo.mousePositionEnd.y=y,this.__mouseMode===MouseMode.ZoomX&&(this.__manipulationInfo.mousePositionStart.y=offsetTop,this.__manipulationInfo.mousePositionEnd.y=offsetTop)),this.__manipulationInfo.isManipulating=!0,this.__manipulationInfo.transform={x:0,y:0}}__userInteractionMove(x,y){if(this.__tooltipInformation.show&&(this.__elementTooltip.css("visibility","hidden"),this.__tooltipInformation={show:!1,isActive:!1,time:0,points:[],errors:[],referenceLine:void 0}),!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;if(xAxis){if(offsetLeft=xAxis.getXAxisLeftWidth()||0,this.__manipulationInfo.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.__manipulationInfo.referenceLine){let context=canvasLines[0].getContext("2d");if(context){context.clearRect(0,0,context.canvas.width,context.canvas.height);let dX=x-this.__manipulationInfo.mousePositionEnd.x,dY=y-this.__manipulationInfo.mousePositionEnd.y,refLine=this.__manipulationInfo.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=(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)}}this.__createTooltip(this.__manipulationInfo.mousePositionEnd.x,this.__manipulationInfo.mousePositionEnd.y,!0,!1)}}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,width=x-this.__manipulationInfo.mousePositionStart.x,height=0;height=this.__mouseMode===MouseMode.ZoomX?basicYAxis.getLineHeight():y-this.__manipulationInfo.mousePositionStart.y,this.__zoomingCanvasContext.clearRect(0,0,canvasWidth,canvasHeight),this.__zoomingCanvasContext.beginPath(),this.__zoomingCanvasContext.rect(this.__manipulationInfo.mousePositionStart.x,this.__manipulationInfo.mousePositionStart.y,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.__manipulationInfo.mousePositionEnd.x,dY=y-this.__manipulationInfo.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.__manipulationInfo.transform={x:this.__manipulationInfo.transform.x+dX,y:this.__manipulationInfo.transform.y+dY}):(dY=0,context.translate(dX,0),this.__manipulationInfo.transform.x=this.__manipulationInfo.transform.x+dX),this.__lineChart.setLineChanged(!0),this.__lineChart.draw(),this.__manipulationInfo.transform.y>=0?this.__manipulationInfo.transform.x>=0?(context.clearRect(-this.__manipulationInfo.transform.x,-this.__manipulationInfo.transform.y,canvasWidth+this.__manipulationInfo.transform.x,offsetTop+this.__manipulationInfo.transform.y),context.clearRect(-this.__manipulationInfo.transform.x,canvasHeight-this.__manipulationInfo.transform.y,canvasWidth+this.__manipulationInfo.transform.x,-(canvasHeight-basicYAxis.getLineHeight()-offsetTop)),context.clearRect(-this.__manipulationInfo.transform.x,-this.__manipulationInfo.transform.y,offsetLeft+this.__manipulationInfo.transform.x,canvasHeight+this.__manipulationInfo.transform.y),context.clearRect(canvasWidth-this.__manipulationInfo.transform.x,-this.__manipulationInfo.transform.y,-(canvasWidth-offsetLeft-xAxis.getLineWidth()),canvasHeight+this.__manipulationInfo.transform.y)):(context.clearRect(-this.__manipulationInfo.transform.x,-this.__manipulationInfo.transform.y,canvasWidth+this.__manipulationInfo.transform.x,offsetTop+this.__manipulationInfo.transform.y),context.clearRect(-this.__manipulationInfo.transform.x,canvasHeight-this.__manipulationInfo.transform.y,canvasWidth+this.__manipulationInfo.transform.x,-(canvasHeight-basicYAxis.getLineHeight()-offsetTop)),context.clearRect(-this.__manipulationInfo.transform.x,-this.__manipulationInfo.transform.y,offsetLeft,canvasHeight+this.__manipulationInfo.transform.y),context.clearRect(canvasWidth-this.__manipulationInfo.transform.x,-this.__manipulationInfo.transform.y,-(canvasWidth-offsetLeft-xAxis.getLineWidth()-this.__manipulationInfo.transform.x),canvasHeight+this.__manipulationInfo.transform.y)):this.__manipulationInfo.transform.x>=0?(context.clearRect(-this.__manipulationInfo.transform.x,-this.__manipulationInfo.transform.y,canvasWidth+this.__manipulationInfo.transform.x,offsetTop),context.clearRect(-this.__manipulationInfo.transform.x,canvasHeight-this.__manipulationInfo.transform.y,canvasWidth+this.__manipulationInfo.transform.x,-(canvasHeight-basicYAxis.getLineHeight()-offsetTop-this.__manipulationInfo.transform.y)),context.clearRect(-this.__manipulationInfo.transform.x,-this.__manipulationInfo.transform.y,offsetLeft+this.__manipulationInfo.transform.x,canvasHeight+this.__manipulationInfo.transform.y),context.clearRect(canvasWidth-this.__manipulationInfo.transform.x,-this.__manipulationInfo.transform.y,-(canvasWidth-offsetLeft-xAxis.getLineWidth()),canvasHeight+this.__manipulationInfo.transform.y)):(context.clearRect(-this.__manipulationInfo.transform.x,-this.__manipulationInfo.transform.y,canvasWidth+this.__manipulationInfo.transform.x,offsetTop),context.clearRect(-this.__manipulationInfo.transform.x,canvasHeight-this.__manipulationInfo.transform.y,canvasWidth+this.__manipulationInfo.transform.x,-(canvasHeight-basicYAxis.getLineHeight()-offsetTop-this.__manipulationInfo.transform.y)),context.clearRect(-this.__manipulationInfo.transform.x,-this.__manipulationInfo.transform.y,offsetLeft,canvasHeight+this.__manipulationInfo.transform.y),context.clearRect(canvasWidth-this.__manipulationInfo.transform.x,-this.__manipulationInfo.transform.y,-(canvasWidth-offsetLeft-xAxis.getLineWidth()-this.__manipulationInfo.transform.x),canvasHeight+this.__manipulationInfo.transform.y))}this.__manipulationInfo.mousePositionEnd.x=x,this.__manipulationInfo.mousePositionEnd.y=y}}__userInteractionEnd(){if(this.__manipulationInfo.moveReferenceLine){let staticMouse=this.__manipulationInfo.mousePositionStart.x===this.__manipulationInfo.mousePositionEnd.x&&this.__manipulationInfo.mousePositionStart.y===this.__manipulationInfo.mousePositionEnd.y;return this.__lastInteraction=!0,this.resetManipulation(),void(staticMouse||(this.__manipulationInfo.click=!1))}if(null===this.__zoomingCanvasContext)return;if("First"===this.__internalStart||null===this.__internalStart)return;if("Latest"===this.__internalEnd||null===this.__internalEnd)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(null!==xAxis){let start=xAxis.getMainTickStartValue(),end=xAxis.getMainTickEndValue(),endTimespanMilliSec=0,startTime="";if(null!==start&&null!==end){endTimespanMilliSec=end-start;let t=new Date(start);startTime=`${t.getUTCFullYear()}-${`0${t.getUTCMonth()+1}`.slice(-2)}-${`0${t.getUTCDate()}`.slice(-2)}T${`0${t.getUTCHours()}`.slice(-2)}:${`0${t.getUTCMinutes()}`.slice(-2)}:${`0${t.getUTCSeconds()}`.slice(-2)}.${`00${t.getUTCMilliseconds()}`.slice(-3)}Z`}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 diffTime=endTimespanMilliSec;if(this.__mouseMode===MouseMode.ZoomX||this.__mouseMode===MouseMode.ZoomXY){let startX,endX,drawingEnd=offsetLeft+xAxis.getLineWidth();this.__manipulationInfo.mousePositionStart.x<this.__manipulationInfo.mousePositionEnd.x?(startX=this.__manipulationInfo.mousePositionStart.x,this.__manipulationInfo.mousePositionStart.x<offsetLeft&&(startX=offsetLeft),endX=this.__manipulationInfo.mousePositionEnd.x,this.__manipulationInfo.mousePositionEnd.x>drawingEnd&&(endX=drawingEnd)):(startX=this.__manipulationInfo.mousePositionEnd.x,this.__manipulationInfo.mousePositionEnd.x<offsetLeft&&(startX=offsetLeft),endX=this.__manipulationInfo.mousePositionStart.x,this.__manipulationInfo.mousePositionStart.x>drawingEnd&&(endX=drawingEnd));let newTimespan=(endX-startX)/diffPixelWidth*diffTime;if(!(newTimespan>=1||this.__mouseMode===MouseMode.ZoomXY)){this.resetManipulation();let canvasZoomingElem=this.__elementChart[0].getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-canvas-zooming");return void(canvasZoomingElem.length>0&&canvasZoomingElem[0].classList.add("tchmi-no-pointer-events"))}if(this.__mouseMode===MouseMode.ZoomXY){let yAxis=this.__lineChart.getYAxis();if(yAxis&&yAxis.length>0){let startY,endY,drawingEndY=offsetTop+yAxis[0].getLineHeight();this.__manipulationInfo.mousePositionStart.y<this.__manipulationInfo.mousePositionEnd.y?(endY=this.__manipulationInfo.mousePositionStart.y,this.__manipulationInfo.mousePositionStart.y<offsetTop&&(endY=offsetTop),startY=this.__manipulationInfo.mousePositionEnd.y,this.__manipulationInfo.mousePositionEnd.y>drawingEndY&&(startY=drawingEndY)):(endY=this.__manipulationInfo.mousePositionEnd.y,this.__manipulationInfo.mousePositionEnd.y<offsetTop&&(endY=offsetTop),startY=this.__manipulationInfo.mousePositionStart.y,this.__manipulationInfo.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.__manipulationInfo.actualYAxis[index].autoScaling=!1,this.__manipulationInfo.actualYAxis[index].mainTickMaxValue=maxDisplacement,this.__manipulationInfo.actualYAxis[index].mainTickMinValue=minDisplacement}let pixelWidthPercentStart=(startX-offsetLeft)/diffPixelWidth,widthDisplacement=Math.abs(diffTime*pixelWidthPercentStart),newStartMilliSec=new Date(new Date(startTime).getTime()+widthDisplacement);if(this.__endDatatype===Datatype.Datetime){let newEndMilliSec=new Date(newStartMilliSec.getTime()+newTimespan);this.__internalEnd=`${newEndMilliSec.getUTCFullYear()}-${`0${newEndMilliSec.getUTCMonth()+1}`.slice(-2)}-${`0${newEndMilliSec.getUTCDate()}`.slice(-2)}T${`0${newEndMilliSec.getUTCHours()}`.slice(-2)}:${`0${newEndMilliSec.getUTCMinutes()}`.slice(-2)}:${`0${newEndMilliSec.getUTCSeconds()}`.slice(-2)}.${`00${newEndMilliSec.getUTCMilliseconds()}`.slice(-3)}Z`}else this.__internalEnd=Helper.__milliSecToIso(newTimespan);this.__startDatatype===Datatype.Datetime?this.__internalStart=`${newStartMilliSec.getUTCFullYear()}-${`0${newStartMilliSec.getUTCMonth()+1}`.slice(-2)}-${`0${newStartMilliSec.getUTCDate()}`.slice(-2)}T${`0${newStartMilliSec.getUTCHours()}`.slice(-2)}:${`0${newStartMilliSec.getUTCMinutes()}`.slice(-2)}:${`0${newStartMilliSec.getUTCSeconds()}`.slice(-2)}.${`00${newStartMilliSec.getUTCMilliseconds()}`.slice(-3)}Z`:this.__internalStart=Helper.__milliSecToIso(newTimespan),TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"YAxis"})}}else{let pixelWidthPercentStart=(startX-offsetLeft)/diffPixelWidth,widthDisplacement=Math.abs(diffTime*pixelWidthPercentStart),newStartMilliSec=new Date(new Date(startTime).getTime()+widthDisplacement);if(this.__endDatatype===Datatype.Datetime){let newEndMilliSec=new Date(newStartMilliSec.getTime()+newTimespan);this.__internalEnd=`${newEndMilliSec.getUTCFullYear()}-${`0${newEndMilliSec.getUTCMonth()+1}`.slice(-2)}-${`0${newEndMilliSec.getUTCDate()}`.slice(-2)}T${`0${newEndMilliSec.getUTCHours()}`.slice(-2)}:${`0${newEndMilliSec.getUTCMinutes()}`.slice(-2)}:${`0${newEndMilliSec.getUTCSeconds()}`.slice(-2)}.${`00${newEndMilliSec.getUTCMilliseconds()}`.slice(-3)}Z`}else this.__internalEnd=Helper.__milliSecToIso(newTimespan);this.__startDatatype===Datatype.Datetime?this.__internalStart=`${newStartMilliSec.getUTCFullYear()}-${`0${newStartMilliSec.getUTCMonth()+1}`.slice(-2)}-${`0${newStartMilliSec.getUTCDate()}`.slice(-2)}T${`0${newStartMilliSec.getUTCHours()}`.slice(-2)}:${`0${newStartMilliSec.getUTCMinutes()}`.slice(-2)}:${`0${newStartMilliSec.getUTCSeconds()}`.slice(-2)}.${`00${newStartMilliSec.getUTCMilliseconds()}`.slice(-3)}Z`:this.__internalStart=Helper.__milliSecToIso(newTimespan)}this.__openWebsocket(),this.resetManipulation()}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 pixelWidthPercent=this.__manipulationInfo.transform.x/diffPixelWidth;if(0===pixelWidthPercent&&this.__mouseMode===MouseMode.PanX){let canvasZoomingElem=this.__elementChart[0].getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-canvas-zooming");return canvasZoomingElem.length>0&&canvasZoomingElem[0].classList.add("tchmi-no-pointer-events"),void this.resetManipulation()}let widthDisplacement=diffTime*pixelWidthPercent;if(this.__startDatatype===Datatype.Datetime&&this.__endDatatype===Datatype.Datetime){let newStartMilliSec=new Date(new Date(startTime).getTime()-widthDisplacement);this.__internalStart=`${newStartMilliSec.getUTCFullYear()}-${`0${newStartMilliSec.getUTCMonth()+1}`.slice(-2)}-${`0${newStartMilliSec.getUTCDate()}`.slice(-2)}T${`0${newStartMilliSec.getUTCHours()}`.slice(-2)}:${`0${newStartMilliSec.getUTCMinutes()}`.slice(-2)}:${`0${newStartMilliSec.getUTCSeconds()}`.slice(-2)}.${`00${newStartMilliSec.getUTCMilliseconds()}`.slice(-3)}Z`;let newEndMilliSec=new Date(newStartMilliSec.getTime()+diffTime);this.__internalEnd=`${newEndMilliSec.getUTCFullYear()}-${`0${newEndMilliSec.getUTCMonth()+1}`.slice(-2)}-${`0${newEndMilliSec.getUTCDate()}`.slice(-2)}T${`0${newEndMilliSec.getUTCHours()}`.slice(-2)}:${`0${newEndMilliSec.getUTCMinutes()}`.slice(-2)}:${`0${newEndMilliSec.getUTCSeconds()}`.slice(-2)}.${`00${newEndMilliSec.getUTCMilliseconds()}`.slice(-3)}Z`}else if(this.__endDatatype===Datatype.Datetime&&null!==end){let newEndMilliSec=new Date(end-widthDisplacement);this.__internalEnd=`${newEndMilliSec.getUTCFullYear()}-${`0${newEndMilliSec.getUTCMonth()+1}`.slice(-2)}-${`0${newEndMilliSec.getUTCDate()}`.slice(-2)}T${`0${newEndMilliSec.getUTCHours()}`.slice(-2)}:${`0${newEndMilliSec.getUTCMinutes()}`.slice(-2)}:${`0${newEndMilliSec.getUTCSeconds()}`.slice(-2)}.${`00${newEndMilliSec.getUTCMilliseconds()}`.slice(-3)}Z`}else if(this.__startDatatype===Datatype.Datetime){let newStartMilliSec=new Date(new Date(startTime).getTime()-widthDisplacement);this.__internalStart=`${newStartMilliSec.getUTCFullYear()}-${`0${newStartMilliSec.getUTCMonth()+1}`.slice(-2)}-${`0${newStartMilliSec.getUTCDate()}`.slice(-2)}T${`0${newStartMilliSec.getUTCHours()}`.slice(-2)}:${`0${newStartMilliSec.getUTCMinutes()}`.slice(-2)}:${`0${newStartMilliSec.getUTCSeconds()}`.slice(-2)}.${`00${newStartMilliSec.getUTCMilliseconds()}`.slice(-3)}Z`}if(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.__manipulationInfo.transform.y/diffPixelHeight),minDisplacement=min+heightDisplacement,maxDisplacement=max+heightDisplacement;this.__manipulationInfo.actualYAxis[index].autoScaling=!1,this.__manipulationInfo.actualYAxis[index].mainTickMaxValue=maxDisplacement,this.__manipulationInfo.actualYAxis[index].mainTickMinValue=minDisplacement}TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"YAxis"})}}this.__openWebsocket(),this.resetManipulation()}}}}}this.__lastInteraction=!0,this.__manipulationInfo.click=!1;let canvasZoomingElem=this.__elementChart[0].getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-canvas-zooming");canvasZoomingElem.length>0&&canvasZoomingElem[0].classList.remove("tchmi-no-pointer-events")}__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.__manipulationInfo.first.identifier=event.touches[0].identifier,this.__manipulationInfo.second.identifier=event.touches[1].identifier,this.__manipulationInfo.multitouchMode=!0;let xDiff=coords1.x-coords2.x,yDiff=coords1.y-coords2.y;this.__manipulationInfo.distance=Math.sqrt(xDiff*xDiff+yDiff*yDiff)}__userMultitouchMove(event){if(!this.__manipulationInfo.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.__manipulationInfo.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};if(middlePoint.x=Math.round((coords1.x+coords2.x)/2),middlePoint.y=Math.round((coords1.y+coords2.y)/2),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;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,xAxis.setMainTickStartValue(start),xAxis.setMainTickEndValue(end),xAxis.setAutoScaling(!1),this.__lineChart.setHasChanged(!0),this.__lineChart.setLineChanged(!0),(this.__mouseMode===MouseMode.PanXY||this.__mouseMode===MouseMode.ZoomXY)&&this.__lineChart){let yAxis=this.__lineChart.getYAxis();if(yAxis)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,yDisplacement=(diff-newDiff)*((middlePoint.y-offsetTop)/yLineHeight);this.__manipulationInfo.actualYAxis[index].autoScaling=!1,this.__manipulationInfo.actualYAxis[index].mainTickMaxValue=max-yDisplacement,this.__manipulationInfo.actualYAxis[index].mainTickMinValue=max-newDiff}}this.__lineChart.draw(),this.__manipulationInfo.actualXAxisStart=start}}}}}this.__manipulationInfo.distance=newDistance}__userMultitouchEnd(event){if(this.__manipulationInfo.multitouchMode)for(const touch of event.changedTouches??[])if(touch.identifier===this.__manipulationInfo.first.identifier||touch.identifier===this.__manipulationInfo.second.identifier){if(null!==this.__manipulationInfo.actualXAxisStart&&null!==this.__manipulationInfo.actualXAxisEnd){let startDate=new Date(this.__manipulationInfo.actualXAxisStart),endDate=new Date(this.__manipulationInfo.actualXAxisEnd);if(this.__endDatatype===Datatype.Datetime){let newEndMilliSec=new Date(endDate.getTime());this.__internalEnd=`${newEndMilliSec.getUTCFullYear()}-${`0${newEndMilliSec.getUTCMonth()+1}`.slice(-2)}-${`0${newEndMilliSec.getUTCDate()}`.slice(-2)}T${`0${newEndMilliSec.getUTCHours()}`.slice(-2)}:${`0${newEndMilliSec.getUTCMinutes()}`.slice(-2)}:${`0${newEndMilliSec.getUTCSeconds()}`.slice(-2)}.${`00${newEndMilliSec.getUTCMilliseconds()}`.slice(-3)}Z`}else this.__internalEnd=Helper.__milliSecToIso(this.__manipulationInfo.actualXAxisEnd);this.__startDatatype===Datatype.Datetime?this.__internalStart=`${startDate.getUTCFullYear()}-${`0${startDate.getUTCMonth()+1}`.slice(-2)}-${`0${startDate.getUTCDate()}`.slice(-2)}T${`0${startDate.getUTCHours()}`.slice(-2)}:${`0${startDate.getUTCMinutes()}`.slice(-2)}:${`0${startDate.getUTCSeconds()}`.slice(-2)}.${`00${startDate.getUTCMilliseconds()}`.slice(-3)}Z`:this.__internalStart=Helper.__milliSecToIso(this.__manipulationInfo.actualXAxisStart),this.__openWebsocket()}return void this.resetManipulation()}}__onMouseWheel(event){if(this.__manipulationInfo.isManipulating)return;if("Latest"===this.__internalEnd||"First"===this.__internalStart||null===this.__internalEnd||null===this.__internalStart)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.__manipulationInfo.isWheeling=!0,this.__manipulationInfo.mousePositionStart={x,y},this.__manipulationInfo.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.__manipulationInfo.wheelSteps=this.__manipulationInfo.wheelSteps+delta,this.__manipulationInfo.wheelTimeout=setTimeout(()=>{if(xAxis){let start=xAxis.getMainTickStartValue()||0,timespan=(xAxis.getMainTickEndValue()||0)-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 factor=newTimespan/timespan;start+=(timespan-newTimespan)*((this.__manipulationInfo.mousePositionStart.x-offsetLeft)/xLineWidth);let date=new Date(start);if(this.__endDatatype===Datatype.Datetime){let newEndMilliSec=new Date(date.getTime()+newTimespan);this.__internalEnd=`${newEndMilliSec.getUTCFullYear()}-${`0${newEndMilliSec.getUTCMonth()+1}`.slice(-2)}-${`0${newEndMilliSec.getUTCDate()}`.slice(-2)}T${`0${newEndMilliSec.getUTCHours()}`.slice(-2)}:${`0${newEndMilliSec.getUTCMinutes()}`.slice(-2)}:${`0${newEndMilliSec.getUTCSeconds()}`.slice(-2)}.${`00${newEndMilliSec.getUTCMilliseconds()}`.slice(-3)}Z`}else this.__internalEnd=Helper.__milliSecToIso(newTimespan);if(this.__startDatatype===Datatype.Datetime?this.__internalStart=`${date.getUTCFullYear()}-${`0${date.getUTCMonth()+1}`.slice(-2)}-${`0${date.getUTCDate()}`.slice(-2)}T${`0${date.getUTCHours()}`.slice(-2)}:${`0${date.getUTCMinutes()}`.slice(-2)}:${`0${date.getUTCSeconds()}`.slice(-2)}.${`00${date.getUTCMilliseconds()}`.slice(-3)}Z`:this.__internalStart=Helper.__milliSecToIso(newTimespan),this.__mouseMode===MouseMode.PanXY||this.__mouseMode===MouseMode.ZoomXY){if(this.__lineChart){let yAxis=this.__lineChart.getYAxis();if(yAxis){let changedYAxis=!1;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.__manipulationInfo.mousePositionStart.y-offsetTop)/yLineHeight),min=max-newDiff,this.__manipulationInfo.actualYAxis[index].autoScaling=!1,this.__manipulationInfo.actualYAxis[index].mainTickMaxValue=max,this.__manipulationInfo.actualYAxis[index].mainTickMinValue=min,changedYAxis=!0}changedYAxis&&TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"YAxis"})}}}else if(this.__lineChart){let yAxis=this.__lineChart.getYAxis();if(yAxis){let changedYAxis=!1;for(const[index,axis]of yAxis.entries()??[])if(axis.getAutoScaling()){let startOverride=axis.getMainTickStartValueOverride(),endOverride=axis.getMainTickEndValueOverride();null!==startOverride&&(this.__manipulationInfo.actualYAxis[index].mainTickMinValue=startOverride),null!==endOverride&&(this.__manipulationInfo.actualYAxis[index].mainTickMaxValue=endOverride),this.__manipulationInfo.actualYAxis[index].autoScaling=!1,changedYAxis=!0}changedYAxis&&TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"YAxis"})}}this.__openWebsocket()}this.__manipulationInfo.wheelTimeout&&(clearTimeout(this.__manipulationInfo.wheelTimeout),this.__manipulationInfo.wheelTimeout=0),this.resetManipulation()},400)}}setXAxisFormat(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew)??this.getAttributeDefaultValueInternal("XAxisFormat"),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,TcHmiTrendLineChart.#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.__xAxisCallbackFunction),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}__xAxisCallbackFunction(result){if(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,TcHmiTrendLineChart.#tchmiFQN,`Failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}),f.destroy(),res;TcHmi.Log.Controls.error(this,TcHmiTrendLineChart.#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(isNaN(result)||"number"!=typeof result)return result+"";return TcHmi.Localization.formatDate(new Date(result))}resetManipulation(){this.__manipulationInfo.isManipulating=!1,this.__manipulationInfo.multitouchMode=!1,this.__manipulationInfo.mousePositionStart={x:0,y:0},this.__manipulationInfo.mousePositionEnd={x:0,y:0},this.__manipulationInfo.offset={left:0,top:0},this.__manipulationInfo.scale={x:0,y:0},this.__manipulationInfo.transform={x:0,y:0},this.__manipulationInfo.click=!0,this.__manipulationInfo.isWheeling=!1,this.__manipulationInfo.wheelSteps=0,this.__manipulationInfo.wheelTimeout=0,this.__manipulationInfo.first={identifier:null},this.__manipulationInfo.second={identifier:null},this.__manipulationInfo.distance=0,this.__manipulationInfo.moveReferenceLine=!1,this.__manipulationInfo.referenceLine=null}stop(){if(this.__lineChart){if("First"===this.__internalStart||"Latest"===this.__internalEnd){let xAxis=this.__lineChart.getXAxis();if(null!==xAxis){let start=xAxis.getMainTickStartValue(),end=xAxis.getMainTickEndValue();if(null!==start&&null!==end){if("First"===this.__internalStart){let t=new Date(start);this.__internalStart=`${t.getUTCFullYear()}-${`0${t.getUTCMonth()+1}`.slice(-2)}-${`0${t.getUTCDate()}`.slice(-2)}T${`0${t.getUTCHours()}`.slice(-2)}:${`0${t.getUTCMinutes()}`.slice(-2)}:${`0${t.getUTCSeconds()}`.slice(-2)}.${`00${t.getUTCMilliseconds()}`.slice(-3)}Z`,this.__startDatatype=Datatype.Datetime}if("Latest"===this.__internalEnd){let t=new Date(end);this.__internalEnd=`${t.getUTCFullYear()}-${`0${t.getUTCMonth()+1}`.slice(-2)}-${`0${t.getUTCDate()}`.slice(-2)}T${`0${t.getUTCHours()}`.slice(-2)}:${`0${t.getUTCMinutes()}`.slice(-2)}:${`0${t.getUTCSeconds()}`.slice(-2)}.${`00${t.getUTCMilliseconds()}`.slice(-3)}Z`,this.__endDatatype=Datatype.Datetime}}}}this.__startEndBeforeZoom={end:this.__internalEnd,start:this.__internalStart},this.__manipulationInfo.isStopped=!0,this.__manipulationInfo.beginXAxisStart=this.__lineChart.getXAxis()?.getMainTickStartValueOverride()||this.__lineChart.getXAxis()?.getMainTickStartValue()||0,this.__manipulationInfo.beginXAxisEnd=this.__lineChart.getXAxis()?.getMainTickEndValueOverride()||this.__lineChart.getXAxis()?.getMainTickEndValue()||0,this.__manipulationInfo.actualXAxisStart=this.__lineChart.getXAxis()?.getMainTickStartValueOverride()||this.__lineChart.getXAxis()?.getMainTickStartValue()||0,this.__manipulationInfo.actualXAxisEnd=this.__lineChart.getXAxis()?.getMainTickEndValueOverride()||this.__lineChart.getXAxis()?.getMainTickEndValue()||0,this.__manipulationInfo.beginYAxis=tchmi_clone_object(this.__yAxisInternal)||[],this.__manipulationInfo.actualYAxis=tchmi_clone_object(this.__yAxisInternal)||[],this.__manipulationInfo.beginData=tchmi_clone_object(this.__lineGraphData)||[];for(let i=0,ii=this.__manipulationInfo.beginYAxis.length;i<ii;i++){let yAxis=this.__lineChart.getYAxisAtPosition(i);this.__manipulationInfo.beginYAxis[i].mainTickMinValue=yAxis?.getMainTickStartValueOverride()||yAxis?.getMainTickStartValue()||0,this.__manipulationInfo.beginYAxis[i].mainTickMaxValue=yAxis?.getMainTickEndValueOverride()||yAxis?.getMainTickEndValue()||0,this.__manipulationInfo.actualYAxis[i].mainTickMinValue=yAxis?.getMainTickStartValueOverride()||yAxis?.getMainTickStartValue()||0,this.__manipulationInfo.actualYAxis[i].mainTickMaxValue=yAxis?.getMainTickEndValueOverride()||yAxis?.getMainTickEndValue()||0,this.__manipulationInfo.actualYAxis[i].autoScaling=!1,this.__manipulationInfo.beginYAxis[i].isSelected||(this.__manipulationInfo.actualYAxis[i].showAxis=!1)}this.__openWebsocket()}}pause(){this.stop()}resetZoom(){this.__manipulationInfo.actualXAxisStart=this.__manipulationInfo.beginXAxisStart,this.__manipulationInfo.actualXAxisEnd=this.__manipulationInfo.beginXAxisEnd,this.__manipulationInfo.actualYAxis=tchmi_clone_object(this.__manipulationInfo.beginYAxis);for(let i=0,ii=this.__manipulationInfo.beginYAxis.length;i<ii;i++)this.__manipulationInfo.actualYAxis[i].autoScaling=!1,this.__manipulationInfo.beginYAxis[i].isSelected||(this.__manipulationInfo.actualYAxis[i].showAxis=!1);this.__internalEnd!==this.__startEndBeforeZoom.end||this.__internalStart!==this.__startEndBeforeZoom.start?(this.__internalEnd=this.__startEndBeforeZoom.end,this.__internalStart=this.__startEndBeforeZoom.start,null===this.__internalStart?this.__startDatatype=null:Helper.isDatetime(this.__internalStart)?this.__startDatatype=Datatype.Datetime:Helper.isKeyword(this.__internalStart)?this.__startDatatype=Datatype.Keyword:this.__startDatatype=Datatype.Timespan,null===this.__internalEnd?this.__endDatatype=null:Helper.isDatetime(this.__internalEnd)?this.__endDatatype=Datatype.Datetime:Helper.isKeyword(this.__internalEnd)?this.__endDatatype=Datatype.Keyword:this.__endDatatype=Datatype.Timespan,this.__openWebsocket()):this.__drawLineChart()}reset(){this.__manipulationInfo.isStopped=!1;let change=!1;this.__internalStart!==this.__start&&this.__start&&(this.__internalStart=this.__start,null===this.__internalStart?this.__startDatatype=null:Helper.isDatetime(this.__internalStart)?this.__startDatatype=Datatype.Datetime:Helper.isKeyword(this.__internalStart)?this.__startDatatype=Datatype.Keyword:this.__startDatatype=Datatype.Timespan,change=!0),this.__internalEnd!==this.__end&&this.__end&&(this.__internalEnd=this.__end,null===this.__internalEnd?this.__endDatatype=null:Helper.isDatetime(this.__internalEnd)?this.__endDatatype=Datatype.Datetime:Helper.isKeyword(this.__internalEnd)?this.__endDatatype=Datatype.Keyword:this.__endDatatype=Datatype.Timespan,change=!0),this.__lastInteraction=!1,this.__attributesInitialized&&(this.__createInternals(),this.__createLegend(),change?this.__openWebsocket():this.__drawLineChart())}play(){this.reset()}setSectionsBackgroundColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew)??this.getAttributeDefaultValueInternal("SectionsBackgroundColor"),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,TcHmiTrendLineChart.#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)??this.getAttributeDefaultValueInternal("YAxisWidth");convertedValue!==this.__yAxisWidth&&(this.__yAxisWidth=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"YAxisWidth"}),this.__processYAxisWidth())}getYAxisWidth(){return this.__yAxisWidth}__processYAxisWidth(){this.__lineChart&&(this.__lineChart.setYAxisWidth(this.__yAxisWidth??this.getAttributeDefaultValueInternal("YAxisWidth")),this.__lineChart.draw())}setYLabelFontFamily(valueNew){let convertedValue=TcHmi.ValueConverter.toFontFamily(valueNew)??this.getAttributeDefaultValueInternal("YLabelFontFamily");convertedValue!==this.__yLabelFontFamily&&(this.__yLabelFontFamily=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"YLabelFontFamily"}),this.__processYLabelFontFamily())}getYLabelFontFamily(){return this.__yLabelFontFamily}__processYLabelFontFamily(){this.__lineChart&&(this.__lineChart.setYLabelFontFamily(this.__yLabelFontFamily),this.__lineChart.draw())}setYLabelFontSize(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew)??this.getAttributeDefaultValueInternal("YLabelFontSize");convertedValue!==this.__yLabelFontSize&&(this.__yLabelFontSize=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"YLabelFontSize"}),this.__processYLabelFontSize())}getYLabelFontSize(){return this.__yLabelFontSize}__processYLabelFontSize(){this.__lineChart&&(this.__lineChart.setYLabelFontSize(this.__yLabelFontSize??this.getAttributeDefaultValueInternal("YLabelFontSize")),this.__lineChart.draw())}setYLabelFontSizeUnit(valueNew){}getYLabelFontSizeUnit(){return"px"}setYLabelFontWeight(valueNew){let convertedValue=TcHmi.ValueConverter.toFontWeight(valueNew)??this.getAttributeDefaultValueInternal("YLabelFontWeight");convertedValue!==this.__yLabelFontWeight&&(this.__yLabelFontWeight=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"YLabelFontWeight"}),this.__processYLabelFontWeight())}getYLabelFontWeight(){return this.__yLabelFontWeight}__processYLabelFontWeight(){this.__lineChart&&(this.__lineChart.setYLabelFontWeight(this.__yLabelFontWeight??this.getAttributeDefaultValueInternal("YLabelFontWeight")),this.__lineChart.draw())}setYMainTickSteps(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew)??this.getAttributeDefaultValueInternal("YMainTickSteps");convertedValue!==this.__yMainTickSteps&&(this.__yMainTickSteps=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"YMainTickSteps"}),this.__processYMainTickSteps())}getYMainTickSteps(){return this.__yMainTickSteps}__processYMainTickSteps(){this.__lineChart&&(this.__lineChart.setYMainTickSteps(this.__yMainTickSteps??this.getAttributeDefaultValueInternal("YMainTickSteps")),this.__lineChart.draw())}setShowYSubTicks(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew)??this.getAttributeDefaultValueInternal("ShowYSubTicks");convertedValue!==this.__showYSubTicks&&(this.__showYSubTicks=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ShowYSubTicks"}),this.__processShowYSubTicks())}getShowYSubTicks(){return this.__showYSubTicks}__processShowYSubTicks(){this.__lineChart&&(this.__lineChart.setShowYSubTicks(this.__showYSubTicks??this.getAttributeDefaultValueInternal("ShowYSubTicks")),this.__lineChart.draw())}setYSubTickSteps(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew)??this.getAttributeDefaultValueInternal("YSubTickSteps");convertedValue!==this.__ySubTickSteps&&(this.__ySubTickSteps=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"YSubTickSteps"}),this.__processYSubTickSteps())}getYSubTickSteps(){return this.__ySubTickSteps}__processYSubTickSteps(){this.__lineChart&&(this.__lineChart.setYSubTickSteps(this.__ySubTickSteps??this.getAttributeDefaultValueInternal("YSubTickSteps")),this.__lineChart.draw())}setShowXAxis(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew)??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(this.__lineChart){let xAxis=this.__lineChart.getXAxis();xAxis&&(xAxis.setShowAxis(this.__showXAxis??this.getAttributeDefaultValueInternal("ShowXAxis")),xAxis.getShowAxis()?xAxis.setShowLabels(this.__xShowLabels??this.getAttributeDefaultValueInternal("XShowLabels")):xAxis.setShowLabels(!1),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXShowLabels(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew)??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(this.__lineChart){let xAxis=this.__lineChart.getXAxis();xAxis&&(xAxis.getShowAxis()?xAxis.setShowLabels(this.__xShowLabels??this.getAttributeDefaultValueInternal("XShowLabels")):xAxis.setShowLabels(!1),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXMainTickSteps(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew)??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(this.__lineChart){let xAxis=this.__lineChart.getXAxis();xAxis&&(xAxis.setMainTickSteps(this.__xMainTickSteps??this.getAttributeDefaultValueInternal("XMainTickSteps")),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setShowXSubTicks(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew)??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(this.__lineChart){let xAxis=this.__lineChart.getXAxis();xAxis&&(xAxis.setShowSubTicks(this.__showXSubTicks??this.getAttributeDefaultValueInternal("ShowXSubTicks")),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXSubTickSteps(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew)??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(this.__lineChart){let xAxis=this.__lineChart.getXAxis();xAxis&&(xAxis.setSubTickSteps(this.__xSubTickSteps??this.getAttributeDefaultValueInternal("XSubTickSteps")),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXLabelFontFamily(valueNew){let convertedValue=TcHmi.ValueConverter.toFontFamily(valueNew)??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(this.__lineChart){let xAxis=this.__lineChart.getXAxis();xAxis&&(xAxis.setLabelFontFamily(this.__xLabelFontFamily),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXLabelFontSize(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew)??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(this.__lineChart){let xAxis=this.__lineChart.getXAxis();xAxis&&(xAxis.setLabelFontSize(this.__xLabelFontSize??this.getAttributeDefaultValueInternal("XLabelFontSize")),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXLabelFontSizeUnit(valueNew){}getXLabelFontSizeUnit(){return"px"}setXLabelFontWeight(valueNew){let convertedValue=TcHmi.ValueConverter.toFontWeight(valueNew)??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(this.__lineChart){let xAxis=this.__lineChart.getXAxis();xAxis&&(xAxis.setLabelFontWeight(this.__xLabelFontWeight??this.getAttributeDefaultValueInternal("XLabelFontWeight")),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXLabelFontColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew)??this.getAttributeDefaultValueInternal("XLabelFontColor"),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,TcHmiTrendLineChart.#tchmiFQN,{Attribute:"XLabelFontColor"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getXLabelFontColor(){return this.__xLabelFontColor}__processXLabelFontColor(){if(this.__lineChart){let xAxis=this.__lineChart.getXAxis();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)??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(this.__lineChart){let xAxis=this.__lineChart.getXAxis();xAxis&&(xAxis.setAxisWidth(this.__xAxisWidth??this.getAttributeDefaultValueInternal("XAxisWidth")),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXAxisColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew)??this.getAttributeDefaultValueInternal("XAxisColor"),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,TcHmiTrendLineChart.#tchmiFQN,{Attribute:"XAxisColor"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getXAxisColor(){return this.__xAxisColor}__processXAxisColor(){if(this.__lineChart){let xAxis=this.__lineChart.getXAxis();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)??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(this.__lineChart){let xAxis=this.__lineChart.getXAxis();xAxis&&(xAxis.setShowAxisName(this.__showXAxisName??this.getAttributeDefaultValueInternal("ShowXAxisName")),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXAxisName(valueNew){let convertedValue=TcHmi.ValueConverter.toString(valueNew)??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(this.__lineChart){let xAxis=this.__lineChart.getXAxis();xAxis&&(xAxis.setAxisName(this.__xAxisName??this.getAttributeDefaultValueInternal("XAxisName")),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXAxisNameFontFamily(valueNew){let convertedValue=TcHmi.ValueConverter.toFontFamily(valueNew)??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(this.__lineChart){let xAxis=this.__lineChart.getXAxis();xAxis&&(xAxis.setAxisNameFontFamily(this.__xAxisNameFontFamily),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXAxisNameFontSize(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew)??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(this.__lineChart){let xAxis=this.__lineChart.getXAxis();xAxis&&(xAxis.setAxisNameFontSize(this.__xAxisNameFontSize??this.getAttributeDefaultValueInternal("XAxisNameFontSize")),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXAxisNameFontSizeUnit(valueNew){}getXAxisNameFontSizeUnit(){return"px"}setXAxisNameFontWeight(valueNew){let convertedValue=TcHmi.ValueConverter.toFontWeight(valueNew)??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(this.__lineChart){let xAxis=this.__lineChart.getXAxis();xAxis&&(xAxis.setAxisNameFontWeight(this.__xAxisNameFontWeight??this.getAttributeDefaultValueInternal("XAxisNameFontWeight")),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setXAxisNameFontColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew)??this.getAttributeDefaultValueInternal("XAxisNameFontColor"),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,TcHmiTrendLineChart.#tchmiFQN,{Attribute:"XAxisNameFontColor"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getXAxisNameFontColor(){return this.__xAxisNameFontColor}__processXAxisNameFontColor(){if(this.__lineChart){let xAxis=this.__lineChart.getXAxis();xAxis&&(TcHmi.isSolidColor(this.__xAxisNameFontColor)?xAxis.setAxisNameFontColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(this.__xAxisNameFontColor)):xAxis.setAxisNameFontColor(null),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setYAxis(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew)??this.getAttributeDefaultValueInternal("YAxis"),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,TcHmiTrendLineChart.#tchmiFQN,{Attribute:"YAxis"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getYAxis(){return this.__yAxis}__processYAxis(){this.__attributesInitialized&&!this.__manipulationInfo.isStopped&&(this.__createInternals(),this.__createLegend(),this.__lineGraphDescriptions&&0!==this.__lineGraphDescriptions.length&&!TCHMI_DESIGNER?this.__openWebsocket():this.__drawLineChart())}setLineGraphDescriptions(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew)??this.getAttributeDefaultValueInternal("LineGraphDescription"),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("LineGraphDescription")?.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:"LineGraphDescription"}),this.__processLineGraphDescriptions()):TcHmi.Log.Controls.error(this,TcHmiTrendLineChart.#tchmiFQN,{Attribute:"LineGraphDescription"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getLineGraphDescriptions(){return this.__lineGraphDescriptions}__processLineGraphDescriptions(){if(this.__attributesInitialized&&!this.__manipulationInfo.isStopped){if(this.__createInternals(),this.__createLegend(),this.__lineGraphDescriptions&&0!==this.__lineGraphDescriptions.length&&!TCHMI_DESIGNER)return void this.__openWebsocket();this.__drawLineChart(),null!==this.__subscriptionId&&(TcHmi.Server.unsubscribeEx(this.__subscriptionId,{parallel:!0}),this.__subscriptionId=null),this.__reset(),this.__drawLineChart()}}setShowGrid(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew)??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(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(this.__gridLineWidth??this.getAttributeDefaultValueInternal("GridLineWidth")),grid.setLineStyle(this.__gridLineStyle??this.getAttributeDefaultValueInternal("GridLineStyle")),grid.setShowHorizontalLines(this.__gridShowHorizontalLines??this.getAttributeDefaultValueInternal("GridShowHorizontalLines")),grid.setShowVerticalLines(this.__gridShowVerticalLines??this.getAttributeDefaultValueInternal("GridShowVerticalLines"))))}else this.__lineChart.deleteGrid();this.__lineChart.setHasChanged(!0),this.__lineChart.draw()}}setGridBackgroundColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew)??this.getAttributeDefaultValueInternal("GridBackgroundColor"),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,TcHmiTrendLineChart.#tchmiFQN,{Attribute:"GridBackgroundColor"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getGridBackgroundColor(){return this.__gridBackgroundColor}__processGridBackgroundColor(){if(this.__lineChart){let grid=this.__lineChart.getGrid();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)??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(this.__lineChart){let grid=this.__lineChart.getGrid();grid&&(grid.setShowHorizontalLines(this.__gridShowHorizontalLines??this.getAttributeDefaultValueInternal("GridShowHorizontalLines")),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setGridShowVerticalLines(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew)??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(this.__lineChart){let grid=this.__lineChart.getGrid();grid&&(grid.setShowVerticalLines(this.__gridShowVerticalLines??this.getAttributeDefaultValueInternal("GridShowVerticalLines")),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setGridLineWidth(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew)??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(this.__lineChart){let grid=this.__lineChart.getGrid();grid&&(grid.setLineWidth(this.__gridLineWidth??this.getAttributeDefaultValueInternal("GridLineWidth")),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setGridLineStyle(valueNew){let convertedValue=TcHmi.ValueConverter.toString(valueNew)??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(this.__lineChart){let grid=this.__lineChart.getGrid();grid&&(grid.setLineStyle(this.__gridLineStyle??this.getAttributeDefaultValueInternal("GridLineStyle")),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setGridLineColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew)??this.getAttributeDefaultValueInternal("GridLineColor"),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,TcHmiTrendLineChart.#tchmiFQN,{Attribute:"GridLineColor"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getGridLineColor(){return this.__gridLineColor}__processGridLineColor(){if(this.__lineChart){let grid=this.__lineChart.getGrid();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)??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(this.__lineChart){let subgrid=this.__lineChart.getSubgrid();subgrid&&(subgrid.setShowHorizontalLines(this.__subgridShowHorizontalLines??this.getAttributeDefaultValueInternal("SubgridShowHorizontalLines")),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setSubgridShowVerticalLines(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew)??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(this.__lineChart){let subgrid=this.__lineChart.getSubgrid();subgrid&&(subgrid.setShowVerticalLines(this.__subgridShowVerticalLines??this.getAttributeDefaultValueInternal("SubgridShowVerticalLines")),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setSubgridLineWidth(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew)??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(this.__lineChart){let subgrid=this.__lineChart.getSubgrid();subgrid&&(subgrid.setLineWidth(this.__subgridLineWidth??this.getAttributeDefaultValueInternal("SubgridLineWidth")),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setSubgridLineStyle(valueNew){let convertedValue=TcHmi.ValueConverter.toString(valueNew)??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(this.__lineChart){let subgrid=this.__lineChart.getSubgrid();subgrid&&(subgrid.setLineStyle(this.__subgridLineStyle??this.getAttributeDefaultValueInternal("SubgridLineStyle")),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}setSubgridLineColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew)??this.getAttributeDefaultValueInternal("SubgridLineColor"),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,TcHmiTrendLineChart.#tchmiFQN,{Attribute:"SubgridLineColor"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getSubgridLineColor(){return this.__subgridLineColor}__processSubgridLineColor(){if(this.__lineChart){let subgrid=this.__lineChart.getSubgrid();subgrid&&(TcHmi.isSolidColor(this.__subgridLineColor)?subgrid.setLineColor(TcHmi.StyleProvider.resolveSolidColorAsCssValue(this.__subgridLineColor)):subgrid.setLineColor(null),this.__lineChart.setHasChanged(!0),this.__lineChart.draw())}}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.__showMenuBar&&void 0!==this.__menuBarPosition?this.__elementMenuBar[0].style.display="flex":this.__elementMenuBar[0].style.display="none",this.setSectionsPositions(),"First"!==this.__internalStart&&"Latest"!==this.__internalEnd?this.__menubar?.setMenubarButtonsEnabled({startCombobox:!0,startTimespanPicker:!0,startTimespanButton:!0,startDateTimePicker:!0,startDateTimeButton:!0,endCombobox:!0,endTimespanPicker:!0,endTimespanButton:!0,endDateTimePicker:!0,endDateTimeButton:!0,resetButton:"First"===this.__start||"Latest"===this.__end,stopButton:!1,panXToggleButton:!0,panXYToggleButton:!0,zoomXToggleButton:!0,zoomXYToggleButton:!0,resetZoomButton:!0,settingsButton:!0,showStatisticalDataToggleButton:!0,optionsButton:!0}):this.__menubar?.setMenubarButtonsEnabled({startCombobox:!0,startTimespanPicker:!0,startTimespanButton:!0,startDateTimePicker:!0,startDateTimeButton:!0,endCombobox:!0,endTimespanPicker:!0,endTimespanButton:!0,endDateTimePicker:!0,endDateTimeButton:!0,resetButton:!1,stopButton:!0,panXToggleButton:!1,panXYToggleButton:!1,zoomXToggleButton:!1,zoomXYToggleButton:!1,resetZoomButton:!1,settingsButton:!0,showStatisticalDataToggleButton:!0,optionsButton:!0}),this.__menubar?.calcMenuButtons(),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()}}setMenuBarLabelFontSize(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew)??this.getAttributeDefaultValueInternal("MenuBarLabelFontSize");convertedValue!==this.__menuBarLabelFontSize&&(this.__menuBarLabelFontSize=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"MenuBarLabelFontSize"}),this.__processMenuBarLabelFontSize())}getMenuBarLabelFontSize(){return this.__menuBarLabelFontSize}__processMenuBarLabelFontSize(calcButtons=!0){TcHmi.StyleProvider.processFontSize(this.__elementMenuBar[0].getElementsByTagName("label"),this.__menuBarLabelFontSize,"px"),this.__isAttached&&calcButtons&&this.__menubar?.calcMenuButtons()}setMenuBarLabelFontSizeUnit(valueNew){}getMenuBarLabelFontSizeUnit(){return"px"}setMenuBarLabelFontFamily(valueNew){let convertedValue=TcHmi.ValueConverter.toFontFamily(valueNew)??this.getAttributeDefaultValueInternal("MenuBarLabelFontFamily");convertedValue!==this.__menuBarLabelFontFamily&&(this.__menuBarLabelFontFamily=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"MenuBarLabelFontFamily"}),this.__processMenuBarLabelFontFamily())}getMenuBarLabelFontFamily(){return this.__menuBarLabelFontFamily}__processMenuBarLabelFontFamily(calcButtons=!0){TcHmi.StyleProvider.processFontFamily(this.__elementMenuBar[0].getElementsByTagName("label"),this.__menuBarLabelFontFamily??this.getAttributeDefaultValueInternal("MenuBarLabelFontFamily")),this.__isAttached&&calcButtons&&this.__menubar?.calcMenuButtons()}setMenuBarLabelFontStyle(valueNew){let convertedValue=TcHmi.ValueConverter.toFontStyle(valueNew)??this.getAttributeDefaultValueInternal("MenuBarLabelFontStyle");convertedValue!==this.__menuBarLabelFontStyle&&(this.__menuBarLabelFontStyle=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"MenuBarLabelFontStyle"}),this.__processMenuBarLabelFontStyle())}getMenuBarLabelFontStyle(){return this.__menuBarLabelFontStyle}__processMenuBarLabelFontStyle(calcButtons=!0){TcHmi.StyleProvider.processFontStyle(this.__elementMenuBar[0].getElementsByTagName("label"),this.__menuBarLabelFontStyle??this.getAttributeDefaultValueInternal("MenuBarLabelFontStyle")),this.__isAttached&&calcButtons&&this.__menubar?.calcMenuButtons()}setMenuBarLabelFontWeight(valueNew){let convertedValue=TcHmi.ValueConverter.toFontWeight(valueNew)??this.getAttributeDefaultValueInternal("MenuBarLabelFontWeight");convertedValue!==this.__menuBarLabelFontWeight&&(this.__menuBarLabelFontWeight=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"MenuBarLabelFontWeight"}),this.__processMenuBarLabelFontWeight())}getMenuBarLabelFontWeight(){return this.__menuBarLabelFontWeight}__processMenuBarLabelFontWeight(calcButtons=!0){TcHmi.StyleProvider.processFontWeight(this.__elementMenuBar[0].getElementsByTagName("label"),this.__menuBarLabelFontWeight??this.getAttributeDefaultValueInternal("MenuBarLabelFontWeight")),this.__isAttached&&calcButtons&&this.__menubar?.calcMenuButtons()}setMenuBarLabelFontColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew)??this.getAttributeDefaultValueInternal("MenuBarLabelFontColor"),resolverInfo=this.__objectResolvers.get("menuBarLabelFontColor");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("MenuBarLabelFontColor")?.type});this.__objectResolvers.set("menuBarLabelFontColor",{resolver,watchCallback:this.__onResolverForMenuBarLabelFontColorWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForMenuBarLabelFontColorWatchCallback)})}__onResolverForMenuBarLabelFontColorWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("menuBarLabelFontColor"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__menuBarLabelFontColor)||(this.__menuBarLabelFontColor=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"MenuBarLabelFontColor"}),this.__processMenuBarLabelFontColor()):TcHmi.Log.Controls.error(this,TcHmiTrendLineChart.#tchmiFQN,{Attribute:"MenuBarLabelFontColor"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getMenuBarLabelFontColor(){return this.__menuBarLabelFontColor}__processMenuBarLabelFontColor(calcButtons=!0){TcHmi.StyleProvider.processTextColor(this.__elementMenuBar[0].getElementsByTagName("label"),this.__menuBarLabelFontColor??this.getAttributeDefaultValueInternal("MenuBarLabelFontColor")),this.__isAttached&&calcButtons&&this.__menubar?.calcMenuButtons()}setShowTooltip(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew)??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)??this.getAttributeDefaultValueInternal("TooltipFormat"),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,TcHmiTrendLineChart.#tchmiFQN,{Attribute:"TooltipFormat"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getTooltipFormat(){return this.__tooltipFormat}__processTooltipFormat(){if(this.__tooltipInformation.show){let tooltipFormat=this.__executeTooltipFormatFunction(this.__tooltipInformation.time,this.__tooltipInformation.points,this.__tooltipInformation.errors);null!==tooltipFormat?this.__elementTooltipText[0].innerHTML=tooltipFormat:this.__elementTooltip.css("visibility","hidden")}}__executeTooltipFormatFunction(time,points,errors){if(this.__tooltipFormat&&!1!==this.__tooltipFormat.active){const args=[time,points,errors];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,TcHmiTrendLineChart.#tchmiFQN,`Execution of function=${this.__tooltipFormat?.fn} failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}),f.destroy(),res;TcHmi.Log.Controls.error(this,TcHmiTrendLineChart.#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.`)}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();if(points.length>0){let tableTime=document.createElement("table");tableTime.classList.add("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-tooltip-time-table"),tableTime.setAttribute("border","1");let actDateTime=new Date(points[0].point.x),dateString=TcHmi.Localization.formatDate(actDateTime),timeRow=tableTime.insertRow();timeRow.insertCell().textContent="Capture time",timeRow.insertCell().textContent=dateString;let headerRow=header.insertRow();headerRow.appendChild(document.createElement("th")).textContent="Symbol",headerRow.appendChild(document.createElement("th")).textContent="Value";let row=body.insertRow();return row.insertCell().appendChild(document.createTextNode(points[0].symbolname)),row.insertCell().appendChild(document.createTextNode(points[0].point.y.toString())),tableTime.outerHTML+table.outerHTML}if(errors.length>0){let tableTime=document.createElement("table");tableTime.classList.add("TcHmi_Controls_Beckhoff_TcHmiTrendLineChart-template-tooltip-time-table"),tableTime.setAttribute("border","1");let actDateTime=new Date(time),dateString=TcHmi.Localization.formatDate(actDateTime),timeRow=tableTime.insertRow();timeRow.insertCell().textContent="Time",timeRow.insertCell().textContent=dateString,header.insertRow().appendChild(document.createElement("th")).textContent="Symbol(s) in error";for(let j=0,jj=errors.length;j<jj;j++){body.insertRow().insertCell().append(errors[j].symbolname)}return tableTime.outerHTML+table.outerHTML}return""}__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,TcHmiTrendLineChart.#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,TcHmiTrendLineChart.#tchmiFQN,{Attribute:"Data"},"Execution of function="+format.fn+" failed with error: "+TcHmi.Log.buildMessage(data.details))}),f.destroy(),res}}}return null!=value?value+"":""}setTooltipFontFamily(valueNew){let convertedValue=TcHmi.ValueConverter.toFontFamily(valueNew)??this.getAttributeDefaultValueInternal("TooltipFontFamily");convertedValue!==this.__tooltipFontFamily&&(this.__tooltipFontFamily=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TooltipFontFamily"}),this.__processTooltipFontFamily())}getTooltipFontFamily(){return this.__tooltipFontFamily}__processTooltipFontFamily(){this.__elementTooltip[0].style.fontFamily=this.__tooltipFontFamily??""}setTooltipFontSize(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew)??this.getAttributeDefaultValueInternal("TooltipFontSize");convertedValue!==this.__tooltipFontSize&&(this.__tooltipFontSize=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TooltipFontSize"}),this.__processTooltipFontSize())}getTooltipFontSize(){return this.__tooltipFontSize}__processTooltipFontSize(){this.__tooltipFontSize&&(this.__elementTooltip[0].style.fontSize=this.__tooltipFontSize+"px")}setTooltipFontSizeUnit(valueNew){}getTooltipFontSizeUnit(){return"px"}setTooltipFontWeight(valueNew){let convertedValue=TcHmi.ValueConverter.toFontWeight(valueNew)??this.getAttributeDefaultValueInternal("TooltipFontWeight");convertedValue!==this.__tooltipFontWeight&&(this.__tooltipFontWeight=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TooltipFontWeight"}),this.__processTooltipFontWeight())}getTooltipFontWeight(){return this.__tooltipFontWeight}__processTooltipFontWeight(){this.__elementTooltip[0].style.fontWeight=this.__tooltipFontWeight??""}setTooltipFontColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew)??this.getAttributeDefaultValueInternal("TooltipFontColor"),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,TcHmiTrendLineChart.#tchmiFQN,{Attribute:"TooltipFontColor"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getTooltipFontColor(){return this.__tooltipFontColor}__processTooltipFontColor(){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))}TcHmi.isSolidColor(this.__tooltipFontColor)&&(lineColorGraph=TcHmi.StyleProvider.resolveSolidColorAsCssValue(this.__tooltipFontColor)),lineColorGraph&&this.__elementTooltipText.css("color",lineColorGraph)}setTooltipBackgroundColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew)??this.getAttributeDefaultValueInternal("TooltipBackgroundColor"),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,TcHmiTrendLineChart.#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)}setInterval(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew)??this.getAttributeDefaultValueInternal("Interval");convertedValue!==this.__interval&&(this.__interval=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"Interval"}),this.__processInterval())}getInterval(){return this.__interval}__processInterval(){this.__isAttached&&(this.__lineGraphDescriptionsInternal&&this.__lineGraphDescriptionsInternal.length>0&&null!==this.__subscriptionId?this.__openWebsocket():null!==this.__subscriptionId&&(TcHmi.Server.unsubscribeEx(this.__subscriptionId,{parallel:!0}),this.__subscriptionId=null))}setStart(valueNew){let convertedValue=TcHmi.ValueConverter.toString(valueNew)??this.getAttributeDefaultValueInternal("Start");null!==convertedValue&&(convertedValue="first"===convertedValue.toLowerCase()?"First":convertedValue.toUpperCase()),convertedValue!==this.__start&&(this.__start=convertedValue,null===this.__start?this.__startDatatype=null:Helper.isDatetime(this.__start)?this.__startDatatype=Datatype.Datetime:Helper.isKeyword(this.__start)?this.__startDatatype=Datatype.Keyword:this.__startDatatype=Datatype.Timespan,this.__start!==this.__internalStart&&(this.__internalStart=this.__start,"First"===this.__internalStart&&this.__internalEnd!==this.__end&&void 0!==this.__end&&(this.__internalEnd=this.__end)),TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"Start"}),this.__processStart())}getStart(){return this.__start}getActualStartTime(){return this.__actualStartTime?new Date(this.__actualStartTime).toISOString():null}__processStart(){if(this.__start&&(Helper.isDatetime(this.__start)?this.__menubar?.getMenubarControls()?.startCombobox.setText(this.__moveUtcToTimeZone(this.__start)):this.__menubar?.getMenubarControls()?.startCombobox.setText(this.__start)),this.__start&&this.__end&&"Latest"!==this.__end&&"First"!==this.__start&&(this.__startEndBeforeZoom={end:this.__end,start:this.__start}),this.__isAttached&&this.__start){let nowisValueChanged=this.__nowIsValueChanged;if(this.__nowIsValueChanged=!0,this.__startDatatype===Datatype.Datetime?(this.__menubar?.getMenubarControls()?.startTimespanPicker.setValue(null),this.__menubar?.getMenubarControls()?.startDateTimePicker.setValue(this.__start)):this.__startDatatype===Datatype.Timespan?(this.__menubar?.getMenubarControls()?.startTimespanPicker.setValue(this.__start),this.__menubar?.getMenubarControls()?.startDateTimePicker.setValue(null)):(this.__menubar?.getMenubarControls()?.startTimespanPicker.setValue(null),this.__menubar?.getMenubarControls()?.startDateTimePicker.setValue(null),this.__menubar?.getMenubarControls()?.startCombobox.setText(null),this.__menubar?.getMenubarControls()?.startCombobox.setSelectedIndex(0)),this.__nowIsValueChanged=nowisValueChanged,this.__lineGraphDescriptionsInternal&&this.__lineGraphDescriptionsInternal.length>0)return this.__createInternals(),void this.__openWebsocket()}this.__drawLineChart(),null!==this.__subscriptionId&&(TcHmi.Server.unsubscribeEx(this.__subscriptionId,{parallel:!0}),this.__subscriptionId=null)}setStartPresets(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew)??this.getAttributeDefaultValueInternal("StartPresets"),resolverInfo=this.__objectResolvers.get("startPresets");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("StartPresets")?.type});this.__objectResolvers.set("startPresets",{resolver,watchCallback:this.__onResolverForStartPresetsWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForStartPresetsWatchCallback)})}__onResolverForStartPresetsWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("startPresets"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__startPresets)||(this.__startPresets=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"StartPresets"}),this.__processStartPresets()):TcHmi.Log.Controls.error(this,TcHmiTrendLineChart.#tchmiFQN,{Attribute:"StartPresets"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getStartPresets(){return this.__startPresets}__processStartPresets(){this.__menubar?.updateSrcDataStart()}setEnd(valueNew){let convertedValue=TcHmi.ValueConverter.toString(valueNew)??this.getAttributeDefaultValueInternal("End");null!==convertedValue&&(convertedValue="latest"===convertedValue.toLowerCase()?"Latest":convertedValue.toUpperCase()),convertedValue!==this.__end&&(this.__end=convertedValue,null===this.__end?this.__endDatatype=null:Helper.isDatetime(this.__end)?this.__endDatatype=Datatype.Datetime:Helper.isKeyword(this.__end)?this.__endDatatype=Datatype.Keyword:this.__endDatatype=Datatype.Timespan,this.__end!==this.__internalEnd&&(this.__internalEnd=this.__end,"Latest"===this.__internalEnd&&this.__internalStart!==this.__start&&void 0!==this.__start&&(this.__internalStart=this.__start)),TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"End"}),this.__processEnd())}getEnd(){return this.__end}getActualEndTime(){return this.__actualEndTime?new Date(this.__actualEndTime).toISOString():null}setEndPresets(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew)??this.getAttributeDefaultValueInternal("EndPresets"),resolverInfo=this.__objectResolvers.get("endPresets");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("EndPresets")?.type});this.__objectResolvers.set("endPresets",{resolver,watchCallback:this.__onResolverForEndPresetsWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForEndPresetsWatchCallback)})}__onResolverForEndPresetsWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("endPresets"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__endPresets)||(this.__endPresets=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"EndPresets"}),this.__processEndPresets()):TcHmi.Log.Controls.error(this,TcHmiTrendLineChart.#tchmiFQN,{Attribute:"EndPresets"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getEndPresets(){return this.__endPresets}__processEndPresets(){this.__menubar?.updateSrcDataEnd()}__moveUtcToTimeZone(isoString){const dateSplitted=TcHmi.Localization.parseDate(new Date(isoString)),dateAsUtc=Date.UTC(dateSplitted.year,dateSplitted.month-1,dateSplitted.day,dateSplitted.hour,dateSplitted.minute,dateSplitted.second,dateSplitted.millisecond),date=new Date(isoString);return this.__utcOffset=date.valueOf()-dateAsUtc,dateSplitted.year+"-"+("0"+dateSplitted.month).slice(-2)+"-"+("0"+dateSplitted.day).slice(-2)+"T"+("0"+dateSplitted.hour).slice(-2)+":"+("0"+dateSplitted.minute).slice(-2)+":"+("0"+dateSplitted.second).slice(-2)+"."+("00"+dateSplitted.millisecond).slice(-3)}__moveTimeZoneToUtc(timeZoneIsoString){const dateAndTime=timeZoneIsoString.split("T");if(2!==dateAndTime.length)return null;const dateStrArr=dateAndTime[0].split("-");if(3!==dateStrArr.length)return null;const dateNum={};if(dateNum.year=TcHmi.Localization.parseInt(dateStrArr[0]),isNaN(dateNum.year))return null;if(dateNum.month=TcHmi.Localization.parseInt(dateStrArr[1]),isNaN(dateNum.month))return null;if(dateNum.day=TcHmi.Localization.parseInt(dateStrArr[2]),isNaN(dateNum.day))return null;const timeStrArr=dateAndTime[1].split(":");if(2===timeStrArr.length)timeStrArr[2]="0.0";else if(3!==timeStrArr.length)return null;if(dateNum.hour=TcHmi.Localization.parseInt(timeStrArr[0]),isNaN(dateNum.hour))return null;if(dateNum.minute=TcHmi.Localization.parseInt(timeStrArr[1]),isNaN(dateNum.minute))return null;const secStrArr=timeStrArr[2].split(".");if(1===secStrArr.length)secStrArr[1]="0";else if(2!==secStrArr.length)return null;if(dateNum.second=TcHmi.Localization.parseInt(secStrArr[0]),isNaN(dateNum.second))return null;if(dateNum.millisecond=TcHmi.Localization.parseInt(secStrArr[1]),isNaN(dateNum.millisecond))return null;const msInUtc=Date.UTC(dateNum.year,dateNum.month-1,dateNum.day,dateNum.hour,dateNum.minute,dateNum.second,dateNum.millisecond);return new Date(msInUtc+this.__utcOffset).toISOString()}__processEnd(){if(this.__end&&(Helper.isDatetime(this.__end)?this.__menubar?.getMenubarControls()?.endCombobox.setText(this.__moveUtcToTimeZone(this.__end)):this.__menubar?.getMenubarControls()?.endCombobox.setText(this.__end)),this.__start&&this.__end&&"Latest"!==this.__end&&"First"!==this.__start&&(this.__startEndBeforeZoom={end:this.__end,start:this.__start}),this.__isAttached&&this.__end){let nowisValueChanged=this.__nowIsValueChanged;if(this.__nowIsValueChanged=!0,this.__endDatatype===Datatype.Datetime?(this.__menubar?.getMenubarControls()?.endTimespanPicker.setValue(null),this.__menubar?.getMenubarControls()?.endDateTimePicker.setValue(this.__end)):this.__endDatatype===Datatype.Timespan?(this.__menubar?.getMenubarControls()?.endTimespanPicker.setValue(this.__end),this.__menubar?.getMenubarControls()?.endDateTimePicker.setValue(null)):(this.__menubar?.getMenubarControls()?.endTimespanPicker.setValue(null),this.__menubar?.getMenubarControls()?.endDateTimePicker.setValue(null),this.__menubar?.getMenubarControls()?.endCombobox.setText(null),this.__menubar?.getMenubarControls()?.endCombobox.setSelectedIndex(0)),this.__nowIsValueChanged=nowisValueChanged,this.__lineGraphDescriptionsInternal&&this.__lineGraphDescriptionsInternal.length>0)return this.__createInternals(),void this.__openWebsocket()}this.__drawLineChart(),null!==this.__subscriptionId&&(TcHmi.Server.unsubscribeEx(this.__subscriptionId,{parallel:!0}),this.__subscriptionId=null)}setReferenceLines(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew)??this.getAttributeDefaultValueInternal("ReferenceLines"),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,TcHmiTrendLineChart.#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),this.__lineChart&&this.__drawLineChart()}setReferenceLinesPosition(valueNew){let convertedValue=TcHmi.ValueConverter.toString(valueNew)??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&&this.__lineChart&&(this.__lineChart.remove(),this.__lineChart=null,this.__drawLineChart()):this.__drawLineChart()}getMenuBarElement(){return this.__elementMenuBar}getTemplateRootElement(){return this.__elementTemplateRoot}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)}setServerDomain(valueNew){let convertedValue=TcHmi.ValueConverter.toString(valueNew)??this.getAttributeDefaultValueInternal("ServerDomain");tchmi_equal(convertedValue,this.__serverDomain)||(this.__serverDomain=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ServerDomain"}),this.__processServerDomain())}getServerDomain(){return this.__serverDomain}__processServerDomain(){this.__getData()}getResolvedServerDomain(){return this.getServerDomain()??this.__intServerDomain}__processIsEnabled(){super.__processIsEnabled(),this.getIsEnabled()||this.__menubar?.removeElementFromTopMostLayer()}setShowLegend(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew)??this.getAttributeDefaultValueInternal("ShowLegend");convertedValue!==this.__showLegend&&(this.__showLegend=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ShowLegend"}),this.__processShowLegend())}getShowLegend(){return this.__showLegend}__processShowLegend(openWebsocket=!0){this.__attributesInitialized&&!this.__manipulationInfo.isStopped&&(this.__createInternals(),this.__createLegend(),this.setSectionsPositions(),this.__lineGraphDescriptions&&0!==this.__lineGraphDescriptions.length&&!TCHMI_DESIGNER&&openWebsocket?this.__openWebsocket():this.__drawLineChart())}setLegendFontFamily(valueNew){let convertedValue=TcHmi.ValueConverter.toFontFamily(valueNew)??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_TcHmiTrendLineChart-template-legend-checkbox-label"),this.__legendFontFamily),this.__drawLineChart())}setLegendFontSize(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew)??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_TcHmiTrendLineChart-template-legend-checkbox-label"),this.__legendFontSize,"px"),this.__drawLineChart())}getLegendFontSizeUnit(){return"px"}setLegendFontStyle(valueNew){let convertedValue=TcHmi.ValueConverter.toFontStyle(valueNew)??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_TcHmiTrendLineChart-template-legend-checkbox-label"),this.__legendFontStyle),this.__drawLineChart())}setLegendFontWeight(valueNew){let convertedValue=TcHmi.ValueConverter.toFontWeight(valueNew)??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_TcHmiTrendLineChart-template-legend-checkbox-label"),this.__legendFontWeight),this.__drawLineChart())}setShowStatisticalData(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew)??this.getAttributeDefaultValueInternal("ShowStatisticalData");convertedValue!==this.__showStatisticalData&&(this.__showStatisticalData=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ShowStatisticalData"}),this.__processShowStatisticalData())}getShowStatisticalData(){return this.__showStatisticalData}__processShowStatisticalData(){this.__isAttached&&!TCHMI_DESIGNER?(this.setSectionsPositions(),this.__getData()):this.__isAttached&&(this.setSectionsPositions(),this.__drawLineChart()),this.__menubar?.setStatisticalDataToggleButtonToggleState(this.__showStatisticalData||!1)}setStatisticalDataConfiguration(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew)??this.getAttributeDefaultValueInternal("StatisticalDataConfiguration"),resolverInfo=this.__objectResolvers.get("statisticalDataConfiguration");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("StatisticalDataConfiguration")?.type});this.__objectResolvers.set("statisticalDataConfiguration",{resolver,watchCallback:this.__onResolverForStatisticalDataConfigurationWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForStatisticalDataConfigurationWatchCallback)})}__onResolverForStatisticalDataConfigurationWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("statisticalDataConfiguration"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__statisticalDataConfiguration)||(this.__statisticalDataConfiguration=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"StatisticalDataConfiguration"}),this.__processStatisticalDataConfiguration()):TcHmi.Log.Controls.error(this,TcHmiTrendLineChart.#tchmiFQN,{Attribute:"StatisticalDataConfiguration"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getStatisticalDataConfiguration(){return this.__statisticalDataConfiguration}__processStatisticalDataConfiguration(){if(this.__isAttached){let analyticsType=[],srcColumns=[this.__statisticalDataSrcColumn.symbol];(this.__statisticalDataConfiguration&&this.__statisticalDataConfiguration.minimum&&this.__statisticalDataConfiguration.minimum.showColumn||!this.__statisticalDataConfiguration||this.__statisticalDataConfiguration&&!this.__statisticalDataConfiguration.minimum)&&(analyticsType.push("minimum"),srcColumns.push(this.__statisticalDataSrcColumn.min)),(this.__statisticalDataConfiguration&&this.__statisticalDataConfiguration.maximum&&this.__statisticalDataConfiguration.maximum.showColumn||!this.__statisticalDataConfiguration||this.__statisticalDataConfiguration&&!this.__statisticalDataConfiguration.maximum)&&(analyticsType.push("maximum"),srcColumns.push(this.__statisticalDataSrcColumn.max)),(this.__statisticalDataConfiguration&&this.__statisticalDataConfiguration.average&&this.__statisticalDataConfiguration.average.showColumn||!this.__statisticalDataConfiguration||this.__statisticalDataConfiguration&&!this.__statisticalDataConfiguration.average)&&(analyticsType.push("average"),srcColumns.push(this.__statisticalDataSrcColumn.average)),this.__analyticsType=analyticsType,this.__statisticalDataDatagrid?.setSrcColumn(srcColumns),TCHMI_DESIGNER||this.__getData()}}static MouseMode=MouseMode;static MenuBarPosition=MenuBarPosition;static Datatype=Datatype;static Position=Position;static LineStyle=LineStyle;static AxisLabeling=AxisLabeling;static Orientation=Orientation;static FillMode=FillMode;static ValueUnit=ValueUnit}})();TcHmi.Controls.registerEx("TcHmiTrendLineChart","TcHmi.Controls.Beckhoff",TcHmiTrendLineChart,{injectInGlobalObject:!0});export{TcHmiTrendLineChart as Control};