<?php


/*
<chart_pref line_thickness='int'     <!-- line chart preferences -->
            point_shape='string'     
            point_size='int'
            fill_shape='boolean'
            connect='boolean'
            tip='string'
                        
            type='string'            <!-- candlestick chart preferences -->
            line_thickness='int'
            bull_color='string'
            bear_color='string'
            
            point_size='int'         <!-- scatter chart preferences -->
            point_shape='string'
            trend_thickness='int'
            trend_alpha='int'
            line_thickness='int'
            
            rotation_x='int'         <!-- 3d charts preferences -->
            rotation_y='int'
            drag='boolean'
            min_x='int'    
            max_x='int'
            min_y='int'      
            max_y='int'
            
            type='string'            <!-- polar chart preferences -->
            grid='string'
            line_thickness='int'
            point_shape='string'
            point_size='int'
            fill_shape='boolean'
            
            select='boolean'         <!-- pie charts preferences -->

            stretch='boolean'        <!-- image chart preferences -->

            empty_center='boolean'   <!-- donut chart preferences -->
            select='boolean'            
            
            zero_line='boolean'      <!-- general preferences -->
            /> 
*/		

/*do not change the following variables */
	$dollar='$';
	$open_brace="{";
	$close_brace="}";
	
	
/* you can update the following template value. Any updates will be reflected for newly converted dashboards definition from rawuploaded directory	*/
/* please refer to the documentation to update any settings */
$template['general']=<<<EOD
	<chart_guide horizontal='true' vertical='true' thickness='1' color='000000' alpha='35' type='dashed' radius='3' fill_alpha='75' line_alpha='0' background_color='FF4400' text_h_alpha='90' text_v_alpha='90' prefix_h=' ' suffix_h=' ' suffix_v=' ' />
	<chart_label  color='000000' alpha='50' size='8' position='middle' as_percentage='true'/>  


	<chart_grid_h thickness='1' type='solid' />


	<series bar_gap='0' set_gap='20' transfer='false' />
	
	<axis_category alpha='75' orientation='diagonal_up' size='9'/>
	
	<axis_value  
         	prefix=''  
			suffix=''  
            decimals=''
            decimal_char=''  
            separator='' 
            show_min='true' 
            size='10' 
            alpha='75'
            orientation='diagonal_up' 
            />

 <legend layout='horizontal' 
           fill_color='F0EBE6'
           bullet='square'
           font='arial'
           bold='true'
           size='10'
 		   width='{$open_brace}{$dollar}qlet[#portlet_id#]['legend']['width']{$close_brace}'
		   height='{$open_brace}{$dollar}qlet[#portlet_id#]['legend']['height']{$close_brace}'
		   x='{$open_brace}{$dollar}qlet[#portlet_id#]['legend']['top_x']{$close_brace}'		   
		   y='{$open_brace}{$dollar}qlet[#portlet_id#]['legend']['top_y']{$close_brace}'
           alpha='90'
           />			
		   
<chart_rect x='{$open_brace}{$dollar}qlet[#portlet_id#]['chart_position']['top_x']{$close_brace}' 
            y='{$open_brace}{$dollar}qlet[#portlet_id#]['chart_position']['top_y']{$close_brace}' 
			width='{$open_brace}{$dollar}qlet[#portlet_id#]['chart_size']['width']{$close_brace}' 
			height='{$open_brace}{$dollar}qlet[#portlet_id#]['chart_size']['height']{$close_brace}' 
			positive_color='000000' positive_alpha='0' negative_color='ff0000' negative_alpha='0' />				   
  <draw>
   <text   size='15' x='0' y='0' width='{$open_brace}{$dollar}qlet[#portlet_id#]['width']{$close_brace}' height='20' h_align='center' v_align='top'>{$open_brace}{$dollar}qlet[#portlet_id#]['name']{$close_brace}</text>
  </draw> 		   
  
<chart_pref line_thickness='3'     
            point_shape='square'     
            point_size='7'
            fill_shape='false'
            connect='false'
            tip='none'
                        
            
            point_size='7'         
            point_shape='square'
            trend_thickness='3'
            trend_alpha='20'
            line_thickness='0'
            
            rotation_x='30'        
            rotation_y='30'
            drag='true'
    

            select='true'            
            
            zero_line='true'      
            />   
  
	<chart_type>#chart_type#</chart_type>

    	#chart_data#
		
		#link_data#
EOD;




$template['chart_column']=$template['general'];
$template['chart_3d column']=$template['general'];

$template['chart_pie']=<<<EOD

	<chart_label  size='10'  as_percentage='true'/>  
	
<chart_rect x='0' y='20' width='{$open_brace}{$dollar}qlet[#portlet_id#]['width']{$close_brace}' height='{$open_brace}{$dollar}percent({$dollar}qlet[#portlet_id#]['height']-20,65){$close_brace}' positive_color='000000' positive_alpha='0' negative_color='ff0000' negative_alpha='0' />		

 <legend layout='horizontal' 
           fill_color='F0EBE6'
           bullet='square'
           font='arial'
           bold='true'
           size='10'
		  width='{$open_brace}{$dollar}percent({$dollar}qlet[#portlet_id#]['width'],80){$close_brace}'
		  height='{$open_brace}{$dollar}percent({$dollar}qlet[#portlet_id#]['height']-20,35){$close_brace}'
		   y='{$open_brace}{$dollar}get_position({$dollar}qlet[#portlet_id#]['height'],20,35){$close_brace}'
           alpha='90'
           />			
		   
  <draw>
   <text   size='15' x='0' y='0' width='{$open_brace}{$dollar}qlet[#portlet_id#]['width']{$close_brace}' height='20' h_align='center' v_align='top'>{$open_brace}{$dollar}qlet[#portlet_id#]['name']{$close_brace}</text>
  </draw>
  
<chart_pref
        select='true'            
            />   
  
	<chart_type>#chart_type#</chart_type>

    	#chart_data#

EOD;

$template['chart_3d pie']=<<<EOD

	<chart_label  size='10'  as_percentage='true'/>  
	
<chart_rect x='0' y='20' width='{$open_brace}{$dollar}percent({$dollar}qlet[#portlet_id#]['width'],90){$close_brace}' height='{$open_brace}{$dollar}percent({$dollar}qlet[#portlet_id#]['height']-20,55){$close_brace}' positive_color='000000' positive_alpha='0' negative_color='ff0000' negative_alpha='0' />		

 <legend layout='horizontal' 
           fill_color='F0EBE6'
           bullet='square'
           font='arial'
           bold='true'
           size='10'
		  width='{$open_brace}{$dollar}percent({$dollar}qlet[#portlet_id#]['width'],80){$close_brace}'
		  height='{$open_brace}{$dollar}percent({$dollar}qlet[#portlet_id#]['height']-20,35){$close_brace}'
		   y='{$open_brace}{$dollar}get_position({$dollar}qlet[#portlet_id#]['height'],20,35){$close_brace}'
           alpha='90'
           />			
		   
  <draw>
   <text   size='15' x='0' y='0' width='{$open_brace}{$dollar}qlet[#portlet_id#]['width']{$close_brace}' height='20' h_align='center' v_align='top'>{$open_brace}{$dollar}qlet[#portlet_id#]['name']{$close_brace}</text>
  </draw>
  
<chart_pref
        select='true'            
            />   
  
	<chart_type>#chart_type#</chart_type>

    	#chart_data#


EOD;




$template['chart_stacked column']=$template['general'];
$template['chart_stacked 3d column']=$template['general'];

$template['chart_line']=$template['general'];

$template['chart_donut']=$template['general'];

$template['chart_area']=$template['general'];
$template['chart_stacked area']=$template['general'];

$template['gauge_dial']=<<<EOD

<text   size='15' x='0' y='0' width='{$open_brace}{$dollar}qlet[#portlet_id#]['width']{$close_brace}' height='{$open_brace}{$dollar}title_height{$close_brace}' align='center' >{$open_brace}{$dollar}qlet[#portlet_id#]['name']{$close_brace}</text>

	<circle  x='#x_center#' y='#y_center#' radius='#radius#' fill_color='FFFFFF' fill_alpha='100' line_thickness='6' line_color='333333' line_alpha='90' />

     	#range_code#

        <circle x='#x_center#' y='#y_center#' radius='{$open_brace}{$dollar}percent({$dollar}qlet[#portlet_id#]['radius'],33){$close_brace}' fill_color='FFFFFF' fill_alpha='255' line_thickness='0' line_alpha='50' />
	#radial_ticks#

        #radial_numbers#
        #pointer_code#

        <circle x='#x_center#' y='#y_center#' radius='{$open_brace}{$dollar}percent({$dollar}qlet[#portlet_id#]['radius'],84){$close_brace}' start='135' end='225' fill_color='111111' fill_alpha='80' />
        <circle x='#x_center#' y='#y_center#' radius='{$open_brace}{$dollar}percent({$dollar}qlet[#portlet_id#]['radius'],15){$close_brace}' fill_color='111111' fill_alpha='100' line_thickness='5' line_alpha='50' />





	<text x='{$open_brace}{$dollar}qlet[#portlet_id#]['text_x']}' y='{$open_brace}{$dollar}qlet[#portlet_id#]['text_y']}' width='{$open_brace}{$dollar}qlet[#portlet_id#]['text_width']}' size='{$open_brace}{$dollar}percent({$dollar}qlet[#portlet_id#]['radius'],21.5){$close_brace}' color='cccfff' alpha='70' align='center'>#pointer_value# \rUnit</text>

	

EOD;


$template['gauge_thermometer']=$template['general'];
$template['gauge_meter']=<<<EOD

<text   size='15' x='0' y='0' width='{$open_brace}{$dollar}qlet[#portlet_id#]['width']{$close_brace}' height='{$open_brace}{$dollar}title_height{$close_brace}' align='center' >{$open_brace}{$dollar}qlet[#portlet_id#]['name']{$close_brace}</text>

	<circle  x='#x_center#' y='#y_center#' radius='#radius#'  start='-90' end='90' fill_color='FFFFFF' fill_alpha='100' line_thickness='{$open_brace}{$dollar}percent({$dollar}qlet[#portlet_id#]['radius'],1.5){$close_brace}' line_color='333333' line_alpha='90' />

     	#range_code#

        <circle x='#x_center#' y='#y_center#' radius='{$open_brace}{$dollar}percent({$dollar}qlet[#portlet_id#]['radius'],33){$close_brace}'  start='-90' end='90' fill_color='FFFFFF' fill_alpha='255' line_thickness='0' line_alpha='50' />
	#radial_ticks#

        #radial_numbers#
        #pointer_code#


        <circle x='#x_center#' y='#y_center#' radius='{$open_brace}{$dollar}percent({$dollar}qlet[#portlet_id#]['radius'],15){$close_brace}'  start='-90' end='90'  fill_color='111111' fill_alpha='100' line_thickness='5' line_alpha='50' />





	<text x='{$open_brace}{$dollar}qlet[#portlet_id#]['text_x']}' y='{$open_brace}{$dollar}qlet[#portlet_id#]['text_y']}' width='{$open_brace}{$dollar}qlet[#portlet_id#]['text_width']}' size='{$open_brace}{$dollar}percent({$dollar}qlet[#portlet_id#]['radius'],21.5){$close_brace}' color='000000' alpha='70' align='center'>#pointer_value# Unit</text>

	<rect x='{{$dollar}qlet[#portlet_id#]['legend']['top_x']}' 
         y='{{$dollar}qlet[#portlet_id#]['legend']['top_y']}' 
         width='{{$dollar}qlet[#portlet_id#]['legend']['width']}'  
         height='{{$dollar}qlet[#portlet_id#]['legend']['height']}' 
         
         fill_color='F0EBE6' 
         fill_alpha='100'
         />
	
	#meter_legend#

EOD;


$template['chart_bubble']=$template['general'];
$template['chart_scatter']=$template['general'];
$template['chart_polar']=$template['general'];



$template['chart_3d column']=str_replace("#link_data#","",$template['chart_3d column']);
$template['chart_3d pie']=str_replace("#link_data#","",$template['chart_3d pie']);
$template['chart_stacked 3d column']=str_replace("#link_data#","",$template['chart_stacked 3d column']);


$template['tooltip']['general']="#label# = #value#";
$template['tooltip']['chart_3d pie']="#percent#%, #label# = #value# ";
$template['tooltip']['chart_pie']="#percent#%, #label# = #value#";


?>		