Tabulation Script for setting inline style to Table Chart

From Catglobe Wiki
Revision as of 06:04, 21 July 2009 by Catglobe (talk | contribs) (First version, NOT COMPLETED)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Introduction

Customer sometimes need to highlight some fields in a table chart using CGScript, thus a couple of methods have been defined for this need. It's part of the Tabulation Script

StyleSheet Review

StyleSheet defines the layout of chart (both table and image charts). There are 2 kinds of stylesheets: external and internal. External stylesheet is stylesheet that is defined separately and can be reused through out many reports/diagrams. Inline stylesheet, in the other hand, is specific to a diagram only.

The order of applying stylesheet is as below:

  Report        Diagram            Diagram
    |      =>      |      =>          |  
StyleSheet     StyleSheet     Inline StyleSheet

The inline stylesheet is as a higher priority than the external one.

TableChart's CellTypes

Each cell in table chart must belong to at least a cell type. The full list of cell types is below:

   public enum StyleType
   {
      TableDiagram_AllTable,                      // All cell
      TableDiagram_ColumnHeader,                  // All column header
      TableDiagram_ColumnHeaderLevel1,            // Only column header level 1 
      TableDiagram_ColumnHeaderLevel2,            // Only column header level 2 
      TableDiagram_ColumnHeaderLevel3,            // Only column header level 3 
      TableDiagram_RowHeader,                     // All row header 
      TableDiagram_RowHeaderLevel1,               // Only row header level 1 
      TableDiagram_RowHeaderLevel2,               // Only row header level 2 
      TableDiagram_RowHeaderLevel3,               // Only row header level 3 
      TableDiagram_AbsoluteColumn,                // All cells of column that contains absolute value
      TableDiagram_AbsoluteColumnHeader,          // Column header cells of column that contains absolute value
      TableDiagram_AbsoluteColumnValue,           // Column data cells of column that contains absolute value
      TableDiagram_PercentageColumn,              // All cells of column that contains percentage value
      TableDiagram_PercentageColumnHeader,        // Column header cells of column that contains percentage value
      TableDiagram_PercentageColumnValue,         // Column data cells of column that contains percentage value 
      TableDiagram_TotalColumn,                   // All cells of column that contains total value
      TableDiagram_TotalColumnHeader,             // Column header cells of column that contains total value
      TableDiagram_TotalColumnValue,              // Column data cells of column that contains total value 
      TableDiagram_TotalRow,                      // All cells of row that contains total value 
      TableDiagram_TotalRowHeader,                // Row header cells of row that contains total value
      TableDiagram_TotalRowValue,                 // Row data cells of row that contains total value  
      TableDiagram_AnswerRow,                     // All cells that is on even rows
      TableDiagram_AnswerRowAlternate,            // All cells that is on odd rows
      TableDiagram_VarianceRow,                   // All cells of Variance row
      TableDiagram_VarianceRowHeader,             // Row header cells of Variance row
      TableDiagram_VarianceRowValue,              // Row data cells of Variance row 
      TableDiagram_AverageRow,
      TableDiagram_AverageRowHeader,
      TableDiagram_AverageRowValue,
      TableDiagram_StdDevRow,
      TableDiagram_StdDevRowHeader,
      TableDiagram_StdDevRowValue,
      TableDiagram_StdErrorRow,
      TableDiagram_StdErrorRowHeader,
      TableDiagram_StdErrorRowValue,
      TableDiagram_MedianRow,
      TableDiagram_MedianRowHeader,
      TableDiagram_MedianRowValue,
      TableDiagram_QuantilesRow,
      TableDiagram_QuantilesRowHeader,
      TableDiagram_QuantilesRowValue,
      TableDiagram_PercentileRow, 
      TableDiagram_PercentileRowHeader,
      TableDiagram_PercentileRowValue,
      TableDiagram_SignificanceRow,
      TableDiagram_SignificanceRowHeader, 
      TableDiagram_SignificanceRowValue,
      // You could add the other style types of other diaram types here.   
   }
  • TableDiagram_AllTable: all cells belong to this type


For example:





Document revisions

Version No. Date Changed By Description
0.1 21.07.2009 Nguyen Trung Chinh Create the first version for working with a single case of CDG