Section 6: Configuring a Grouped/Stacked Bar Chart
When Completed
Your NetCharts Designer perspective will appear like this:
Getting Started
Start by closing any open editors. Go to NetCharts Designer’s File menu and select the Close All option.
Next, create a new project named GroupStackBarProject.
Create Data Set
Bring up the Named Data Set (NDS) wizard by clicking on the NDS icon. Set the Named Data Set Name to bardata and select the Hypersonic SQL option.
Select Next. Click the ellipsis button, and type in the following query into the SQL field:
SELECT LOCATION,COSTTYPE,ALLACTUAL,ALLBUDGET, Caffeinated FROM PRODUCTIONCOSTS WHERE LOCATION !=’All’ AND COSTTYPE != ‘All’ AND Caffeinated=’Caffeinated’
Create the Bar Chart
Select the New Chart wizard icon from the tool bar. After the chart wizard appears, type in barchartas the Chart Name, and select Bar as the type.
Click Finish.
Under the Bar Chart tree node, in the General group, select moonlake from the Default Colors drop down menu.
If you are going to create a Group/Stack bar chart, before you start to bind data to the chart you need to change the Bar Sets Type. Select the Bars tree control and in the Bar Sets group, change the Bar Sets Type menu to Group/Stack. Now you can bind the data to the chart.
Click on the Data Source Binding tab and select the Bar Values tree control. Choose bardata.ndx for the Data Source. Change the menu on the first column to Bar Set Name, the second column to Bar Set Group, and the third and fourth columns to Bar Set. Click on Select Rows to select all of the rows except Row 0.
Select Bar Labels from the tree control. Choose bardata.ndx for the Data Source. Change the menu over the first column to Bar Labels. Check the box next to Row 1, Row 5, Row 9, and Row 13.
Select Bar Group Stack Labels from the tree control. Choose bardata.ndx for the Data Source. Change the menu over the third and fourth columns to Group Stack Labels. Check the box next to Row 0 and make sure that Process Row‐Major is checked.
Select Legend Items from the tree control. Choose bardata.ndx for the Data Source. Change the menu over the second column to Legend Items. Check the box next to Row 1, Row 2, Row 3, Row 4 and uncheck Process Row‐Major.
Additional Style
In the Presentation tab under the Bar Chart tree control change the Width to 600 and the Height to 250. In the Legend Group, check the Show Legend checkbox, and change the Location for the Legend to Bottom and its Layout to Horizontal. Add gridlines by selecting Grids tree node, clicking the New Grid button, and choosing basicgrid from the GridStyle drop down menu. Expand the Axes tree control and choose Left Axes. Set the Number Format to dollars.