<html> <head> <script type="text/javascript" src="js/swfobject.js"></script> <script type="text/javascript"> swfobject.embedSWF("open-flash-chart.swf", "my_chart", "250", "200", "9.0.0"); </script> </head> <body> <p>Hello World</p> <div id="my_chart"></div> </body> </html> |
{ "title":{ "text": "Many data lines", "style": "{font-size: 20px; color:#0000ff; font-family: Verdana; text-align: center;}" }, "y_legend":{ "text": "Open Flash Chart", "style": "{color: #736AFF; font-size: 12px;}" }, "elements":[ { "type": "bar", "alpha": 0.5, "colour": "#9933CC", "text": "Page views", "font-size": 10, "values" : [9,6,7,9,5,7,6,9,7] }, { "type": "bar", "alpha": 0.5, "colour": "#CC9933", "text": "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": ["January","February","March","April","May", "June","July","August","Spetember"] }, "y_axis":{ "stroke": 4, "tick_length": 3, "colour": "#d000d0", "grid_colour": "#00ff00", "offset": 0, "max": 20 } } |
OleFrame oleFrame = new OleFrame(shell, SWT.NONE); oleFrame.setLayoutData(new GridData(GridData.FILL_BOTH)); OleControlSite controlSite = new OleControlSite(oleFrame, SWT.NONE, "ShockwaveFlash.ShockwaveFlash"); controlSite.doVerb(OLE.OLEIVERB_SHOW); //定義爲顯示控件 |
final OleAutomation automation = new OleAutomation(controlSite); int[] methodIDs = automation.getIDsOfNames(new String[] { "LoadMovie" }); |
Variant[] methodArgs = { new Variant(0), new Variant(file+"?data-file=jsonfile.txt ") }; automation.invoke(methodIDs[0], methodArgs); |
public JSONValue buildJSON() { JSONObject json = new JSONObject(); if (stroke != null) json.getValue().put( "stroke", new JSONInteger(BigInteger.valueOf(stroke))); if (colour != null) json.getValue().put("colour", new JSONString(colour)); if (gridColour != null) json.getValue().put("grid-colour", new JSONString(gridColour)); if (steps != null) json.getValue().put("steps", new JSONInteger(BigInteger.valueOf(steps))); if (offset != null) json.getValue().put("offset", new JSONInteger(BigInteger.valueOf(offset))); if (zdepth3d != null) json.getValue().put("3d", new JSONInteger(BigInteger.valueOf(zdepth3d))); if (min != null) json.getValue().put("min", new JSONInteger(BigInteger.valueOf(min))); if (max != null) json.getValue().put("max", new JSONInteger(BigInteger.valueOf(max))); return json; } |
Name | License | Latest Version | OSSC Review Level 1 in IBM |
JFreeChart | LGPL | 1.0.11 | No |
BIRT Chart | Eclipse Public License 1.0 | 2.3.1 | Yes |
Open Flash Chart | LGPL | 2 | No |