summaryrefslogtreecommitdiff
path: root/addons/base_graph/static/lib/dhtmlxGraph/samples/05_line_chart
diff options
context:
space:
mode:
authorKunal Chavda (OpenERP) <kch@tinyerp.com>2011-04-08 14:20:05 +0530
committerKunal Chavda (OpenERP) <kch@tinyerp.com>2011-04-08 14:20:05 +0530
commit20c75c45d8888e44b9b58b8ba67c6b5b2e8e7876 (patch)
tree6a3f8cbf50a611a2939f215fcf94133a66ba51fb /addons/base_graph/static/lib/dhtmlxGraph/samples/05_line_chart
parent8f9edb9a102af7cb401c59c21deff928e891c9de (diff)
[IMP]Initialy show bar chart with data.
bzr revid: kch@tinyerp.com-20110408085005-hv9jv2wcfopnxrgm
Diffstat (limited to 'addons/base_graph/static/lib/dhtmlxGraph/samples/05_line_chart')
-rw-r--r--addons/base_graph/static/lib/dhtmlxGraph/samples/05_line_chart/01_init.html55
-rw-r--r--addons/base_graph/static/lib/dhtmlxGraph/samples/05_line_chart/02_style.html153
-rw-r--r--addons/base_graph/static/lib/dhtmlxGraph/samples/05_line_chart/03_scale.html101
-rw-r--r--addons/base_graph/static/lib/dhtmlxGraph/samples/05_line_chart/04_spline.html57
-rw-r--r--addons/base_graph/static/lib/dhtmlxGraph/samples/05_line_chart/05_series.html94
5 files changed, 460 insertions, 0 deletions
diff --git a/addons/base_graph/static/lib/dhtmlxGraph/samples/05_line_chart/01_init.html b/addons/base_graph/static/lib/dhtmlxGraph/samples/05_line_chart/01_init.html
new file mode 100644
index 00000000000..626a1e216fe
--- /dev/null
+++ b/addons/base_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/base_graph/static/lib/dhtmlxGraph/samples/05_line_chart/02_style.html b/addons/base_graph/static/lib/dhtmlxGraph/samples/05_line_chart/02_style.html
new file mode 100644
index 00000000000..39dfe7eb41f
--- /dev/null
+++ b/addons/base_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/base_graph/static/lib/dhtmlxGraph/samples/05_line_chart/03_scale.html b/addons/base_graph/static/lib/dhtmlxGraph/samples/05_line_chart/03_scale.html
new file mode 100644
index 00000000000..161cbf7ee53
--- /dev/null
+++ b/addons/base_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/base_graph/static/lib/dhtmlxGraph/samples/05_line_chart/04_spline.html b/addons/base_graph/static/lib/dhtmlxGraph/samples/05_line_chart/04_spline.html
new file mode 100644
index 00000000000..4f266ee8983
--- /dev/null
+++ b/addons/base_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/base_graph/static/lib/dhtmlxGraph/samples/05_line_chart/05_series.html b/addons/base_graph/static/lib/dhtmlxGraph/samples/05_line_chart/05_series.html
new file mode 100644
index 00000000000..532cd385519
--- /dev/null
+++ b/addons/base_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>