diff options
| author | Kunal Chavda (OpenERP) <kch@tinyerp.com> | 2011-04-08 14:20:05 +0530 |
|---|---|---|
| committer | Kunal Chavda (OpenERP) <kch@tinyerp.com> | 2011-04-08 14:20:05 +0530 |
| commit | 20c75c45d8888e44b9b58b8ba67c6b5b2e8e7876 (patch) | |
| tree | 6a3f8cbf50a611a2939f215fcf94133a66ba51fb /addons/base_graph/static/lib/dhtmlxGraph/samples/04_pie_chart | |
| parent | 8f9edb9a102af7cb401c59c21deff928e891c9de (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/04_pie_chart')
4 files changed, 248 insertions, 0 deletions
diff --git a/addons/base_graph/static/lib/dhtmlxGraph/samples/04_pie_chart/01_init.html b/addons/base_graph/static/lib/dhtmlxGraph/samples/04_pie_chart/01_init.html new file mode 100644 index 00000000000..63c82ecf42c --- /dev/null +++ b/addons/base_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/base_graph/static/lib/dhtmlxGraph/samples/04_pie_chart/02_text.html b/addons/base_graph/static/lib/dhtmlxGraph/samples/04_pie_chart/02_text.html new file mode 100644 index 00000000000..7ba118f19e2 --- /dev/null +++ b/addons/base_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/base_graph/static/lib/dhtmlxGraph/samples/04_pie_chart/03_3d_chart.html b/addons/base_graph/static/lib/dhtmlxGraph/samples/04_pie_chart/03_3d_chart.html new file mode 100644 index 00000000000..957f7ed7954 --- /dev/null +++ b/addons/base_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/base_graph/static/lib/dhtmlxGraph/samples/04_pie_chart/04_legend.html b/addons/base_graph/static/lib/dhtmlxGraph/samples/04_pie_chart/04_legend.html new file mode 100644 index 00000000000..2d5c45c0151 --- /dev/null +++ b/addons/base_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>
|
