summaryrefslogtreecommitdiff
path: root/addons/web_graph/static/lib/dhtmlxGraph/samples/04_pie_chart
diff options
context:
space:
mode:
authorAntony Lesuisse <al@openerp.com>2011-09-05 13:03:09 +0200
committerAntony Lesuisse <al@openerp.com>2011-09-05 13:03:09 +0200
commitbedfc48dcfb066e61209337235e339975dd093d0 (patch)
treefd1bab7b9f21380f1aa3ca7675018f13b4d9e652 /addons/web_graph/static/lib/dhtmlxGraph/samples/04_pie_chart
parent272424894a91aa136952cf88ef206afab5b5505c (diff)
rename base into web part1
bzr revid: al@openerp.com-20110905110309-egx167t1ni1fzho1
Diffstat (limited to 'addons/web_graph/static/lib/dhtmlxGraph/samples/04_pie_chart')
-rw-r--r--addons/web_graph/static/lib/dhtmlxGraph/samples/04_pie_chart/01_init.html67
-rw-r--r--addons/web_graph/static/lib/dhtmlxGraph/samples/04_pie_chart/02_text.html52
-rw-r--r--addons/web_graph/static/lib/dhtmlxGraph/samples/04_pie_chart/03_3d_chart.html48
-rw-r--r--addons/web_graph/static/lib/dhtmlxGraph/samples/04_pie_chart/04_legend.html81
4 files changed, 248 insertions, 0 deletions
diff --git a/addons/web_graph/static/lib/dhtmlxGraph/samples/04_pie_chart/01_init.html b/addons/web_graph/static/lib/dhtmlxGraph/samples/04_pie_chart/01_init.html
new file mode 100644
index 00000000000..63c82ecf42c
--- /dev/null
+++ b/addons/web_graph/static/lib/dhtmlxGraph/samples/04_pie_chart/01_init.html
@@ -0,0 +1,67 @@
+<!--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:"6300", company:"Company 1",color:"#d2ed7e" },
+ { sales:"8700", company:"Company 2",color:"#b3e025" },
+ { sales:"10500", company:"Company 3",color:"#9ac86d" },
+ { sales:"7800", company:"Company 4",color:"#e0e56c" }
+ ];
+
+ window.onload = function(){
+ var chart = new dhtmlXChart({
+ view:"pie",
+ container:"chart1",
+ value:"#sales#",
+ color:"#color#",
+ label:"#company#",
+ pieInnerText:"<b>#sales#</b>",
+ gradient:true
+ });
+ chart.parse(data,"json");
+
+
+ var chart2 = new dhtmlXChart({
+ view:"pie",
+ container:"chart2",
+ value:"#sales#",
+ color:"#color#",
+ label:"#company#",
+ pieInnerText:"<b>#sales#</b>",
+ gradient:true,
+ radius:90,
+ x:280,
+ y:150
+ });
+ chart2.parse(data,"json");
+ }
+ </script>
+</head>
+<body >
+ <table>
+ <tr>
+ <td>Pie chart with Automatic radius and center position</td>
+ <td>Pie chart with Custom radius and center position</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/04_pie_chart/02_text.html b/addons/web_graph/static/lib/dhtmlxGraph/samples/04_pie_chart/02_text.html
new file mode 100644
index 00000000000..7ba118f19e2
--- /dev/null
+++ b/addons/web_graph/static/lib/dhtmlxGraph/samples/04_pie_chart/02_text.html
@@ -0,0 +1,52 @@
+<!--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>Labels</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:"10.7", 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 pieChart = new dhtmlXChart({
+ view:"pie",
+ container:"chart",
+ value:"#sales#",
+ pieInnerText:"#sales#",
+ label:"#year#"
+ });
+ pieChart.parse(data,"json");
+ }
+ </script>
+</head>
+<body >
+ <p>There are two properties to define sectors labels:
+ <li>label - defines text outside sectors</li>
+ <li>pieInnerText - set text inside sectors</li>
+ </p>
+
+ <div id="chart" style="width:450px;height:300px;"></div></td>
+
+
+
+</body>
+</html>
diff --git a/addons/web_graph/static/lib/dhtmlxGraph/samples/04_pie_chart/03_3d_chart.html b/addons/web_graph/static/lib/dhtmlxGraph/samples/04_pie_chart/03_3d_chart.html
new file mode 100644
index 00000000000..957f7ed7954
--- /dev/null
+++ b/addons/web_graph/static/lib/dhtmlxGraph/samples/04_pie_chart/03_3d_chart.html
@@ -0,0 +1,48 @@
+<!--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>3D view</title>
+ <script src="../../codebase/dhtmlxchart.js" type="text/javascript"></script>
+ <link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxchart.css">
+ <script>
+ var data = [
+ { sales:"10.5", component:"dhxGrid",color:"#c7e1f3" },
+ { sales:"8.7", component:"dhxScheduler",color:"#45abf5" },
+ { sales:"6.3", component:"dhxTree",color:"#3590d0" },
+ { sales:"5.3", component:"dhxTabbar",color:"#BDDBF9" },
+ { sales:"4.5", component:"dhxLayout",color:"#d9e5ed" },
+ { sales:"4.2", component:"dhxMenu",color:"#aed7f4" }
+ ];
+
+ window.onload = function(){
+ var chart = new dhtmlXChart({
+ view:"pie3D",
+ container:"chart",
+ value:"#sales#",
+ label:function(obj){
+ var sum = chart.sum("#sales#");
+ return obj.component+" ("+Math.round(parseFloat(obj.sales)/sum*100)+"%)";
+ },
+ color:"#color#",
+ radius:110
+ });
+ chart.parse(data,"json");
+ }
+
+ </script>
+</head>
+<body>
+ <div id="chart" style="width:500px;height:300px;border:1px solid #A4BED4;"></div></td>
+
+
+
+</body>
+</html>
diff --git a/addons/web_graph/static/lib/dhtmlxGraph/samples/04_pie_chart/04_legend.html b/addons/web_graph/static/lib/dhtmlxGraph/samples/04_pie_chart/04_legend.html
new file mode 100644
index 00000000000..2d5c45c0151
--- /dev/null
+++ b/addons/web_graph/static/lib/dhtmlxGraph/samples/04_pie_chart/04_legend.html
@@ -0,0 +1,81 @@
+<!--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>Details Block</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 pieChart = new dhtmlXChart({
+ view:"pie",
+ container:"chart1",
+ value:"#sales#",
+ pieInnerText:"#sales#",
+ gradient:true,
+ tooltip:{
+ template:"#sales#"
+ },
+ legend:"#year#"
+ });
+ pieChart.parse(data,"json");
+
+
+ var pieChart2 = new dhtmlXChart({
+ view:"pie",
+ container:"chart2",
+ value:"#sales#",
+ pieInnerText:"#sales#",
+ gradient:true,
+ legend:{
+ width: 75,
+ align:"right",
+ valign:"middle",
+ marker:{
+ type:"round",
+ width:15
+ },
+ template:"#year#"
+ }
+ });
+ pieChart2.parse(data,"json");
+ }
+ </script>
+</head>
+<body>
+ <p>Pie Chart provides property "details" that displayes informationa about all sectors in a separate block.</p>
+
+ <table>
+ <tr>
+ <td>PieChart with default details block</td>
+ <td>PieChart with custom details block</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>