Difference between revisions of "TabulationDiagramStyle class"
(Created page with "{{CGscriptClass_Template |Name=<nowiki>TabulationDiagramStyle</nowiki> |Description=<nowiki>Represents a diagram style.</nowiki> |InheritsFrom=object|Constructors= {{CGscriptC...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 15: | Line 15: | ||
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>Valign</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Vertical alignment (allows values Center, Top, Bottom).</nowiki>}} | {{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>Valign</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Vertical alignment (allows values Center, Top, Bottom).</nowiki>}} | ||
}} | }} | ||
+ | === <span style="color:#DF8621">'''Examples'''</span> === | ||
+ | <source lang="javascript"> | ||
+ | //Default value | ||
+ | TabulationDiagramStyle style = new TabulationDiagramStyle(); | ||
+ | print(style.Fill.Color.HtmlRgbHex);//#ffffff white | ||
+ | print(style.Fill.FillType);//2: Diagram_Fill_Style_SolidFill | ||
+ | print(style.Fill.Inherit);//false | ||
+ | print(style.Decimal);//1 | ||
+ | print(style.Text.FontFace);//Arial | ||
+ | print(style.Text.FontSize);//10 | ||
+ | print(style.Text.Color.HtmlRgbHex);//#000000 black | ||
+ | print(style.Text.Bold);//False | ||
+ | print(style.Text.Italic);//False | ||
+ | print(style.Text.Underline);//False | ||
+ | print(style.Text.IsInherit);//False | ||
+ | print(style.Valign);//Center | ||
+ | print(style.Halign) ;//Left | ||
+ | </source> | ||
+ | <source lang="javascript"> | ||
+ | //*** Set fillStyle, textStyle, Valign, Halign, border for ColumnHeaderLevel2 ***// | ||
+ | //*** Set decimal 2 for AbsoluteColumn***// | ||
+ | |||
+ | TabulationDiagramParameter p = new TabulationDiagramParameter(); | ||
+ | p.DataCacheId = 17116726; | ||
+ | TabulationDiagramStyle diagramStyle = new TabulationDiagramStyle(); | ||
+ | diagramStyle.Fill.Color = new Color ("yellow", false); | ||
+ | diagramStyle.Text.Color = new Color ("red", false); | ||
+ | diagramStyle.Text.FontFace = "Comic Sans MS"; | ||
+ | diagramStyle.Text.FontSize = 8; | ||
+ | diagramStyle.Text.Bold = true; | ||
+ | diagramStyle.Text.Italic = true; | ||
+ | diagramStyle.Text.Underline = true; | ||
+ | diagramStyle.Valign = "Top"; | ||
+ | diagramStyle.Halign = "Right"; | ||
+ | p.SetDiagramStyle(TableDiagram_ColumnHeaderLevel2, diagramStyle); | ||
+ | TabulationBorder border = new TabulationBorder ("All", 1, "Solid", new Color ("green", false)); | ||
+ | p.SetTableDiagramStyle(TableDiagram_ColumnHeaderLevel2, TABLE_DIAGRAM_STYLE_BORDER_STYLE, border); | ||
+ | diagramStyle.Decimal = 2; | ||
+ | p.SetTableDiagramStyle(TableDiagram_AbsoluteColumn, TABLE_DIAGRAM_STYLE_DECIMAL, diagramStyle.Decimal); | ||
+ | Tabulation t = new Tabulation (); | ||
+ | t.StyleSheet = new ReportStyleSheet(11060624); | ||
+ | t.CreateCrossDiagram({"Rit_3"}, {"VilStemme"}, p); | ||
+ | </source> | ||
+ | [[File:2022-05-12_11-27-03.jpg]] |
Latest revision as of 07:50, 22 September 2023
TabulationDiagramStyle
Represents a diagram style.
Parent class
Inherits from object
Constructors
- () - Create a default TabulationDiagramStyle
Methods
- (From object) string ToString() - The string representation of the object.
Properties
- int Decimal { get; set; } - Decimal place.
- TabulationFillStyle Fill { get; set; } - Fill style from TabulationFillStyle object.
- string Halign { get; set; } - Horizontal alignment (allows values Center, Left, Right).
- string ObjectTypeName { get; } - The name of the type of object.
- TabulationTextStyle Text { get; set; } - Font style from TabulationTextStyle object.
- (From object) TypeInformation TypeInformation { get; } - Get information about this class.
- string Valign { get; set; } - Vertical alignment (allows values Center, Top, Bottom).
Examples
//Default value
TabulationDiagramStyle style = new TabulationDiagramStyle();
print(style.Fill.Color.HtmlRgbHex);//#ffffff white
print(style.Fill.FillType);//2: Diagram_Fill_Style_SolidFill
print(style.Fill.Inherit);//false
print(style.Decimal);//1
print(style.Text.FontFace);//Arial
print(style.Text.FontSize);//10
print(style.Text.Color.HtmlRgbHex);//#000000 black
print(style.Text.Bold);//False
print(style.Text.Italic);//False
print(style.Text.Underline);//False
print(style.Text.IsInherit);//False
print(style.Valign);//Center
print(style.Halign) ;//Left
//*** Set fillStyle, textStyle, Valign, Halign, border for ColumnHeaderLevel2 ***//
//*** Set decimal 2 for AbsoluteColumn***//
TabulationDiagramParameter p = new TabulationDiagramParameter();
p.DataCacheId = 17116726;
TabulationDiagramStyle diagramStyle = new TabulationDiagramStyle();
diagramStyle.Fill.Color = new Color ("yellow", false);
diagramStyle.Text.Color = new Color ("red", false);
diagramStyle.Text.FontFace = "Comic Sans MS";
diagramStyle.Text.FontSize = 8;
diagramStyle.Text.Bold = true;
diagramStyle.Text.Italic = true;
diagramStyle.Text.Underline = true;
diagramStyle.Valign = "Top";
diagramStyle.Halign = "Right";
p.SetDiagramStyle(TableDiagram_ColumnHeaderLevel2, diagramStyle);
TabulationBorder border = new TabulationBorder ("All", 1, "Solid", new Color ("green", false));
p.SetTableDiagramStyle(TableDiagram_ColumnHeaderLevel2, TABLE_DIAGRAM_STYLE_BORDER_STYLE, border);
diagramStyle.Decimal = 2;
p.SetTableDiagramStyle(TableDiagram_AbsoluteColumn, TABLE_DIAGRAM_STYLE_DECIMAL, diagramStyle.Decimal);
Tabulation t = new Tabulation ();
t.StyleSheet = new ReportStyleSheet(11060624);
t.CreateCrossDiagram({"Rit_3"}, {"VilStemme"}, p);