简明现代魔法 -> Flex/ActionScript/AIR -> Flex图表open-flash-chart应用

Flex图表open-flash-chart应用

2009-11-11

效果演示

参照文章程序员的十层楼

前端调用代码

<script type="text/javascript" src="js/swfobject.js"></script>

<div id="my_chart" style="padding: 0px; margin:10px; border: 1px solid lightblue; 
width: 218px; height: 300px;" onMouseOut="__onrollout();"></div>
 	
<script type="text/javascript">
var so = new SWFObject("swf/open-flash-chart.swf", "ofc", "218", "300", "9", "#FFFFFF");
//so.addVariable("data", "../data-files/data-20.txt");

so.addVariable("variables","true");
so.addVariable("title","2009 NowaMagic 成长曲线,{font-size: 12;}");
so.addVariable("y_legendx","Open Flash Chart,12,0x736AFF");
so.addVariable("y_label_size","15");
so.addVariable("y_ticks","5,10,6");
so.addVariable("bar","50,0x9933CC,Page views,10");
so.addVariable("values","32,99,148,0,0");
so.addVariable("x_labels","8月,9月,10月,11月,12月");
so.addVariable("x_axis_steps","2");
so.addVariable("y_max","600");


so.addParam("allowScriptAccess", "always" );//"sameDomain");
so.addParam("onmouseout", "onrollout2();" );
so.write("my_chart");
</script>
<script type="text/javascript">
function onrollout()
{
  tmp = findSWF("ofc");
  x = tmp.rollout();
}

function onrollout2()
{
  tmp = findSWF("ofc");
  x = tmp.rollout();
}

function findSWF(movieName) {
  if (navigator.appName.indexOf("Microsoft")!= -1) {
    return window[movieName];
  } else {
    return document[movieName];
  }
}
</script>

随机文章推荐
网站分类


注:如需转载本文,请注明出处(原文链接),谢谢。更多精彩内容,请进入简明现代魔法首页。

进入新博客
喜欢本文,就分享它吧
给我留言
您的名字:
您的邮件:
您的网站:


 

copyright © 2009 简明现代魔法    学习、分享、进步

power by Gonn 感谢所有关心和支持本站的朋友们