Difference between revisions of "Diagram 1"

From Catglobe Wiki
Jump to: navigation, search
Line 1: Line 1:
[[Image:Diagram_3.JPG]]  
+
[[Image:Diagram 3.JPG]]&nbsp;<span id="fck_dom_range_temp_1252565107133_175" /><span id="fck_dom_range_temp_1252565107133_224" />
  
 
The diagram above is a cross diagram which is made by crossing 2 axes together:<br>- The x-axis has 4 options: Custom Service, Product, Web site and Brand.<br>- The y-axis has 3 options: Same Quarter Last Year, Last Quarter and This Quarter. Calculations for these options are based on values stored in a custom column in the data cache. These values, which are calculated on corresponding values in the EndDate column, indicate whether an RPQ was finished in this quarter, last quarter, or the same quarter last year.  
 
The diagram above is a cross diagram which is made by crossing 2 axes together:<br>- The x-axis has 4 options: Custom Service, Product, Web site and Brand.<br>- The y-axis has 3 options: Same Quarter Last Year, Last Quarter and This Quarter. Calculations for these options are based on values stored in a custom column in the data cache. These values, which are calculated on corresponding values in the EndDate column, indicate whether an RPQ was finished in this quarter, last quarter, or the same quarter last year.  
Line 5: Line 5:
 
= The following steps show you how to create the above diagram<br> =
 
= The following steps show you how to create the above diagram<br> =
  
'''<u>Step 1. </u>Create a new axis set in DCS list based on the EndDate column'''<br>&nbsp; '''1. Open the Data Cache in Data Cache list (Tools/ Data / Data Caches).<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [[Image:Dash 0.JPG]]&nbsp;'''  
+
'''<u>Step 1. </u>Create a new Time set in Time set list '''<br>&nbsp; '''1. Open the Time set list (Tools/ Administrator / Report/ Time sets).<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [[Image:Diagram 3 1.JPG]]&nbsp;'''  
  
'''<br>'''&nbsp;'''2. In the Data Cache tab:&nbsp;<br>'''&nbsp;&nbsp; '''2.1 Select Column’s type then click “Add Column” button to insert a new Custom column'''<br>
+
'''<br>'''&nbsp;'''2.&nbsp;Create a new Time set:&nbsp;<br>'''&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp; [[Image:Add custom.JPG]]  
 
 
&nbsp;&nbsp;&nbsp; [[Image:Add custom.JPG]]  
 
  
 
<br>
 
<br>
  
&nbsp;&nbsp;&nbsp;&nbsp; - The new Custom column is used to define the Quarter which this record is related to the current day in the system.&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Data type: Number <br>&nbsp;&nbsp;&nbsp;&nbsp; - Save numbers: 0,1,4 and null.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; 0: if the date of the EndDate column is in the same quarter of current date in the system.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1: if the date of the EndDate column is in the previous quarter of current date in the system.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4: if the date of the EndDate column is in the same quarter but in the last year of current date in the system.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Null: if the date of the EndDate column is in other quarters.<br>&nbsp;&nbsp; '''2.2 Put the CGScript which defines Current Quarter, Last Quarter and the Same Quarter Last Year'''
+
&nbsp;&nbsp;&nbsp;&nbsp; - The new&nbsp;Time set is used to define the&nbsp;period of time.&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Data type: Number <br>&nbsp;&nbsp;&nbsp;&nbsp; - Save numbers: 0,1,4 and null.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; 0: if the date of the EndDate column is in the same quarter of current date in the system.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1: if the date of the EndDate column is in the previous quarter of current date in the system.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4: if the date of the EndDate column is in the same quarter but in the last year of current date in the system.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Null: if the date of the EndDate column is in other quarters.<br>&nbsp;'''3.&nbsp;Save this time set'''&nbsp;&nbsp;  
 
 
&nbsp;&nbsp;&nbsp;&nbsp; [[Image:Insert script.JPG|692x230px]]&nbsp;
 
 
 
&nbsp;&nbsp; - Input Name of the Custom column, this name will be an option of the axis set.<br>&nbsp;&nbsp;&nbsp;- Insert the CGSript&nbsp;: &nbsp;
 
 
 
{| style="width: 577px; height: 24px" border="1" cellspacing="1" cellpadding="1" width="577"
 
|-
 
| // CGScript<br>&nbsp;array a = DateTime_parse(EndDate, "MM/dd/yyyy");
 
array today = getDateTime(); // get the current date
 
 
 
number todayYear = today[DateTime_Year]; // get the year of the current date
 
 
 
number todayMonth = today[DateTime_Month]; // get the month of the current date
 
 
 
number TodayQuarter = 1; // save the quarter which the current date related to
 
 
 
number endDateQuarter = 1; // save the quarter which the day in the EndDate column related to
 
 
 
number IsLastQuarter = 1;
 
 
 
number IsThisQuarter = 0;
 
 
 
number IsSameQuarterLastYear = 4;
 
 
 
if (todayMonth == 1 &#124;&#124; todayMonth == 2 &#124;&#124; todayMonth == 3)
 
 
 
TodayQuarter = 1;
 
 
 
else if (todayMonth == 4 &#124;&#124; todayMonth == 5 &#124;&#124; todayMonth == 6)
 
 
 
TodayQuarter = 2;
 
 
 
else if (todayMonth == 7 &#124;&#124; todayMonth == 8 &#124;&#124; todayMonth == 9)
 
 
 
TodayQuarter = 3;
 
 
 
else TodayQuarter = 4;
 
 
 
if ( a[1] == 1 &#124;&#124;&nbsp;a[1] == 2 &#124;&#124;&nbsp;a[1] == 3)
 
 
 
endDateQuarter = 1;
 
 
 
else if ( a[1] == 4 &#124;&#124;&nbsp;a[1] == 5 &#124;&#124;&nbsp;a[1] ==&nbsp;6)
 
 
 
endDateQuarter = 2;
 
 
 
else if (a[1] == 7 &#124;&#124;&nbsp;a[1] == 8 &#124;&#124;&nbsp;a[1] == 9)
 
 
 
endDateQuarter = 3;
 
 
 
else endDateQuarter = 4;
 
 
 
if (a[0] == todayYear &amp;&amp; endDateQuarter == TodayQuarter)
 
 
 
return IsThisQuarter;
 
 
 
else if (a[0]== todayYear &amp;&amp; TodayQuarter - endDateQuarter == 1)
 
 
 
return IsLastQuarter;
 
 
 
else if (todayYear -&nbsp;a[0] == 1 &amp;&amp; endDateQuarter == TodayQuarter)
 
 
 
return IsSameQuarterLastYear;<br>//End Script
 
 
 
|}
 
 
 
<br>
 
 
 
&nbsp;&nbsp;&nbsp; - Save this Custom column.
 
 
 
&nbsp;'''3. Go to the Axis set tab: Create a new axis set&nbsp;'''<br>&nbsp;&nbsp; '''3.1 Create a new axis set'''&nbsp;
 
 
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [[Image:Create new axis.JPG]]
 
 
 
<br>
 
 
 
&nbsp;&nbsp; '''3.2 Input value to the new axis set'''
 
 
 
'''&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [[Image:Input value.JPG|493x247px]]'''
 
 
 
<span style="display: none" id="1251959714895S">&nbsp;</span>Axis math – base, Axis pct – base, Option value: will be used by the Custom column’s name.
 
 
 
For example:
 
 
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [[Image:Example.JPG|789x366px]]&nbsp;
 
 
 
&nbsp; '''4. Save the Data cache then Rebuild it'''
 
  
 
<u>'''Step 2.'''</u>'''Create Dashboard item whose type is Cross diagram<br>&nbsp;&nbsp;1. Go to Dashboard list''' (Tools/ Reports/ Dashboards).<br>'''&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [[Image:Dash 1.JPG]]'''  
 
<u>'''Step 2.'''</u>'''Create Dashboard item whose type is Cross diagram<br>&nbsp;&nbsp;1. Go to Dashboard list''' (Tools/ Reports/ Dashboards).<br>'''&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [[Image:Dash 1.JPG]]'''  
  
'''<br>&nbsp;2. Create a new dashboard or edit an existing one.'''&nbsp;<br>&nbsp;'''3. In General Information tab: '''Data caches list must be added the DCS which is created at Step 1.<br>&nbsp;'''4. Layout tab: '''Create Dashboard items<br>&nbsp;&nbsp;'''4.1 Create Dashboard (DB) item 1 whose type is Shown axis.&nbsp;<br>'''&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [[Image:Dash 2.JPG]]&nbsp;  
+
'''<br>&nbsp;2. Create a new dashboard or edit an existing one.'''&nbsp;<br>&nbsp;'''3. In General Information tab: '''Data caches list must be added the DCS which is&nbsp;used to make Cross diagram.<br>&nbsp;'''4. Layout tab: '''Create Dashboard items<br>&nbsp;&nbsp;'''4.1 Create Dashboard (DB) item 1 whose type is&nbsp;Time set.&nbsp;<br>'''&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [[Image:Dash 2.JPG]]&nbsp;  
  
<br>&nbsp;&nbsp;&nbsp;&nbsp; o Data cache: use the DCS which is created at step 1.<br>&nbsp;&nbsp;&nbsp;&nbsp; o This DB item will be used as the x-axis of the cross&nbsp;diagram&nbsp;that has 4 options&nbsp;: Custom Service, Product, Web site and Brand.&nbsp;
+
<br>&nbsp;&nbsp;&nbsp;&nbsp; o Data cache: use the DCS&nbsp;which is used to make Cross diagram.<br>&nbsp;&nbsp;&nbsp;&nbsp; o This DB item will be used as the x-axis of the cross&nbsp;diagram.  
  
 
<br>&nbsp;&nbsp; '''4.2 Create Dashboard (DB) item 2 whose type is Shown axis'''<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [[Image:Dash 2.JPG]]  
 
<br>&nbsp;&nbsp; '''4.2 Create Dashboard (DB) item 2 whose type is Shown axis'''<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [[Image:Dash 2.JPG]]  
  
<br>&nbsp;&nbsp;&nbsp;&nbsp; o Data cache&nbsp;: use the DCS which is created at step 1.<br>&nbsp;&nbsp; &nbsp; o This DB item will be&nbsp;used as the y-axis of the cross diagram that has 3 options&nbsp;: Same Quarter Last Year, Last Quarter and This Quarter.  
+
<br>&nbsp;&nbsp;&nbsp;&nbsp; o Data cache&nbsp;: use the DCS which is&nbsp;used to make Cross diagram.
 +
 
 +
&nbsp;&nbsp;&nbsp;&nbsp; o This DB item will be&nbsp;used as the y-axis of the cross diagram.
  
 
<br>&nbsp;'''&nbsp; 4.3 Create Dashboard (DB) item 3 whose type is Cross diagram'''<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;[[Image:Dash 3.JPG]]  
 
<br>&nbsp;'''&nbsp; 4.3 Create Dashboard (DB) item 3 whose type is Cross diagram'''<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;[[Image:Dash 3.JPG]]  
  
<br>&nbsp;&nbsp;&nbsp;&nbsp; o Data cache: use the DCS which is created at step 1.<br>&nbsp;&nbsp;&nbsp;&nbsp; o Chart type: Bar<br>&nbsp;&nbsp;&nbsp;&nbsp; o X – axis: must be DB item 4.1<br>&nbsp;&nbsp;&nbsp;&nbsp; o Y – axis: must be DB item 4.2<br>&nbsp; &nbsp;&nbsp; o Style sheet: choose a style sheet which is created in the Style sheet list.<br>&nbsp; &nbsp;&nbsp; o Data format: absolute<br>&nbsp; &nbsp;&nbsp; o Direction: Vertical<br>'''&nbsp;5. Insert these Dashboard items to the HTML editor then save the Dashboard.'''  
+
<br>&nbsp;&nbsp;&nbsp;&nbsp; o Data cache: use the DCS which is&nbsp;used to make diagram.
 +
 
 +
&nbsp;&nbsp;&nbsp;&nbsp; o Chart type:&nbsp;Line<br>&nbsp;&nbsp;&nbsp;&nbsp; o X – axis: must be DB item 4.1<br>&nbsp;&nbsp;&nbsp;&nbsp; o Y – axis: must be DB item 4.2<br>&nbsp; &nbsp;&nbsp; o Style sheet: choose a style sheet which is created in the Style sheet list.<br>&nbsp; &nbsp;&nbsp; o Data format: absolute<br>&nbsp; &nbsp;&nbsp; o Direction: Vertical<br>'''&nbsp;5. Insert these Dashboard items to the HTML editor then save the Dashboard.'''  
  
 
<br>
 
<br>
  
 
// Finish creating the diagram.
 
// Finish creating the diagram.

Revision as of 07:45, 10 September 2009

Diagram 3.JPG 

The diagram above is a cross diagram which is made by crossing 2 axes together:
- The x-axis has 4 options: Custom Service, Product, Web site and Brand.
- The y-axis has 3 options: Same Quarter Last Year, Last Quarter and This Quarter. Calculations for these options are based on values stored in a custom column in the data cache. These values, which are calculated on corresponding values in the EndDate column, indicate whether an RPQ was finished in this quarter, last quarter, or the same quarter last year.

The following steps show you how to create the above diagram

Step 1. Create a new Time set in Time set list
  1. Open the Time set list (Tools/ Administrator / Report/ Time sets).

      Diagram 3 1.JPG 


 2. Create a new Time set: 
   
    Add custom.JPG


     - The new Time set is used to define the period of time. 
     - Data type: Number
     - Save numbers: 0,1,4 and null.
        0: if the date of the EndDate column is in the same quarter of current date in the system.
        1: if the date of the EndDate column is in the previous quarter of current date in the system.
        4: if the date of the EndDate column is in the same quarter but in the last year of current date in the system.
        Null: if the date of the EndDate column is in other quarters.
 3. Save this time set  

Step 2.Create Dashboard item whose type is Cross diagram
  1. Go to Dashboard list
(Tools/ Reports/ Dashboards).
        Dash 1.JPG


 2. Create a new dashboard or edit an existing one.
 
 3. In General Information tab: Data caches list must be added the DCS which is used to make Cross diagram.
 4. Layout tab: Create Dashboard items
  4.1 Create Dashboard (DB) item 1 whose type is Time set. 
          Dash 2.JPG 


     o Data cache: use the DCS which is used to make Cross diagram.
     o This DB item will be used as the x-axis of the cross diagram.


   4.2 Create Dashboard (DB) item 2 whose type is Shown axis
          Dash 2.JPG


     o Data cache : use the DCS which is used to make Cross diagram.

     o This DB item will be used as the y-axis of the cross diagram.


   4.3 Create Dashboard (DB) item 3 whose type is Cross diagram
         Dash 3.JPG


     o Data cache: use the DCS which is used to make diagram.

     o Chart type: Line
     o X – axis: must be DB item 4.1
     o Y – axis: must be DB item 4.2
     o Style sheet: choose a style sheet which is created in the Style sheet list.
     o Data format: absolute
     o Direction: Vertical
 5. Insert these Dashboard items to the HTML editor then save the Dashboard.


// Finish creating the diagram.