下载地址 :http://www.fusioncharts.com/goodies/fusioncharts-free/
使用方法:引用fusionCharts.js
然后参照下面代码:
<div id="chart_div"/>
<script>
var chart1 = new FunsionCharts('../funsionCharts/FCF_Line.swf',"chartId",'500',300,'0','1');
chart1.setDataXML("<graph caption='title',xAxisName='时间',yAxisName='' baseFont='宋体',baseFontSize='12'><set name='时' value='12',color='AFD8F8'></graph>")
chart1.addParam('wmode','transparent');//Opaque
chart1.render('chart_div');
</script>
用以上的代码就可以显示出图表了。
但在项目中可能会遇到Html层被其给遮盖了,这时候就要加上标红的那句代码。Adobe官方给出了:
Window: Use the Window value to play a Flash Player movie in its own rectangular window on a web page. This is the default value for wmode and it works the way the classic Flash Player works. This normally provides the fastest animation performance.
Opaque: By using the Opaque value you can use JavaScript to move or resize movies that don’t need a transparent background. Opaque mode makes the movie hide everything behind it on the page. Additionally, opaque mode moves elements behind Flash movies (for example, with dynamic HTML) to prevent them from showing through.
Transparent: Transparent mode allows the background of the HTML page, or the DHTML layer underneath the Flash movie or layer, to show through all the transparent portions of the movie. This allows you to overlap the movie with other elements of the HTML page. Animation performance might be slower when you use this value.
wmode默认属性为window
注:fusioncharts-free Y轴显示中文,一直没有解决,期待大拿的出现。