Case Study #42 - "Drill Down" chart example

This example illustrates the chart 'drill-drown' capability. There are two chart types (12 & 13) that can provide this link capability.

ASP code = C42.asp (Init file)

<FRAMESET ROWS="70%,*">
<FRAME SCROLLING="yes" NAME="chart" SRC="Hyper.asp">
<FRAME NAME="Pic" SRC="c42_drill.asp">
</FRAMESET>

File = Hyper.asp (Upper Frame - holds charts)

<Center><H3>Drill Down Charting Demo</H3>
<% '...Normal chart - left side
Set X=Server.CreateObject("Asp.DB")
X.dbUnit=9
X.dbUserChartData="Frank,Polly,Ivy,Irene,Iris,Amanda~50,42,19,16,13,10"
X.dbMagicLayout="(;,#)2;CHART_24,http://24.11.127.127,300,300,1,1; dataset0Labels~dataset0yValues;#0#~#1#;titleString=Frank's Family in a Pie~titlefont=Arial,12,5~legendon~legendllX=0.0~legendllY=0.0~ labelPosition=1~valueLabelsOn~percentLabelsOn~IconWidth=0.03~IconHeight=0.04~ Xloc=0.5~Yloc=0.6~PieWidth=0.5~PieHeight=0.5~3D"
X.AspDBUserChart
'...Drill down chart - right side
X.dbMagicLayout="(;,#)3;CHART_13,http://24.11.127.127,300,300,1,1; dataset0Labels~dataset0yValues;#0#~#1#;titleString=Frank's Family in a bar with drill-down~titlefont=Arial,12,5~xAxislabelangle=90~ 3D~ dataset0Links=C42_Drill.asp?X=Frank,C42_Drill.asp?X=Polly,C42_Drill.asp?X=Ivy, C42_Drill.asp?X=Irene, C42_Drill.asp?X=Iris, C42_Drill.asp?X=Mende~ dwellUseLabelString=true~ dwellUseXValue=false~ dwellUseYValue=false~ xAxisTitle=Click column to see pictures~ Plotarea=0.8,0.3,0.2,0.8~ xAxisTitleFont=Arial,12,5~ Target=Pic"
X.AspDBUserChart
response.write(session("aspdb_Layout_9_2") & "&nbsp;")
response.write(session("aspdb_Layout_9_3"))
%>
</Center>

File = C42_Drill.asp (Lower Frame - hold picture)

<%
if request("X")<>"" then response.write("<IMG SRC=" & request("X") & ".gif>")
%>

Chart #13 is the HyperColumn chart. Each column can be mapped to an URL. The URL is an ONE line asp file C42_drill.asp. The data link is via the dataset0Links parameter. 6 URLs are defined corresponding to the 6 data points. The data value is also fed as the URL variable and eventually used to construct the image name.

dataset0Links=C42_Drill.asp?X=Frank,C42_Drill.asp?X=Polly,C42_Drill.asp?X=Ivy, C42_Drill.asp?X=Irene, C42_Drill.asp?X=Iris, C42_Drill.asp?X=Mende

The X and Y dwells are turned off and instead the label string is used as dwell. So when mouse is over the column, the label values (names) are displayed. The screen dump did not capture the mouse icon and only display the dwell value. The current Java restriction demands the linking URL must be from the same host where the applet resides.


Browser Output -