Software FX Posted January 19, 2000 Report Share Posted January 19, 2000 Problem 1. Are you setting the Min/Max after you pass the data (after the AdoResultset) Please check using the properties dialog if the min and max used by the chart are the same values you assigned at the server. (To check this you may need to generate an Active chart for test purposes) Problem 2. ChartFX generates temporary names using the current date and time. You can use this approach to know the name of the file we generate. <% ImgName = Chart.GetHtmlTag(400,350,"_Image") %> <IMG SRC="<%=ImgName%>" WIDTH=400 HEIGHT=350> Or you can use Export to force a name, please note that at the moment even though you can force certain image format to be used (Jpeg, Png, etc.) you cannot use the browser detection code Chart.ImgTags = "Png" Chart.Export 9,"C:\Test\Chart.gif" Please note that if you generate PNG files, you may need to generate them with a GIF extension to workaround a problem with Netscape browsers (but the file will still be a PNG file) Regards, Juan Cegarra Software FX, Inc. http://support.softwarefx.com -----Original Message----- From: Filip Kratochvil [ mailto:filipk@iname.com] Posted At: Wednesday, January 19, 2000 1:25 AM Posted To: Server Conversation: CfxIE2000 Multiple graphs/min/max values Subject: CfxIE2000 Multiple graphs/min/max values Hello all, I'm testing the CfxIE2000 Trial version and need to find out the following: PROBLEM 1 1) I want to dislay to graphs (lines) SQL = "SELECT date,Price1,Price2 FROM tblPricing" Set chart = Server.CreateObject("ChartFX.WebServer") Set rs = Server.CreateObject("ADODB.Recordset") rs.Open SQL, conn chart.Chart3D = False chart.Gallery = LINES chart.MarkerShape = MK_NONE chart.DateFormat = "DMMM-yy" chart.Axis(AXIS_Y).Format = AF_CURRENCY chart.Axis(AXIS_Y2).Format = AF_CURRENCY 2) Now I want to set Min and Max values for Y and Y2 Chart.Axis(AXIS_Y).min = 7 Chart.Axis(AXIS_Y).max = 30 Chart.Axis(AXIS_Y2).min = 3 Chart.Axis(AXIS_Y2).max = 9 (I calculate my min/max values on the fly, above values entered for this code demo) This will produce the min/max values but the graphs (one of them) are getting clipped at the top even though I'm giving extra space - my max value in the recordset is only 28.9 3) if I don't use any min/max settings all is fine but I have bit of wasted space at the bottom, plus I need to get the two graphs closer together for comparison PROBLEM 2 I want to force generation of a picture and that is working fine. I also want to get the name of the picture and check if it has been generated before and decide if it needs to be re-generated. How are the names generated and can I modify the way names for pictures are generated. Any help would be greatly appreciated, thanks in advance. Link to comment Share on other sites More sharing options...
Software FX Posted January 19, 2000 Author Report Share Posted January 19, 2000 Problem 1. Are you setting the Min/Max after you pass the data (after the AdoResultset) Please check using the properties dialog if the min and max used by the chart are the same values you assigned at the server. (To check this you may need to generate an Active chart for test purposes) Problem 2. ChartFX generates temporary names using the current date and time. You can use this approach to know the name of the file we generate. <% ImgName = Chart.GetHtmlTag(400,350,"_Image") %> <IMG SRC="<%=ImgName%>" WIDTH=400 HEIGHT=350> Or you can use Export to force a name, please note that at the moment even though you can force certain image format to be used (Jpeg, Png, etc.) you cannot use the browser detection code Chart.ImgTags = "Png" Chart.Export 9,"C:\Test\Chart.gif" Please note that if you generate PNG files, you may need to generate them with a GIF extension to workaround a problem with Netscape browsers (but the file will still be a PNG file) Regards, Juan Cegarra Software FX, Inc. http://support.softwarefx.com -----Original Message----- From: Filip Kratochvil [ mailto:filipk@iname.com] Posted At: Wednesday, January 19, 2000 1:25 AM Posted To: Server Conversation: CfxIE2000 Multiple graphs/min/max values Subject: CfxIE2000 Multiple graphs/min/max values Hello all, I'm testing the CfxIE2000 Trial version and need to find out the following: PROBLEM 1 1) I want to dislay to graphs (lines) SQL = "SELECT date,Price1,Price2 FROM tblPricing" Set chart = Server.CreateObject("ChartFX.WebServer") Set rs = Server.CreateObject("ADODB.Recordset") rs.Open SQL, conn chart.Chart3D = False chart.Gallery = LINES chart.MarkerShape = MK_NONE chart.DateFormat = "DMMM-yy" chart.Axis(AXIS_Y).Format = AF_CURRENCY chart.Axis(AXIS_Y2).Format = AF_CURRENCY 2) Now I want to set Min and Max values for Y and Y2 Chart.Axis(AXIS_Y).min = 7 Chart.Axis(AXIS_Y).max = 30 Chart.Axis(AXIS_Y2).min = 3 Chart.Axis(AXIS_Y2).max = 9 (I calculate my min/max values on the fly, above values entered for this code demo) This will produce the min/max values but the graphs (one of them) are getting clipped at the top even though I'm giving extra space - my max value in the recordset is only 28.9 3) if I don't use any min/max settings all is fine but I have bit of wasted space at the bottom, plus I need to get the two graphs closer together for comparison PROBLEM 2 I want to force generation of a picture and that is working fine. I also want to get the name of the picture and check if it has been generated before and decide if it needs to be re-generated. How are the names generated and can I modify the way names for pictures are generated. Any help would be greatly appreciated, thanks in advance. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.