|
User Details |
message
|
|
Paul Oliver
post date:
2009-12-03 03:15:35
|
I am looking to create a drill down chart however nearly all the tutorials use PHP/MySQL do you have any for ASP and DW recordsets.
In particular I would like an example of how to set the links for the drilldown chart
|
|
|
Cristian Dorobantescu [Extend Studio]
post date:
2009-12-03 03:46:24
|
Hi Paul,
The drilldown feature is actually quite simple. You need to create first the detailed charts (meaning the charts where the user gets when clicking on the main chart graph). These detailed charts are regular charts - there is nothing special about them.
When you have the detailed charts ready, you only need to add a link from the main chart to the detailed charts. If you look at this image http://www.extendstudio.com/documentation/fusioncharts-for-dw-developer-edition/documentation/_images/docs/drill-down-link.jpg you will see where to add the links manually (in the red highlighted square).
You can do the linking from the database as well: http://www.extendstudio.com/documentation/fusioncharts-for-dw-developer-edition/documentation/_images/docs/drill-down-link-dynamic.jpg
Here is the drill down documentation: http://www.extendstudio.com/documentation/fusioncharts-for-dw-developer-edition/documentation/docs/drill-down.html
As for the ASP dynamic question, here we have a tutorial on how to use dynamic charts: http://www.extendstudio.com/dynamic-web-charts-dreamweaver-fusioncharts-developer/Dynamic_Flash_Charts_FusionCharts_for_Dreamweaver.html
There aren't any differences besides the recordsets - you should do the recordsets that extract the data from the database, then select "Use data from already defined recordsets"
|
|
|
Paul Oliver
post date:
2009-12-03 04:48:56
|
Hi Christian,
I have started creating dynamic charts and would now like to use drilldowns as well. Forgive me if i seem a little thick on this subject but i do not quite understand what info needs to be in each of the LINK & TARGET fields
could you provide me with some type of example using the following demo data
CHART 1
contains data for months
CHART 2 is the detail chart and what I want is when the user clicks on the "Month" series in chart 1 then chart 2 displays the data for that particular month.
I hope I have explained this fully
Regards
Paul Oliver
|
|
|
Cristian Dorobantescu [Extend Studio]
post date:
2009-12-03 05:44:20
|
Hi Paul,
Things are easier than they seem!
Let's say you have created the detail chart in a file called detail_chart.aspx and you make the SQLs inside to read an URL parameter called "month". So the URLs to this detail chart should be something like detail_charts.aspx?month=february
Now, looking at this screenshot: http://www.extendstudio.com/documentation/fusioncharts-for-dw-developer-edition/documentation/_images/docs/drill-down-link.jpg on the main chart, you should select february and at the link you should but the page with the corresponding month parameter: detail_charts.aspx?month=february
The target - it refers to opening a new page when the user clicks on the link, or opening the detail chart in the same page.
Let me know if you have more questions, I would be glad to help.
Cristian
|
|
|
Paul Oliver
post date:
2009-12-03 06:10:11
|
Christian,
I do not believe that I am explaining myself properly
my first chart is based on a dynamic recordset that shows data for all months in a selected year, the one I am testing with selects all data for 2008 which only includes Oct,Nov,Dec
here is my recordset code
<%
Dim rsOTIF_2008M
Dim rsOTIF_2008M_cmd
Dim rsOTIF_2008M_numRows
Set rsOTIF_2008M_cmd = Server.CreateObject ("ADODB.Command")
rsOTIF_2008M_cmd.ActiveConnection = MM_Charting_STRING
rsOTIF_2008M_cmd.CommandText = "SELECT * FROM QryOTIF4_Chart_MonthYear_Summary WHERE Year = 2008 AND Site = 'DES'"
rsOTIF_2008M_cmd.Prepared = true
Set rsOTIF_2008M = rsOTIF_2008M_cmd.Execute
rsOTIF_2008M_numRows = 0
%>
here is the generated data from fusion charts
<%
Dim dFCOTIFODD: Set dFCOTIFODD = new DWFChart
OTIFODD_dataXML = ReadDisplayFile("../includes/FusionCharts/dynamic/data/fc_OTIFODD_data.asp")
dFCOTIFODD.Init "OTIFODD", "StackedColumn2D", "../includes/FusionCharts/charts/", 800, 400, "", "", "", "", "", ""
dFCOTIFODD.setVersion "1.1.0"
dFCOTIFODD.setConfigXML OTIFODD_dataXML
dFCOTIFODD.setCategory rsOTIF_2008M, "bMonth", "useExport=true", "", rsOTIF_2008M_cmd
dFCOTIFODD.addSeries rsOTIF_2008M, "OD_CO", "linkColumn=OTIF_MonthDetails_2008_DES.asp?bMonth={bMonth}", "color='ff' seriesName='OD_CO' renderAs='Column' parentYAxis='P'", "default", "", rsOTIF_2008M_cmd
dFCOTIFODD.addSeries rsOTIF_2008M, "OD_MTO", "", "color='ff0000' seriesName='OD_MTO' renderAs='Column' parentYAxis='P'", "default", "", rsOTIF_2008M_cmd
dFCOTIFODD.setOrdering "None", "asc"
dFCOTIFODD.prepareData
%>
this then displays the relevant data with the months on the x-axis and the values on the y-axis
I then want to click on any of the 3 month columns and display the detailed data for that month in the detailed chart
Here is the recordset data for that chart
<%
Dim rsOTIF_2008Daily
Dim rsOTIF_2008Daily_cmd
Dim rsOTIF_2008Daily_numRows
Set rsOTIF_2008Daily_cmd = Server.CreateObject ("ADODB.Command")
rsOTIF_2008Daily_cmd.ActiveConnection = MM_Charting_STRING
rsOTIF_2008Daily_cmd.CommandText = "SELECT * FROM QryOTIF6_Chart_DailyData WHERE bMonth = ? AND Year = 2008 AND Site = 'DES'"
rsOTIF_2008Daily_cmd.Prepared = true
rsOTIF_2008Daily_cmd.Parameters.Append rsOTIF_2008Daily_cmd.CreateParameter("param1", 200, 1, 255, rsOTIF_2008Daily__aMonth) ' adVarChar
Set rsOTIF_2008Daily = rsOTIF_2008Daily_cmd.Execute
rsOTIF_2008Daily_numRows = 0
%>
And here is the generated data from fusion charts
<%
Dim dFCOTID_ODD_DAILY: Set dFCOTID_ODD_DAILY = new DWFChart
OTID_ODD_DAILY_dataXML = ReadDisplayFile("../includes/FusionCharts/dynamic/data/fc_OTID_ODD_DAILY_data.asp")
dFCOTID_ODD_DAILY.Init "OTID_ODD_DAILY", "StackedColumn2D", "../includes/FusionCharts/charts/", 800, 400, "", "", rsOTIF_2008Daily.Fields.Item("bMonth").Value, "", "", ""
dFCOTID_ODD_DAILY.setVersion "1.1.0"
dFCOTID_ODD_DAILY.setConfigXML OTID_ODD_DAILY_dataXML
dFCOTID_ODD_DAILY.setCategory rsOTIF_2008Daily, "ShipDate", "useExport=true", "", rsOTIF_2008Daily_cmd
dFCOTID_ODD_DAILY.addSeries rsOTIF_2008Daily, "OD_CO", "", "color='ff' seriesName='OD_CO' renderAs='Column' parentYAxis='P'", "default", "", rsOTIF_2008Daily_cmd
dFCOTID_ODD_DAILY.addSeries rsOTIF_2008Daily, "OD_MTO", "", "color='ff0000' seriesName='OD_MTO' renderAs='Column' parentYAxis='P'", "default", "", rsOTIF_2008Daily_cmd
dFCOTID_ODD_DAILY.setOrdering "None", "asc"
dFCOTID_ODD_DAILY.prepareData
%>
however when I click on the column in the first chart it appears that the parameter is not being passed as this is what I get
ADODB.Field error '800a0bcd'
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/OTIF/OTIF_MonthDetails_2008_DES.asp, line 28
this line relates to the bMonth parameter that I am trying to pass from the first chart
Regards
Paul
|
|
|
Horea Radu [Extend Studio]
post date:
2009-12-05 11:41:29
|
Hi Paul,
How does the URL look like when you click a column? Is the GET parameter missing or is the value wrong? Also, what columns does your query return?
The code you posted looks ok. Can you send us a link so we can see what happens?
Best regards,
Horea RADU
|
|
|
Paul Oliver
post date:
2009-12-07 15:55:58
|
|
|
Paul Oliver
post date:
2009-12-07 16:02:51
|
Hi Horea,
I cannot give you a link as this is on our company intranet however this is the problem.
I have created 2 new charts to test this out the first chart has these parameters
<%
Dim dFCOTIF_Chart_MonthYear: Set dFCOTIF_Chart_MonthYear = new DWFChart
OTIF_Chart_MonthYear_dataXML = ReadDisplayFile("includes/FusionCharts/dynamic/data/fc_OTIF_Chart_MonthYear_data.asp")
dFCOTIF_Chart_MonthYear.Init "OTIF_Chart_MonthYear", "StackedColumn2D", "includes/FusionCharts/charts/", 800, 400, "", "", "", "", "", ""
dFCOTIF_Chart_MonthYear.setVersion "1.1.0"
dFCOTIF_Chart_MonthYear.setConfigXML OTIF_Chart_MonthYear_dataXML
dFCOTIF_Chart_MonthYear.setCategory rsOTIF_MonthYear, "bMonth", "", "", rsOTIF_MonthYear_cmd
dFCOTIF_Chart_MonthYear.addSeries rsOTIF_MonthYear, "MOD_CO", "linkColumn=OTIF_Chart_DayMonth.asp?bMonth={bMonth}", "color='ff' seriesName='MOD_CO' renderAs='Column' parentYAxis='P'", "default", "", rsOTIF_MonthYear_cmd
dFCOTIF_Chart_MonthYear.addSeries rsOTIF_MonthYear, "MOD_MTO", "", "color='ff0000' seriesName='MOD_MTO' renderAs='Column' parentYAxis='P'", "default", "", rsOTIF_MonthYear_cmd
dFCOTIF_Chart_MonthYear.setOrdering "None", "asc"
dFCOTIF_Chart_MonthYear.prepareData
%>
As you can see I am passing the column {bMonth} as the filter however when I click on the column this is what is passed
http://rigidnet/OTIF_Chart_DayMonth.asp?bMonth
therfore the parameter is not being passed in the querystring
and I get the message "No data to display"
Regards
Paul Oliver
|
|
|
Andrei Rinciog [Extend Studio]
post date:
2009-12-14 11:54:58
|
Hi Paul,
It seems like the equal sign after "bMonth" is breaking the code. You need to use the URL encode for the equal sign: ' % 3D ' (without any space in it).
So your link will look like this:
http://rigidnet/OTIF_Chart_DayMonth.asp?bMonth% 3Dvalue
Regards,
Andrei
|
|