diff options
| author | Antony Lesuisse <al@openerp.com> | 2011-09-05 13:03:09 +0200 |
|---|---|---|
| committer | Antony Lesuisse <al@openerp.com> | 2011-09-05 13:03:09 +0200 |
| commit | bedfc48dcfb066e61209337235e339975dd093d0 (patch) | |
| tree | fd1bab7b9f21380f1aa3ca7675018f13b4d9e652 /addons/web_graph/static/lib/dhtmlxGraph/samples/05_line_chart | |
| parent | 272424894a91aa136952cf88ef206afab5b5505c (diff) | |
rename base into web part1
bzr revid: al@openerp.com-20110905110309-egx167t1ni1fzho1
Diffstat (limited to 'addons/web_graph/static/lib/dhtmlxGraph/samples/05_line_chart')
5 files changed, 460 insertions, 0 deletions
diff --git a/addons/web_graph/static/lib/dhtmlxGraph/samples/05_line_chart/01_init.html b/addons/web_graph/static/lib/dhtmlxGraph/samples/05_line_chart/01_init.html new file mode 100644 index 00000000000..626a1e216fe --- /dev/null +++ b/addons/web_graph/static/lib/dhtmlxGraph/samples/05_line_chart/01_init.html @@ -0,0 +1,55 @@ +<!--conf
+<sample>
+ <product version="2.6" edition="std"/>
+ <modifications>
+ <modified date="100609"/>
+ </modifications>
+ </sample>
+ -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+ <title>Initialization</title>
+ <script src="../../codebase/dhtmlxchart.js" type="text/javascript"></script>
+ <link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxchart.css">
+ <script>
+ var data = [
+ { sales:"3.0", year:"2000" },
+ { sales:"3.8", year:"2001" },
+ { sales:"3.4", year:"2002" },
+ { sales:"4.1", year:"2003" },
+ { sales:"4.3", year:"2004" },
+ { sales:"9.9", year:"2005" },
+ { sales:"7.4", year:"2006" },
+ { sales:"9.0", year:"2007" },
+ { sales:"7.3", year:"2008" },
+ { sales:"4.8", year:"2009" }
+ ];
+
+ window.onload = function(){
+ var chart = new dhtmlXChart({
+ view:"line",
+ container:"chart",
+ value:"#sales#",
+ label:"#year#",
+ tooltip:{
+ template:"#sales#"
+ },
+ item:{
+ borderColor: "#ffffff",
+ color: "#000000"
+ },
+ line:{
+ color:"#ff9900",
+ width:3
+ }
+ })
+ chart.parse(data,"json");
+ }
+ </script>
+</head>
+<body>
+ <div id="chart" style="width:450px;height:300px;border:1px solid #A4BED4;"></div></td>
+</body>
+</html>
+
diff --git a/addons/web_graph/static/lib/dhtmlxGraph/samples/05_line_chart/02_style.html b/addons/web_graph/static/lib/dhtmlxGraph/samples/05_line_chart/02_style.html new file mode 100644 index 00000000000..39dfe7eb41f --- /dev/null +++ b/addons/web_graph/static/lib/dhtmlxGraph/samples/05_line_chart/02_style.html @@ -0,0 +1,153 @@ +<!--conf
+<sample>
+ <product version="2.6" edition="std"/>
+ <modifications>
+ <modified date="100609"/>
+ </modifications>
+ </sample>
+ -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+ <title>Style definition</title>
+ <script src="../../codebase/dhtmlxchart.js" type="text/javascript"></script>
+ <link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxchart.css">
+ <script>
+ window.onload = function(){
+ var data = [
+ { sales:"3.0", year:"2000" },
+ { sales:"3.8", year:"2001" },
+ { sales:"3.4", year:"2002" },
+ { sales:"4.1", year:"2003" },
+ { sales:"4.3", year:"2004" },
+ { sales:"9.9", year:"2005" },
+ { sales:"7.4", year:"2006" },
+ { sales:"9.0", year:"2007" },
+ { sales:"7.3", year:"2008" },
+ { sales:"4.8", year:"2009" }
+ ];
+
+ var chart1 = new dhtmlXChart({
+ view:"line",
+ container:"chart1",
+ value:"#sales#",
+ label:"#year#",
+ tooltip:{
+ template:"#sales#"
+ },
+ item:{
+ borderColor: "#ffffff",
+ color: "#000000"
+ },
+ line:{
+ color:"#ff9900",
+ width:3
+ }
+ })
+ chart1.parse(data,"json");
+
+ var chart2 = new dhtmlXChart({
+ view:"line",
+ container:"chart2",
+ value:"#sales#",
+ label:"#year#",
+ tooltip:{
+ template:"#sales#"
+ },
+ item:{
+ borderColor: "#3399ff",
+ color: "#ffffff"
+ },
+ line:{
+ color:"#3399ff",
+ width:3
+ }
+ })
+ chart2.parse(data,"json");
+
+ var data2 = [
+ { sales:"1.2", year:"2000" },
+ { sales:"2.4", year:"2001" },
+ { sales:"3.4", year:"2002" },
+ { sales:"4.1", year:"2003" },
+ { sales:"4.3", year:"2004" },
+ { sales:"5.9", year:"2005" },
+ { sales:"6.5", year:"2006" },
+ { sales:"6.1", year:"2007" },
+ { sales:"6.0", year:"2008" },
+ { sales:"6.2", year:"2009" }
+ ];
+ var chart3 = new dhtmlXChart({
+ view:"line",
+ container:"chart3",
+ value:"#sales#",
+ item:{
+ radius:0
+ },
+ line:{
+ color:"#b25151",
+ width:3
+ },
+ xAxis:{
+ title:"Years",
+ template:"#year#",
+ lines:true
+ },
+ yAxis:{
+ start: 0,
+ end: 10,
+ step: 1,
+ title:"Sales, mil"
+ },
+ tooltip:{
+ template:"#year#"
+ }
+ })
+ chart3.parse(data2,"json");
+
+ var chart4 = new dhtmlXChart({
+ view:"line",
+ container:"chart4",
+ value:"#sales#",
+ item:{
+ borderColor: "#000000",
+ color: "#ffffff",
+ borderWidth:1,
+ radius:3
+ },
+ line:{
+ color:"#3399ff",
+ width:3
+ },
+ xAxis:{
+ title:"Years",
+ template:"#year#"
+ },
+ yAxis:{
+ start: 0,
+ end: 10,
+ step: 1,
+ title:"Sales, mil",
+ lines:false
+ },
+ tooltip:{
+ template:"#year#"
+ }
+ })
+ chart4.parse(data2,"json");
+ }
+ </script>
+</head>
+<body >
+ <table>
+ <tr>
+ <td><div id="chart1" style="width:450px;height:300px;border:1px solid #A4BED4;"></div></td>
+ <td><div id="chart2" style="width:450px;height:300px;border:1px solid #A4BED4;"></div></td>
+ </tr>
+ <tr>
+ <td><div id="chart3" style="width:450px;height:300px;border:1px solid #A4BED4;"></div></td>
+ <td><div id="chart4" style="width:450px;height:300px;border:1px solid #A4BED4;"></div></td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/addons/web_graph/static/lib/dhtmlxGraph/samples/05_line_chart/03_scale.html b/addons/web_graph/static/lib/dhtmlxGraph/samples/05_line_chart/03_scale.html new file mode 100644 index 00000000000..161cbf7ee53 --- /dev/null +++ b/addons/web_graph/static/lib/dhtmlxGraph/samples/05_line_chart/03_scale.html @@ -0,0 +1,101 @@ +<!--conf
+<sample>
+ <product version="2.6" edition="std"/>
+ <modifications>
+ <modified date="100609"/>
+ </modifications>
+ </sample>
+ -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+ <title>Scales</title>
+ <script src="../../codebase/dhtmlxchart.js" type="text/javascript"></script>
+ <link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxchart.css">
+ <script>
+ var data = [
+ { sales:"3.0", year:"2000" },
+ { sales:"3.8", year:"2001" },
+ { sales:"3.4", year:"2002" },
+ { sales:"4.1", year:"2003" },
+ { sales:"4.3", year:"2004" },
+ { sales:"9.9", year:"2005" },
+ { sales:"7.4", year:"2006" },
+ { sales:"9.0", year:"2007" },
+ { sales:"7.3", year:"2008" },
+ { sales:"4.8", year:"2009" }
+ ];
+
+ window.onload = function(){
+ var chart1 = new dhtmlXChart({
+ view:"line",
+ container:"chart1",
+ value:"#sales#",
+ label:"#sales#",
+ tooltip:{
+ template:"#sales#"
+ },
+ item:{
+ borderColor: "#ffffff",
+ color: "#000000"
+ },
+ line:{
+ color:"#ff9900",
+ width:3
+ },
+ yAxis:{},
+ xAxis:{
+ title:"Years",
+ template:"#year#"
+ }
+ })
+ chart1.parse(data,"json");
+
+ var chart2 = new dhtmlXChart({
+ view:"line",
+ container:"chart2",
+ value:"#sales#",
+ tooltip:{
+ template:"#sales#"
+ },
+ item:{
+ borderColor: "#3399ff",
+ color: "#ffffff"
+ },
+ line:{
+ color:"#3399ff",
+ width:3
+ },
+ xAxis:{
+ title:"Years",
+ template:"#year#"
+ },
+ yAxis:{
+ start:0,
+ end:10,
+ step:1,
+ title:"Sales, million"
+ },
+ item:{
+ borderColor: "#3399ff",
+ color: "#ffffff"
+ }
+ })
+ chart2.parse(data,"json");
+ }
+ </script>
+</head>
+<body >
+ <table>
+ <tr>
+ <td>Automatic vertical scale</td>
+ <td>Custom vertical scale</td>
+ </tr>
+ <tr>
+ <td><div id="chart1" style="width:450px;height:300px;border:1px solid #A4BED4;"></div></td>
+ <td><div id="chart2" style="width:450px;height:300px;border:1px solid #A4BED4;"></div></td>
+ </tr>
+ </table>
+</body>
+</html>
+
diff --git a/addons/web_graph/static/lib/dhtmlxGraph/samples/05_line_chart/04_spline.html b/addons/web_graph/static/lib/dhtmlxGraph/samples/05_line_chart/04_spline.html new file mode 100644 index 00000000000..4f266ee8983 --- /dev/null +++ b/addons/web_graph/static/lib/dhtmlxGraph/samples/05_line_chart/04_spline.html @@ -0,0 +1,57 @@ +<!--conf
+<sample>
+ <product version="2.6" edition="std"/>
+ <modifications>
+ <modified date="100609"/>
+ </modifications>
+ </sample>
+ -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+ <title>Initialization</title>
+ <script src="../../codebase/dhtmlxchart.js" type="text/javascript"></script>
+ <link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxchart.css">
+ <script>
+ var data = [
+ { sales:"3.0", year:"2000" },
+ { sales:"3.8", year:"2001" },
+ { sales:"3.4", year:"2002" },
+ { sales:"4.1", year:"2003" },
+ { sales:"4.3", year:"2004" },
+ { sales:"9.9", year:"2005" },
+ { sales:"7.4", year:"2006" },
+ { sales:"9.0", year:"2007" },
+ { sales:"7.3", year:"2008" },
+ { sales:"4.8", year:"2009" }
+ ];
+
+ window.onload = function(){
+ var chart = new dhtmlXChart({
+ view:"spline",
+ container:"chart",
+ value:"#sales#",
+ label:"#year#",
+ tooltip:{
+ template:"#sales#"
+ },
+ item:{
+ borderColor: "#ffffff",
+ color: "#000000"
+ },
+ line:{
+ color:"#ff9900",
+ width:3
+ },
+ padding:{
+ left:15
+ }
+ })
+ chart.parse(data,"json");
+ }
+ </script>
+</head>
+<body>
+ <div id="chart" style="width:450px;height:300px;border:1px solid #A4BED4;"></div></td>
+</body>
+</html>
diff --git a/addons/web_graph/static/lib/dhtmlxGraph/samples/05_line_chart/05_series.html b/addons/web_graph/static/lib/dhtmlxGraph/samples/05_line_chart/05_series.html new file mode 100644 index 00000000000..532cd385519 --- /dev/null +++ b/addons/web_graph/static/lib/dhtmlxGraph/samples/05_line_chart/05_series.html @@ -0,0 +1,94 @@ +<!--conf
+<sample>
+ <product version="2.6" edition="std"/>
+ <modifications>
+ <modified date="100609"/>
+ </modifications>
+ </sample>
+ -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+ <title>Scales</title>
+ <script src="../../codebase/dhtmlxchart.js" type="text/javascript"></script>
+ <link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxchart.css">
+ <script>
+ var data = [
+ { "companyA":"-1.9", "companyB":1, year:"2000" },
+ { "companyA":"-0.8", "companyB":0.8, year:"2001" },
+ { "companyA":"3.4", "companyB":1.9, year:"2002" },
+ { "companyA":"4.1", "companyB":2.5, year:"2003" },
+ { "companyA":"4.3", "companyB":3.1, year:"2004" },
+ { "companyA":"5.9", "companyB":4.5, year:"2005" },
+ { "companyA":"6.1", "companyB":5.7, year:"2006" },
+ { "companyA":"6.5", "companyB":7.2, year:"2007" },
+ { "companyA":"5.2", "companyB":6.5, year:"2008" },
+ { "companyA":"4.8", "companyB":6.8, year:"2009" }
+ ];
+
+ window.onload = function(){
+ var chart1 = new dhtmlXChart({
+ view:"line",
+ container:"chart1",
+ value:"#companyA#",
+ item:{
+ borderColor: "#3399ff",
+ color: "#ffffff"
+ },
+ line:{
+ color:"#3399ff",
+ width:3
+ },
+ xAxis:{
+ template:"#year#"
+ },
+ yAxis:{
+ start:-2,
+ step:1,
+ end:8
+ },
+ padding:{
+ left:35,
+ bottom:20
+ },
+ origin:0,
+ legend:{
+ layout:"x",
+ width: 75,
+ align:"center",
+ valign:"bottom",
+ marker:{
+ type:"round",
+ width:15
+ },
+ values:[
+ {text:"company A",color:"#3399ff"},
+ {text:"company B",color:"#66cc00"}
+ ]
+ }
+ })
+
+
+ chart1.addSeries({
+ value:"#companyB#",
+ item:{
+ borderColor: "#66cc00",
+ color: "#ffffff"
+ },
+ line:{
+ color:"#66cc00",
+ width:3
+ }
+ })
+ chart1.parse(data,"json");
+ }
+ </script>
+</head>
+<body >
+ <table>
+ <tr>
+ <td><div id="chart1" style="width:500px;height:300px;border:1px solid #A4BED4;"></div></td>
+ </tr>
+ </table>
+</body>
+</html>
|
