Section 18: Configuring a 3D 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 3DBarChartProject.
Create the Datasets
From the toolbar click on the Create a New Dataset wizard. Name your new dataset data, selectHypersonic SQL from the Data Sources list, and click Next.
Enter the following SQL query into the SQL: text area:
SELECT LOCATION, “Cost Type”, ACTUAL, BUDGET FROM COSTDATA WHERE LOCATION <> ‘All’ AND “Cost Type” = ‘varType’ GROUP BY LOCATION
and then click Finish.
Next we need a variable to the NDX. Click the Add button in the Variable section and enter the variable Name as varType and default value as All
Create a second named data set called dropDownData.ndx, and enter the following SQL query:
SELECT “Cost Type” FROM COSTDATA GROUP BY “Cost Type”
Click Finish
Create the 3D Bar Chart
Now that we have created our dataset the next step is to create the 3D chart. From the toolbar click on the Create a New Chart icon. Call it chart, select 3D Bar for the type
and click Finish. Make the 3D Bar chart 500 pixels wide and 350 pixels high. In the Barchart Properties group, set the 3D Depth: to 45, the Distance: to 500, the Angle of Elevation : to 25and the Angle of Rotation: to 65.
Click on the Bars node in the tree hierarchy in the left of the editor panel, and in the Bar Sets group select Bar Set 1, click the Color: button, set the color of the bar set to deep blue, and set theFade: to 51. Set the Shape to Cylinder.
In the second bar set, Bar Set 2, and configure it identically to the first, except choose a Orange for the color:.
Remove the 3rd bar set, Bar Set 3, by clicking the X.
Click on the Legend node in the tree hierarchy in the left of the editor panel, and enable the legend by clicking the Show Legend check box in the Display group, In the Layout group, select Horizontal from the Layout drop down menu, and in the Location group, select Bottom Left from the Location drop down menu.
Bind Data to the 3D Bar Chart
Now we need to bind our data that we created above to our 3D Bar Chart. Select the Data Source Binding tab and under the Data tree control select Bar Values. Choose data.ndx as your Data Source. Set the drop down menu over the Actual and Budget columns to Bar Set, and click the Select Rows button.
Next select Bar Labels from the Data tree control, choose data.ndx as the Data Source. Select column 0 for the Bar Labels and click the Select Rows button.
Next select Legend Items from the Data tree control, choose data.ndx as the Data Source Set the drop down menu over the Actual and Budget columns to Legend Items, and click the Row 0 check box.
Additional Functionality
Create a page called page. Drag the 3D Bar Chart onto the page layout, and then drag an HTML Form Element above the chart. Select Drop Down Menu from the HTML Form Element drop down menu. Click the Menu tab. Select varType from the Page Variables drop down menu. SelectdropDowndata.ndx from the Options NDX drop down menu. Check the Use First Source ValueCheck box. Check the Update without page refresh Check box. In the Label group, enter Please Select a Cost Type: in the Label Text box. Select Left from the Location drop down menu. Create a style named dropDownMenu. Configure an Arial 12 point Bold font.
Click the OK button.
You’re page should now allow you to alter the bars by selecting Cost Types from the drop down menu: