求 open openflashchart chart 2 的API java js

Open Flash Chart - Tutorial: Other libraries
Open source, free to use and you get the source code to fiddle with!
Tutorial: Other libraries
All of the examples on this site use the PHP library that I wrote. The library
simply makes it easier to build the JSON file for the chart to use (as you have
seen in the previous tutorials)
There are other libraries available that are written in other languages. But, for
all of the libraries just open them up in your debugger and step through the code
to see what is happening. All of them are very simple :-) They all have similar
objects and methods, so it is very easy to translate the PHP examples into the
language of your choice. So don't be put off if you don't use PHP. Just skim over
the example code and try to make sense of what it is doing :-)
Quick links to sections in this page:
I'm not sure where to drop this link, but for a good example of how to use the charts
in a dashboard, check out the
Pedro Visintin has written a rails library.
the tutorial and documentation is here:
Lisowski Rafa? also wrote a Rails plugin. Information about it, how install
and a related projects at .
git repository:
Rails and Open Flash Chart .
Rails and Open Flash Chart
Rails and Open Flash Chart .
There are .NET controls (or libraries) in the download .zip file, written by
肖一方 (xiao yifang). Edit: The latest lib
seems to be at: .
Here is a nice .NET library (visual studio 2008):
There are Perl libraries in the download .zip file. Or search
for open flash chart and JSON. Hey, you
code Perl. You're the guru,-)
Greg Vanore:
has a library.
Java Library Project:
zhenhuazhu :,
Struts 2 library (is included in the download .zip file)
Tim Robertson: .
Emanuel Fonseca: A Python library is included in the .zip file :-)
google code project. This is
the most up to date version of the Python libraries. Here is the .
Get help in the open flash chart
From Pradeep: You can see the pyOFC2 demo here:
and the code :
Grant Slender:
A Smalltalker has created a wrapper for Seaside.
Could you add it to your web site?
K Driedger
component is a library
for including Open Flash Chart 2.0 charts in Pentaho. Nicholas Goodman
by Yannick SILVA.
Open Flash Chart logo by . | Syntax highlights are byopen flash chart 2 教程
- ITeye技术网站
博客分类:
原文地址:http://teethgrinder.co.uk/open-flash-chart-2/tutorial.php
教程一:它是怎么工作的
在这个教程里面我们要告诉大家如何在你的网页上面显示这样的一张图表。
这里我截了一张图片示意一下,真正的图表是鼠标移上去有交互的。
1:安装ofc
在我们开始之前,你应该先下载ofc的压缩包。
下载地址在这里:http://teethgrinder.co.uk/open-flash-chart-2/downloads.php,下载里面的zip压缩包。
解压.zip文件,进入version-2目录,把open-flash-chart.swf这个文件复制到你的web目录的根目录下(其实任何目录都是可以的,只要你在使用的时候写对路径,但是这里我们为了方便,就放到根目录好了)。
2:开始编码
在你的web根目录下新建一个chart.html文件,并把以下代码复制进去。
Hello World
classid="clsid:d27cdb6e-ae6d-11cf-96b8-"
codebase="/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
width="500"
height="250" id="graph-2" align="middle"
name="allowScriptAccess" value="sameDomain"
name="movie" value="open-flash-chart.swf"
name="quality" value="high"
src="open-flash-chart.swf" mce_src="open-flash-chart.swf"
quality="high"
bgcolor="#FFFFFF"
width="500"
height="250"
name="open-flash-chart"
align="middle"
allowScriptAccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="/go/getflashplayer"
&p&Hello World&/p&
&object classid="clsid:d27cdb6e-ae6d-11cf-96b8-"
codebase="/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
width="500"
height="250" id="graph-2" align="middle"&
&param name="allowScriptAccess" value="sameDomain" /&
&param name="movie" value="open-flash-chart.swf" /&
&param name="quality" value="high" /&
&embed src="open-flash-chart.swf" mce_src="open-flash-chart.swf"
quality="high"
bgcolor="#FFFFFF"
width="500"
height="250"
name="open-flash-chart"
align="middle"
allowScriptAccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="/go/getflashplayer" /&
现在你打开这个页面的时候,会看到这样的内容: 它可能会包含一个错误。
因为这个时候我们只告诉它要显示一个ofc图表,但是还没有把要显示什么数据告诉它。
下面我们要给它提供一些数据。ofc读取的是json格式的数据,json大家应该都知道吧,没有也么关系,你只要把下面这段代码复制到一个新文件中去,并命名为data.json,同样保存到web根目录中。
"Many data lines",
"style": "{font-size: 20 color:#0000 font-family: V text-align:}"
"y_legend":{
"text": "Open Flash Chart",
"style": "{color: #736AFF; font-size: 12}"
"elements":[
"#9933CC",
"Page views",
"font-size": 10,
"values" :
[9,6,7,9,5,7,6,9,7]
"#CC9933",
"Page views 2",
"font-size": 10,
"values" :
[6,7,9,5,7,6,9,7,3]
"x_axis":{
"stroke":1,
"tick_height":10,
"colour":"#d000d0",
"grid_colour":"#00ff00",
"labels": {
"labels": ["January","February","March","April","May","June","July","August","Spetember"]
"y_axis":{
"tick_length": 3,
"#d000d0",
"grid_colour": "#00ff00",
"Many data lines",
"style": "{font-size: 20 color:#0000 font-family: V text-align:}"
"y_legend":{
"text": "Open Flash Chart",
"style": "{color: #736AFF; font-size: 12}"
"elements":[
"#9933CC",
"Page views",
"font-size": 10,
"values" :
[9,6,7,9,5,7,6,9,7]
"#CC9933",
"Page views 2",
"font-size": 10,
"values" :
[6,7,9,5,7,6,9,7,3]
"x_axis":{
"stroke":1,
"tick_height":10,
"colour":"#d000d0",
"grid_colour":"#00ff00",
"labels": {
"labels": ["January","February","March","April","May","June","July","August","Spetember"]
"y_axis":{
"tick_length": 3,
"#d000d0",
"grid_colour": "#00ff00",
ofc可以有好多方法去获取数据,其中一种方式是url,就是通过链接告诉它去那里取数据。
现在通过浏览器打开刚才的chart.html,给它加上一个参数,“?ofc=data.json”,这个时候你的链接应该看起来像这样:/chart.html?ofc=data.json
你应该能看到类似这样的一个图表:
4:恭喜你,你已经成功了。
看,就是这么简单。这样就搞定了一个最简单的图表显示了。
你可以尝试编辑data.json文件来显示你自己的数据,编辑 "values" : [9,6,7,9,5,7,6,9,7] 这部分就可以了。
你会发现手动编辑这样的数据格式及其容易出错,所以在教程3里面我们会用php的api来写json格式的数据。
5:一些需要注意的地方
url里面的ofc参数并不是唯一的,它可以和该页面的其他参数一起和谐共处。比如这样也行:/chart.html?x=1&ofc=data.json&y=2
你可以把data.json文件放到web目录的其他地方,然后在url里面指定路径即可。比如这样:/chart.html?ofc=../stuff/../data.json
作为参数的路径和文件名都要经过url编码(url encode)。
简单概括一下它做了哪些事情:
浏览器请求chart.html文件
它发现了falsh tag,然后去请求open-flash-chart.swf这flash文件。
ofc发现url里面指定的数据文件,并去读取数据。
ofc读取json格式的数据,并把数据显示出来
splinter_2
浏览: 22741 次
来自: 上海
写的很不错!
果断收藏!
不知道你最后选了哪一个公司,我最近也在应聘Rovi准备以下开源项目:
1. Struts 2.1.6
2. Open Flash Chart 2 Version 2 Lug Wyrm Charmer (28th, July 2009)
3. jofc2,这东西不知道是没做好还是什么意思,好像和ofc2不怎么匹配,最好下源码,有什么问题直接改。
用eclipse新建动态网站,取名OFC2Demo,将Struts2 lib目录下commons-fileupload-1.2.1.jar、commons-logging-1.0.4.jar、freemarker-2.3.13.jar、ognl-2.6.11.jar、struts2-core-2.1.6.jar、xstream-1.3.1.jar和xwork-2.1.2.jar、log4j.jar复制到WebContent\lib目录下。
使用svn下载jofc2源码,http:///svn/trunk/,将下载后的src目录下的jofc2整个目录和下级内容全部复制到项目src目录下。
在web.xml中加入struts2拦截器
&?xml&version="1.0"&encoding="UTF-8"?&
&web-app&xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&xmlns="/xml/ns/javaee"&xmlns:web="/xml/ns/javaee/web-app_2_5.xsd"&xsi:schemaLocation="/xml/ns/javaee&/xml/ns/javaee/web-app_2_5.xsd"&id="WebApp_ID"&version="2.5"&
&&&display-name&OFC2Demo&/display-name&
&&&filter&
&&&&&filter-name&struts2&/filter-name&
&&&&&filter-class&
&&&&&&org.apache.struts2.dispatcher.FilterDispatcher
&&&&&/filter-class&
&&&/filter&
&&&filter-mapping&
&&&&&filter-name&struts2&/filter-name&
&&&&&url-pattern&/*&/url-pattern&
&&&/filter-mapping&
&&&welcome-file-list&
&&&&&welcome-file&index.html&/welcome-file&
&&&&&welcome-file&index.htm&/welcome-file&
&&&&&welcome-file&index.jsp&/welcome-file&
&&&&&welcome-file&default.html&/welcome-file&
&&&&&welcome-file&default.htm&/welcome-file&
&&&&&welcome-file&default.jsp&/welcome-file&
&&&/welcome-file-list&
&/web-app&
在返回jofc2生成Open Flash Chart数据时,本来想用jsonplugin插件,但发现序列化jofc2的Chart对象时,许多元素名称和Chart.toString()不同,这使得Open Flash Chart解析数据时不认识。所以需增加一个Struts2自定义Result Type,步骤如下:
新建类,OFC2Plugin
package&com.xy.
import&java.io.IOE
import&java.io.PrintW
import&javax.servlet.http.HttpServletR
import&jofc2.model.C
import&mons.logging.L
import&mons.logging.LogF
import&org.apache.struts2.StrutsS
import&com.opensymphony.xwork2.ActionC
import&com.opensymphony.xwork2.ActionI
import&com.opensymphony.xwork2.R
import&com.opensymphony.xwork2.util.ValueS
public&class&OFC2Result implements&Result&{
&&&&private&static&final&long&serialVersionUID&=&9063964L;
&&&&private&static&final&Log&log&=&LogFactory.getLog(OFC2Result.class);
&&&&public&void&execute(ActionInvocation&invocation)&throws&Exception&{
&&&&&&&&ActionContext&actionContext&=&invocation.getInvocationContext();
&&&&&&&&HttpServletResponse&response&=&(HttpServletResponse)&actionContext
&&&&&&&&&&&&&&&&.get(StrutsStatics.HTTP_RESPONSE);
&&&&&&&&try&{
&&&&&&&&&&&&ValueStack&stack&=&invocation.getStack();
&&&&&&&&&&&&Chart&chart&=&(Chart)stack.findValue("ofcChart");
&&&&&&&&&&&&
&&&&&&&&&&&&response.setContentType("application/json-charset=utf-8");
&&&&&&&&&&&&response.setHeader("Cache-Control",&"no-cache");
&&&&&&&&&&&&response.setHeader("Expires",&"0");
&&&&&&&&&&&&response.setHeader("Pragma",&"No-cache");
&&&&&&&&&&&&
&&&&&&&&&&&&PrintWriter&out&=&response.getWriter();
&&&&&&&&&&&&log.debug(chart.toString());
&&&&&&&&&&&&out.print(chart.toString());
&&&&&&&&}&catch&(IOException&exception)&{
&&&&&&&&&&&&log.error(exception.getMessage(),&exception);
&&&&&&&&&&&&throw&
在src下新建struts-plugin.xml
&?xml&version="1.0"&encoding="UTF-8"&?&
&!DOCTYPE&struts&PUBLIC
&&&&&&&&"-//Apache&Software&Foundation//DTD&Struts&Configuration&2.0//EN"
&&&&&&&&"http://struts.apache.org/dtds/struts-2.0.dtd"&
&&&&&package&name="ofc2-default"&extends="struts-default"&
&&&&&&&&&result-types&
&&&&&&&&&&&&&result-type&name="ofc2"&class="com.xy.strutsplugin.OFC2Result"/&
&&&&&&&&&/result-types&
&&&&&/package&
配置log4j,以查看json输出信息。
在src下增加两个文件
commons-logging.properties
##&set&Log&as&Log4j
mons.logging.Log=mons.logging.impl.Log4JLogger
log4j.properties
#&This&is&the&configuring&for&logging&displayed&in&the&Application&Server
log4j.rootCategory=DEBUG,stdout
#stdout&configure
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=&%d&%p&[%c]&-&&%m&%n
.xy.strutsplugin.OFC2Result=DEBUG
好了,现在将ofc所需的包添加到项目中
在WebContent目录下添加文件夹ofc2,将open-flash-chart-2-Lug-Wyrm-Charmer目录下的open-flash-chart.swf和js目录复制到新建的ofc2目录下。
演示Line Chart
在Action层增加类LineAction
package&com.xy.
import&java.text.DateF
import&java.util.ArrayL
import&java.util.D
import&java.util.L
import&java.util.L
import&jofc2.model.C
import&jofc2.model.elements.LineC
import&jofc2.model.axis.YA
import&jofc2.model.T
import&com.opensymphony.xwork2.ActionS
public&class&LineAction&extends&ActionSupport{
&&&&private&static&final&long&serialVersionUID&=&-7732648L;
&&&&private&Chart&ofcC
&&&&public&Chart&getOfcChart()&{
&&&&&&&&return&ofcC
&&&&public&String&dot(){
&&&&&&&&List&LineChart.Dot&&data1=new&ArrayList&LineChart.Dot&()
&&&&&&&&&&&&&&&&,&data2=new&ArrayList&LineChart.Dot&()
&&&&&&&&&&&&&&&&,&data3=new&ArrayList&LineChart.Dot&();
&&&&&&&&for(double&i=0;i&6.2;i+=0.2){
&&&&&&&&&&&&//&line&1&dot
&&&&&&&&&&&&LineChart.Dot&dot1&=&new&LineChart.Dot(Math.sin(i)*1.9+10);
&&&&&&&&&&&&dot1.setDotSize(5);&&&&&&&&&&&&//&点大小
&&&&&&&&&&&&dot1.setColour("#f00000");&&&&//&设置点颜色
&&&&&&&&&&&&data1.add(dot1);
&&&&&&&&&&&&
&&&&&&&&&&&&//&line&2&dot
&&&&&&&&&&&&LineChart.Dot&dot2&=&new&LineChart.Dot(Math.sin(i)*1.9+7);
&&&&&&&&&&&&dot2.setDotSize(3);
&&&&&&&&&&&&dot2.setHaloSize(1);&&&&&&&&//&点外空白大小
&&&&&&&&&&&&dot2.setColour("#3D5C56");
&&&&&&&&&&&&data2.add(dot2);
&&&&&&&&&&&&
&&&&&&&&&&&&//&line&3&dot
&&&&&&&&&&&&LineChart.Dot&dot3&=&new&LineChart.Dot(Math.sin(i)*1.9+4);
&&&&&&&&&&&&dot3.setDotSize(4);
&&&&&&&&&&&&dot3.setHaloSize(2);
&&&&&&&&&&&&data3.add(dot3);
&&&&&&&&Date&date&=&new&Date();
&&&&&&&&Locale&locale&=&new&Locale("zh","CN");
&&&&&&&&DateFormat&dateFormat&=&DateFormat.getDateInstance(DateFormat.FULL,&locale);
&&&&&&&&//&line&1
&&&&&&&&LineChart&line1&=&new&LineChart();
&&&&&&&&line1.setDotStyle(new&LineChart.Style(LineChart.Style.Type.DOT));
&&&&&&&&line1.setWidth(1);&&&&&&&&&&&&//&线宽
&&&&&&&&line1.addDots(data1);&&&&&&&&//&增加数据
&&&&&&&&//&line&2
&&&&&&&&LineChart&line2&=&new&LineChart();
&&&&&&&&line2.setDotStyle(new&LineChart.Style(LineChart.Style.Type.DOT));
&&&&&&&&line2.setColour("#3D5C56");
&&&&&&&&line2.setWidth(2);
&&&&&&&&line2.addDots(data2);
&&&&&&&&//&line3
&&&&&&&&LineChart&line3&=&new&LineChart();
&&&&&&&&line3.setDotStyle(new&LineChart.Style(LineChart.Style.Type.DOT));
&&&&&&&&line3.setWidth(6);
&&&&&&&&line3.addDots(data3);
&&&&&&&&YAxis&y&=&new&YAxis();
&&&&&&&&y.setRange(0,&15,&5);&&&&&&&&//&设置Y柚范围,参数依次为最小值、最大值、间隔
&&&&&&&&ofcChart&=&new&Chart();
&&&&&&&&ofcChart.setTitle(new&Text(dateFormat.format(date)));&&&&//&设置标题
&&&&&&&&ofcChart.addElements(line1);&&&&&&&&&&&&&&&&&&&&&&&&&&&&//&增加线到图表
&&&&&&&&ofcChart.addElements(line2);
&&&&&&&&ofcChart.addElements(line3);
&&&&&&&&ofcChart.setYAxis(y);&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&//&设置Y柚
&&&&&&&&return&SUCCESS;
增加struts配置文件
&?xml&version="1.0"&encoding="UTF-8"?&
&!DOCTYPE&struts&PUBLIC
&&&&&&&&"-//Apache&Software&Foundation//DTD&Struts&Configuration&2.0//EN"
&&&&&&&&"http://struts.apache.org/dtds/struts-2.0.dtd"&
&&&&&package&name="ofc2"&extends="ofc2-default"&
&&&&&&&&action&name="line"&class="com.xy.action.LineAction"&
&&&&&&&&&&result&type="ofc2"/&
&&&&&&&&/action&
&&&&&/package&
在WebContent目录下增加line目录,目录下增加dot.html,对应官方示例Line Dot,dot.html内容如下:
&!DOCTYPE&html&PUBLIC&"-//W3C//DTD&HTML&4.01&Transitional//EN"&"http://www.w3.org/TR/html4/loose.dtd"&
&meta&http-equiv="Content-Type"&content="text/&charset=UTF-8"&
&title&Line&Dot&/title&
&script&type="text/javascript"&src="../jquery/jquery.js"&&/script&
&script&type="text/javascript"&src="../ofc2/js/swfobject.js"&&/script&
&script&type="text/javascript"&language="javascript"&
&&&&$(document).ready(function(){
&&&&&&&&swfobject.embedSWF("../ofc2/open-flash-chart.swf",&
&&&&&&&&&&&&&&&&&&&&"chart",&"550",&"300",&"9.0.0",
&&&&&&&&&&&&&&&&&&&&"expressInstall.swf",
&&&&&&&&&&&&&&&&&&&&{"data-file":"line!dot"});
&/script&&
&&&&&div&id="chart"&&/div&
这里用到了一点jquery的东西,请把jquery的包增加到相应目录下。
运行Tomcat,浏览器输入http://localhost:8080/OFC2Demo/line/dot.html,出下如下图表
很好 很牛逼
&re: 用Struts2生成Open Flash Chart 2图表数据
稳定吗 看是很不错 配合json应该不错&&&&
&re: 用Struts2生成Open Flash Chart 2图表数据
这与struts2没有关系吧&&&&
&re: 用Struts2生成Open Flash Chart 2图表数据
你好,我想问一下&&&&
&re: 用Struts2生成Open Flash Chart 2图表数据
line2.setDotStyle(new LineChart.Style(LineChart.Style.Type.DOT));
这一句代码是您自己写的吗?我看源代码里没有啊&&&&
&re: 用Struts2生成Open Flash Chart 2图表数据
老兄 那个数据不匹配的问题你怎么处理的哦,处理了吗&&&&
&re: 用Struts2生成Open Flash Chart 2图表数据
在把项目传上来的话会更好!~&&&&
&re: 用Struts2生成Open Flash Chart 2图表数据
OFC2Result 看着有些复杂上面让我用这个画些图表分析数据,nnd我们用的是velocity+springmvc 虽说都是mvc,但还是希望能找到一个用springmvc实现功能的例子,还是感谢博主了。&&&&
&re: 用Struts2生成Open Flash Chart 2图表数据
line2.setDotStyle(new LineChart.Style(LineChart.Style.Type.DOT));
这一句代码是您自己写的吗?我看源代码里没有啊&&&&78open-flash-chart2教程与实例
上亿文档资料,等你来发现
78open-flash-chart2教程与实例
open-flash-chart2教程与实例;2.0的版本数据格式完全用json来处理,非常灵;&html&;&head&;&scripttype=”text/jav;swfobject.embedSWF(;“open-flash-chart.swf”,“;“9.0.0″,“expressInstall.;{”data-file
 open-flash-chart2教程与实例2.0的版本数据格式完全用json来处理,非常灵活,官方提供了各种接口程序,包括PHP/PHP5、Pear、Python、Java、Dotnet,调用很简单&html&&head& &script type=”text/javascript” src=”js/swfobject.js”&&/script& &script type=”text/javascript”&swfobject.embedSWF(“open-flash-chart.swf”, “my_chart”, “550″, “200″,“9.0.0″, “expressInstall.swf”,{”data-file”:”data.txt”});&/script&&/head&&body&&p&Hello World&/p&&div id=”my_chart”&&/div&&/body&&/html&数据文件格式如下:{“y_legend”:{“text”:
“Time of day”,“style”: “{color: #736AFF;}”},“elements”:[{&type&:
&line&,&colour&:
&#736AFF&,&text&:
&Avg. wave height (cm)&,&font-size&: 10,&width&:
2,&dot-size&:
4,&halo-size&: 0,&values& :
[1.5,1.69,1.88,2.06,2.21,2.34,2.43,2.48,2.49,2.47,2.40,2.30,2.17,2.01,1.83,1.64,1.44,1.24,1.05,0.88,0.74,0.62,0.54,0.50,0.50,0.54,0.61,0.72,0.86,1.03,1.22,1.41,1.61,1.81,1.99,2.15,2.29,2.39,2.46,2.49,2.48,{&value&:2.44,&colour&:&#FF0000&,&tip&:&monkies&},2.35,2.23,2.08]}], “x_axis”:{“labels”: {“rotate”: “vertical”,“labels”:[&2:00am % ?,&2:10&,&2:20&,&2:30&,&2:40&,&2:50&,
&3:00am&,&3:10&,&3:20&,&3:30&,&3:40&,&3:50&,&4:00am&,&4:10&,&4:20&,&4:30&,&4:40&,&4:50&,&5:00am&,&5:10&,&5:20&,&5:30&,&5:40&,&5:50&,&6:00am&,&6:10&,&6:20&,&6:30&,&6:40&,&6:50&,&7:00am&,&7:10&,&7:20&,&7:30&,&7:40&,&7:50&,&8:00am&,&8:10&,&8:20&,&8:30&,&8:40&,&8:50&,&9:00am&,&9:10&,&9:20&]}},“y_axis”:{“max”:
3}}数据放在data.txt里,演示上一节提到open-flash-chart2的数据是通过存储在txt文件中,然后通过类似那个http://yoururl/chart.html?ofc=datafile.txt 这样的形式来加载不同的数据,当然ofc后面的参数可以是php文件,php类库的使用将在以后的教程中出现,本节将讨论使用js加载数据的另一种方法,代码如下:是&script type=&text/javascript& src=&js/json/json2.js&&&/script& &script type=&text/javascript& src=&js/swfobject.js&&&/script& &script type=&text/javascript&&swfobject.embedSWF(&open-flash-chart.swf&, &my_chart&, &350&, &200&, &9.0.0&);&/script&&script type=&text/javascript&&function ofc_ready(){alert('ofc_ready');}function open_flash_chart_data(){alert( 'reading data' );return JSON.stringify(data);}function findSWF(movieName) {if (navigator.appName.indexOf(&Microsoft&)!= -1) {return window[movieName];} else {return document[movieName];}} var data = {“elements”: [{&type&: &bar&,&text&: &u5317u4eac&,&values&: [9.9355,18.2142,12.1315,11.9911,10.2637,4.152,5.8293,17.8541,17.1762,25.2105,24.9323,23.5468,2.7642,3.9232,30.6192,17.9746,26.1273,14.5226,17.3219,5.0837,2.1281,18.9674,8.3799]}],“title”: {“text”: “0u552eu7edfu8ba1u56feu8868″},“y_axis”: {“min”: 0,“max”: 31,“steps”: 2},“x_axis”: {“labels”: {“labels”: [&01&,&02&,&03&,&04&,&05&,&06&,&07&,&08&,&09&,&10&,&11&,&12&,&13&,&14&,&15&,&16&,&17&,&18&,&19&,&20&,&21&,&22&,&23&]}},“y_legend”: {“text”: “ chart 1:10000″,“style”: “color:#736AEF; font-size:14”}};&/script&演示这种方式更适合数据实时加载,比如php中带查询表单,open-flash-chart2的用法很灵活,如果你是新手可能现在还是一头雾水,上面的json的格式各个参数将在下一节里做详细的解释。前面俩节讲了open flash chart的基本调用方法,下来开始我们来详细的通过实例来分析OFC的参数设置。首先今天要讲的是json数据格式所代表的意义,做了下简单的注释,英文不好的同学可以找翻译软件翻译一下官网的说明,这里只挑重要的来讲。#title参数{“title”:{“text”:
“Chart Demo”,“style”: “{font-size: 20 color:#0000 font-family: V text-align:}”}}title是非必选参数,title下有text和style俩个参数,相信不用多做解释大家都能明白是和什么意思,需要注意的是FLASH里的style所设置的CSS跟网页里不完全一样,详细的可以google搜索了解一下。#y_legend参数{“y_legend”:{“text”:”Chart Demo”,“style”:”{?}”}}y_legend也是可选参数,值y轴的说明#x_axis参数 x轴的设置{“x_axis”:{“stroke”:
1, // X轴线的宽度“tick-height”:
10,//刻度线高度值“colour”:
“#d000d0″,//线的颜色
“grid-colour”: “#00ff00″,//表格线颜色“labels”:
[&January,&February&,&March&,&April&,&May&,&June&,&July&,&August&,&Spetember&]//标签}}另外x_axis还有的参数:包含各类专业文献、应用写作文书、文学作品欣赏、各类资格考试、中学教育、幼儿教育、小学教育、专业论文、生活休闲娱乐、外语学习资料、78open-flash-chart2教程与实例等内容。 
  【】 
您可在本站搜索以下内容:
  open flash chart教程_IT/计算机_专业资料。OpenFlashchart开源网站 大家可浏览...-flash-chart-2/ 可以从这里下载你需要 的资料,在线介绍了几乎全部的效果例子...
s open flash chart 2 教程
23:42 2082 人阅读 评论(0) 收藏 ...quality=&high& 现在你打开这个页面的时候,会看到这样的内容:例子 1 它可能会...
  Flash教程-Flash+MTV-实例讲解制作全过程_IT/计算机_专业资料。[制作过程 制作过程] 制作过程 &一& 动画素材准备 要准备的素材包括 背景音乐、故事情节、动画...
q  原创教程---全Flash网站制作实例_IT/计算机_专业资料。原创教程---全 原创...att=&OpenQQ&&173q72s1&/item& &item att=&&&&/item& &item att=&...
s  Open Flash Chart引入项目(实例)_计算机软件及应用_IT/计算机_专业资料。Open ... open flash chart 2 教程... 6页 1下载券 open flash chart学习 s页 1...
  Flash MX2004入门与进阶实例――元件和实例 - 网页制作 - Flash教程 隐藏&& 第四章 元件和实例 第一节元件和实例的概念 1.元件(Symbol)我们先做个试验,请你...
  Flash实例教程-线描孔雀_英语学习_外语学习_教育专区。Flash 实例――线描孔雀 Flash 实例 ―― 线描孔雀 明月老师一、新建 Flash 文档,设置文档属性 1.启动 Flash...
  Flash教程-Flash+MTV-实例讲解制作全过程_计算机软件及应用_IT/计算机_专业资料...第 2 部分: ※歌词:好冷 雪已经积的那麽深 Merry X&#3q;mas to you ※情节:...
  JFreechart教程与实例_计算机软件及应用_IT/计算机_专业资料。以图形报表的形式...2.3 数据集合对象 在 JFreeChart 组件的图形报表技术应用中,绘制一个图表需要...
赞助商链接
别人正在看什么?
赞助商链接}

我要回帖

更多关于 openflashchart 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信