Creating a .NET Client Control Chart Without Downloading a File
This technique is used when a chart image (PNG or JPEG) will be generated by the server side component. The technique invovles including an <OBJECT> tag
wherever you want the chart to be displayed and setting the DataPath parameter to point to the page that generates the BitStream by invoking the getHtmlData method. The IMG tag should read as follows:
<object id="Chart1" classid="/SomeApp/chartfx6/download/ ChartFX.MainClient.DLL#SoftwareFX.ChartFX.Internet.MainClient" WIDTH="450" HEIGHT="280" > <PARAM NAME="DataPath" VALUE="http://127.0.0.1:8080/ChartFX/chart.jsp"> <PARAM NAME="AssemblyTarget" VALUE="ChartFX.Internet.Client, Version=6.0.1507.41460, Culture=neutral, PublicKeyToken=a1878e2052c08dce" > <PARAM NAME="ClassTarget" VALUE="SoftwareFX.ChartFX.Internet.Client.Chart" > </object>
|
The chart.jsp file will contain the necessary code that
generates the desired chart and invokes the getHtmlData method as a result of
the page. A very important issue when generating this file is to make sure
there are no other HTML tags or Line feeds in the resulting file as the chart
may not be correctly returned and displayed in the browser. In other words,
make sure the chart.aspx file only returns the results of the getHtmlData method
with no additional characters. Additionally, be sure to update the version number to match your installation. For example a valid chart.aspx file may look like:
<%SoftwareFX.ChartFX.ChartServer chart1 = new SoftwareFX.ChartFX.ChartServer(application,request,response); chart1.getHtmlTag("400","240",".NET");%>
|
Please remember there must not be any spaces or carriage returns before the
start of the code (<%). If you press [Enter] then a carriage return will
be generated in the result of the jsp and the IMG source will not be able to
read the image generated by the Chart FX for .NET. Therefore it is
strongly advised that you use a plain text editor when generating these files
as many advanced editors may include undesired HTML tags in the resulting file.
|