• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

17. Graphing and Charting > 17.6. Saving Charts to a Variable

Saving Charts to a Variable

In all the examples we’ve created so far, the cfchart tag has always been used to render the chart directly to the browser. Behind the scenes, cfchart is generating a SWF, JPG, or PNG file and sending the necessary HTML code to the browser to render the file. For example, if you run the code in Example 17-1 and do a “View Source” in your web browser, you’ll see that ColdFusion MX automatically generated the necessary HTML object and embed tags to display the SWF (Flash) version of the chart:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
 codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,2,0"
 ID=Images_100007_SWF name=Images_100007_SWF width=400 height=400>
  <param name=movie value="/CFIDE/GraphData.cfm?graphID=Images/100007.SWF">
  <param name=quality value=high>
  <param name=bgcolor value=#FFFFFF>
<embed src="/CFIDE/GraphData.cfm?graphID=Images/100007.SWF"
  quality=high bgcolor=#FFFFFF width=400 height=400 type="application/x-shockwave-flash"
  pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=
ShockwaveFlash">
</embed>
</object>

PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint