1 | <html><head>
|
---|
2 | <meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
---|
3 |
|
---|
4 | </head>
|
---|
5 | <body>
|
---|
6 |
|
---|
7 | <script type="text/javascript" src="../js/swfobject.js"></script>
|
---|
8 |
|
---|
9 | <div id="my_chart"></div>
|
---|
10 |
|
---|
11 | <script type="text/javascript">
|
---|
12 |
|
---|
13 | var d = Date.parse("Jul 8, 2005")-Date.parse("Jul 9, 2005");
|
---|
14 | alert(d);
|
---|
15 |
|
---|
16 | var d = Date.parse("Jul 8, 2005");
|
---|
17 | alert(d);
|
---|
18 |
|
---|
19 | var d2 = Date.parse("Jul 8, 2006") - d;
|
---|
20 | alert(d2);
|
---|
21 | var so = new SWFObject("../actionscript/open-flash-chart.swf", "ofc", "300", "200", "9", "#FFFFFF");
|
---|
22 |
|
---|
23 |
|
---|
24 |
|
---|
25 | so.addVariable("variables","true");
|
---|
26 | so.addVariable("scatter","3,0x004040,Dataset1,10");
|
---|
27 | so.addVariable("y_min", "0");
|
---|
28 | so.addVariable("y_max", 200);
|
---|
29 | so.addVariable("x_min", d);
|
---|
30 | so.addVariable("x_max", d2);
|
---|
31 | so.addVariable("values","[" + (Date.parse("Jul 8, 2005")-d) + ",100,5],[" + ((Date.parse("Jul 8, 2005")+4)-d) + ",150,5]");
|
---|
32 | //so.addVariable("x_labels",Date.parse("Jul 8, 2005")+",x,y,z,"+Date.parse("Jul 8, 2006") );
|
---|
33 | so.addVariable("x_labels","Jul 8, 2005,x,y,z,Jul 8, 2006");
|
---|
34 | so.addVariable("x_axis_steps","86400000")&
|
---|
35 | so.addVariable("tool_tip","x:#x_label#<br>y:#val#");
|
---|
36 |
|
---|
37 | so.addParam("allowScriptAccess", "always" );//"sameDomain");
|
---|
38 | so.write("my_chart");
|
---|
39 | </script>
|
---|
40 |
|
---|
41 |
|
---|
42 | </body>
|
---|
43 | </html>
|
---|