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...") |
|||
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"> | ||
+ | //*** 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]] |
Revision as of 05:31, 12 May 2022
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
//*** 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);