//TH-Header //***************************************************************************************** // Copyright (c) 2022 Antwise Solutions // All rights reserved. // // $FileName : SyncFusion\AppSrc\csfWebChartDataLabel.pkg // $ProjectName : SyncFusion Library // $Authors : Wil van Antwerpen // $Created : 2022-12-30 15:50 // // Contents: // This is used for determining how the label looks like in the chart // // Documentation for the API is here: // https://ej2.syncfusion.com/documentation/api/chart/dataLabelSettings/ // // Examples: // https://ej2.syncfusion.com/javascript/documentation/chart/data-labels/ // // //***************************************************************************************** //TH-RevisionStart // ******************** // MODIFICATION SUMMARY // ******************** // ####### DD/MM/YYYY WHO COMMENT //TH-RevisionEnd Use csfWebChartChild.pkg // https://ej2.syncfusion.com/documentation/api/chart/dataLabelSettingsModel/ Struct tsfWebChartDataLabelSettings String sAlignment Integer iAngle tsfWebChartBorderModel border Boolean bEnableRotation String sFill //tsfWebChartFontModel Font String sFormat String sLabelIntersectAction //tsfWebChartMarginModel Margin String sName Number nOpacity String sPosition //Number nRx //Number nRy Boolean bShowZero String sTemplate Boolean bVisible End_Struct { OverrideProperty=pbFillHeight Visibility=Private } { OverrideProperty=Auto_Fill_State Visibility=Private } { OverrideProperty=pbClearAfterSave Visibility=Private } { DesignerJSClass=df.WebObject } Class csfWebChartDataLabel Is a csfWebChartChild Procedure Construct_Object Forward Send Construct_Object // Specifies the alignment for data Label. They are, // // Near: Aligns the label to the left of the point. // Center: Aligns the label to the center of the point. // Far: Aligns the label to the right of the point. // // Defaults to "Center" { EnumList="Near, Center, Far" } { InitialValue="Center" } { WebProperty=Client } Property String psAlignment "Center" // Specifies angle for data label. // Defaults to 0 { WebProperty=Client } Property Integer piAngle 0 // Options to customizing the border of the series. // This is applicable only for Column and Bar type series. // { WebProperty=Client } Property String psBorderColor "" // Set the width in pixels. If the width is -1 (C_WebDefault) then it will // use the default. { WebProperty=Client } Property Integer piBorderWidth C_WebDefault // Enables rotation for data label. // Defaults to false { WebProperty=Client } Property Boolean pbEnableRotation False // The background color of the data label accepts value in hex and rgba as a valid CSS color string. // Defaults to "transparent" { WebProperty=Client } Property String psFill "" // Used to format the point data label that accepts any global string format like "C", "n1", "P" etc. // It also accepts placeholder like "{value}°C" in which value represent the point data label, e.g, 20°C. // Defaults to "" { WebProperty=Client } Property String psFormat "" // Show Datalabel Even two Data Labels Are Overflow // Defaults to "Hide" { WebProperty=Client } Property String psLabelIntersectAction "" // The DataSource field that contains the data label value. // Default is "" { WebProperty=Client } Property String psName "" // The opacity for the background. // Set the opacity in a value between 0.0 and 1.0. If the width is -1 (C_WebDefault) then it will // use the default of 1.0 { WebProperty=Client } Property Number pnOpacity C_WebDefault // Specifies the position of the data label. They are, // // "Outer": Positions the label outside the point. // "Top": Positions the label on top of the point. // "Bottom": Positions the label at the bottom of the point. // "Middle": Positions the label to the middle of the point. // "Auto": Positions the label based on series. // // Defaults to "Auto" { EnumList="Outer, Top, Bottom, Middle, Auto" } { InitialValue="Auto" } { WebProperty=Client } Property String psPosition "Auto" // If set true, data label for zero values in series renders. // Defaults to true { WebProperty=Client } Property Boolean pbShowZero True // Custom template to show the data label. // Use ${point.x} and ${point.y} as a placeholder text to display the corresponding data point. // Defaults to "" { WebProperty=Client } Property String psTemplate "" // If set true, data label for series renders. // Defaults to false { WebProperty=Client } Property Boolean pbVisible False // We set this to false, so we can detect if a DAW webcolumn was dropped // as it will have this set to true. Property Boolean pbIsWebColumn False // Set psJSClass To "sf.WebChartDataLabel" End_Procedure Function LoadWebChartDataLabelProperties Returns tsfWebChartDataLabelSettings tsfWebChartDataLabelSettings DataLabel Get psAlignment To DataLabel.sAlignment Get piAngle To DataLabel.iAngle Get psBorderColor To DataLabel.border.sColor Get piBorderWidth To DataLabel.border.iWidth Get pbEnableRotation To DataLabel.bEnableRotation Get psFill To DataLabel.sFill Get psFormat To DataLabel.sFormat Get psLabelIntersectAction To DataLabel.sLabelIntersectAction Get psName To DataLabel.sName Get pnOpacity To DataLabel.nOpacity Get psPosition To DataLabel.sPosition Get pbShowZero To DataLabel.bShowZero Get psTemplate To DataLabel.sTemplate Get pbVisible To DataLabel.bVisible Function_Return DataLabel End_Function Procedure ConnectDataLabel String[] aParams Send ClientAction "connectDataLabel" aParams End_Procedure Procedure End_Construct_Object Forward Send End_Construct_Object Delegate Send RegisterDataLabelSettings Self End_Procedure End_Class