Fusioncharts Learning Classics

Source: Internet
Author: User

Download file

1, download fusioncharts swf file, where the official web is not downloaded, download the file has logo information in the lower left corner, said to normal if the use is to pay for the purchase. This article recommends paying for the purchase, the following version for the cracked version is only for learning communication, not commercially used.

http://download.csdn.net/detail/li_894389175/8947133

Environment construction I use the Java Development environment, of course, the Eclipse development tool, the first new project, and the construction of a good project on the WebContent directory under the Fusioncharts folder,

--webcontent

--fusioncharts//This folder holds fusioncharts.js files

--JS//This folder holds the page reference js himself written JS

--data//This holds the XML data type file, the actual project is the service side returns

--SWF//This storage download SWF file


Method One:

<%@ page language= "java"  contenttype= "Text/html; charset=utf-8"     pageencoding= "Utf-8"%><! doctype html public  "-//w3c//dtd html 4.01 transitional//en"   "HTTP// Www.w3.org/TR/html4/loose.dtd "> 

  where chartone.js file contents

Fusioncharts.ready (function  ()  {    var myChart = new  Fusioncharts ({        type:  ' column2d ',         renderAt:  ' Onetest ',         dataformat:   ' JSON ',        datasource: {             chart: {                 caption:  "Guangzhou Zhong Yuan Software Co., Ltd.",                 subCaption:  "XXX",             },             data:[{                 label:  "bakersfield&nbsp Central ",                 value :  "880000"             },             {                 label:  "Garden groove harbour",                 value:  "730000"              },             {                 label:  "Los angeles topanga",                 value:  "590000"              },            {                 label:  "Compton-rancho dom",                 value:  " 520000 "            },             {                 label:  "Daly city serramonte",                 value:  "330000"              }]        }     });     mychart.render ();});
<%@ page language= "java"  contenttype= "Text/html; charset=utf-8"     pageencoding= "Utf-8"%><! doctype html public  "-//w3c//dtd html 4.01 transitional//en"   "HTTP// Www.w3.org/TR/html4/loose.dtd "> 
<%@ page language= "java"  contenttype= "Text/html; charset=utf-8"     pageencoding= "Utf-8"%><! doctype html public  "-//w3c//dtd html 4.01 transitional//en"   "HTTP// Www.w3.org/TR/html4/loose.dtd "> 

The two methods used later are XML-type data

where Threedata.xml

<chart caption= "This method is the simplest code amount at least" xaxisname= "Month" yaxisname= "Units" showvalues= "0" decimals= "0" formatnumberscale= " 0 "chartrightmargin=" > <set label= "Jan" value= "462"/> <set label= "Feb" value= "857"/> <set label=  "Mar" value= "671"/> <set label= "APR" value= "494"/> <set label= "may" value= "761"/> <set label= "June" value= "960"/> <set label= "Jul" value= "629"/> <set label= "" value= "622"/> <set label= "Sep" Valu e= "376"/> <set label= "Oct" value= "494"/> <set label= "Nov" value= "761"/> <set label= "Dec" value= "96 0 "/></chart>

Twodata.xml

<chart caption= ' monthly sales summary '  subcaption= ' for the year 2006 '  xaxisname= ' Month '  yaxisname= ' Sales '  numberprefix= ' $ ' >    <set  Label= ' January '  value= ' 17400 '  />    <set label= ' February '  value= ' 19800 '  />    <set label= ' March '  value= ' 21800 '  />     <set label= ' April '  value= ' 23800 '  />    <set label = ' may '  value= ' 29600 '  />    <set label= ' June '  value= ' 27600 '   />    <set label= ' July '  value= ' 31800 '  />     <set label= ' August '  value= ' 39700 '  />    <set label= ' September '  value= ' 37800 '  />    <set label= ' October '  value= ' 21900 '  / >  &Nbsp; <set label= ' November '  value= ' 32900 '  />    <set  Label= ' December '  value= ' 39800 '  /></chart>


Fusioncharts Learning Classics

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.