Working with the SQL Template Designer > Configure a Horizontal Stacked Bar Chart SQL Template
  
Version 10.0.01
Configure a Horizontal Stacked Bar Chart SQL Template
A horizontal stacked bar chart, as evident by its name, renders data as stacked horizontal bars. See also:
Example of a Horizontal Stacked Bar Chart SQL Template: Available/Allocated Capacity
Configure a Bar Chart SQL Template
Configure a Horizontal Bar Chart SQL Template
Configure a Stacked Bar Chart SQL Template
Example of a Horizontal Stacked Bar Chart SQL Template: Available/Allocated Capacity
1. From the SQL Template Designer tabbed window, select the Static Custom Combo Box and click Configure at the bottom of the Query window.
2. Enter the heading for the drop-down list in the Static Custom Combo box—for this example, Array Vendor:
3. Enter the following comma-separated list of values and then click OK: All,EMC,HDS,IBM,NetApp
These will be the options that a user can select when generating a report.
4. In the Query tabbed window, enter the following SQL query.
SELECT
array_name,
(allocated_kb)/(allocated_kb+available_kb+.001)*100 pct_allocated,
(available_kb)/(allocated_kb+available_kb+.001)*100 pct_available
FROM aps_v_storage_array
WHERE allocated_kb >= 0
AND available_kb >= 0
AND vendor_name LIKE DECODE('${freeCombo1}','All','%','%${freeCombo1}%')
ORDER BY (available_kb)/(allocated_kb+available_kb+.001)*100 DESC
The output for the horizontal stacked bar chart will look something like this: