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/06_bar_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/06_bar_chart')
8 files changed, 823 insertions, 0 deletions
diff --git a/addons/base_graph/static/lib/dhtmlxGraph/samples/06_bar_chart/01_init.html b/addons/base_graph/static/lib/dhtmlxGraph/samples/06_bar_chart/01_init.html new file mode 100644 index 00000000000..e31ae20dd39 --- /dev/null +++ b/addons/base_graph/static/lib/dhtmlxGraph/samples/06_bar_chart/01_init.html @@ -0,0 +1,74 @@ +<!--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>PieChart: Initiazation</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 barChart1 = new dhtmlXChart({
+ view:"bar",
+ container:"chart1",
+ value:"#sales#",
+ label:"#year#",
+ width:30,
+ gradient:true,
+ border:false
+ })
+ barChart1.parse(data,"json");
+
+ var barChart2 = new dhtmlXChart({
+ view:"bar",
+ container:"chart2",
+ value:"#sales#",
+ label:"#sales#",
+ color:"#66ccff",
+ gradient:"3d",
+ //border:false,
+ width:25,
+ padding:{
+ bottom:0,
+ right:50,
+ left:50
+ }
+ });
+ barChart2.parse(data,"json");
+ }
+ </script>
+</head>
+<body >
+ <h1>BarChart: Initiazation</h1>
+
+ <table>
+ <tr>
+ <td></td>
+ <td></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/06_bar_chart/02_text.html b/addons/base_graph/static/lib/dhtmlxGraph/samples/06_bar_chart/02_text.html new file mode 100644 index 00000000000..ee378b194f1 --- /dev/null +++ b/addons/base_graph/static/lib/dhtmlxGraph/samples/06_bar_chart/02_text.html @@ -0,0 +1,80 @@ +<!--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>PieChart: Initiazation</title>
+ <script src="../../codebase/dhtmlxchart.js" type="text/javascript"></script>
+ <link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxchart.css">
+</head>
+<body >
+ <h1>BarChart: Initiazation</h1>
+
+ <table>
+ <tr>
+ <td></td>
+ <td></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>
+
+
+ <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" }
+ ];
+
+
+ var barChart1 = new dhtmlXChart({
+ view:"bar",
+ container:"chart1",
+ value:"#sales#",
+ label:"#sales#",
+ color:"#66cc33",
+ width:50,
+ tooltip:{
+ template:"#sales#"
+ },
+ xAxis:{
+ title:"Sales per year",
+ template:"#year#"
+ }
+ })
+ barChart1.parse(data,"json");
+
+ var barChart2 = new dhtmlXChart({
+ view:"bar",
+ container:"chart2",
+ value:"#sales#",
+ label:"#sales#",
+ tooltip:{
+ template:"#sales#"
+ },
+ xAxis:{
+ title:"Years",
+ template:"#year#"
+ }
+ });
+ barChart2.parse(data,"json");
+
+ </script>
+</body>
+</html>
diff --git a/addons/base_graph/static/lib/dhtmlxGraph/samples/06_bar_chart/03_scales.html b/addons/base_graph/static/lib/dhtmlxGraph/samples/06_bar_chart/03_scales.html new file mode 100644 index 00000000000..edc1f6ca45d --- /dev/null +++ b/addons/base_graph/static/lib/dhtmlxGraph/samples/06_bar_chart/03_scales.html @@ -0,0 +1,99 @@ +<!--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>PieChart: Initiazation</title>
+ <script src="../../codebase/dhtmlxchart.js" type="text/javascript"></script>
+ <link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxchart.css">
+</head>
+<body >
+ <h1>BarChart: Scales</h1>
+
+ <table>
+ <tr>
+ <td>Custom vertical scale and origin</td>
+ <td>Automatic 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>
+
+
+ <script>
+ var data = [
+ { sales:"-2.0", year:"2000" },
+ { sales:"-0.4", year:"2001" },
+ { sales:"1.1", year:"2002" },
+ { sales:"3.3", year:"2003" },
+ { sales:"1.2", year:"2004" },
+ { sales:"1.8", year:"2005" },
+ { sales:"4.1", year:"2006" },
+ { sales:"5.5", year:"2007" },
+ { sales:"3.5", year:"2008" },
+ { sales:"1.8", year:"2009" }
+ ];
+
+
+
+
+ var barChart1 = new dhtmlXChart({
+ view:"bar",
+ container:"chart1",
+ value:"#sales#",
+ width:30,
+ tooltip:{
+ template:"#sales#"
+ },
+ xAxis:{
+ template:"#year#",
+ title:"Year"
+ },
+
+ yAxis:{
+ start:-3,
+ end:7,
+ step:1,
+ title:"Profit"
+ },
+ origin:0,
+ gradient:true,
+ border:false
+ })
+ barChart1.parse(data,"json");
+
+
+
+
+ var barChart2 = new dhtmlXChart({
+ view:"bar",
+ container:"chart2",
+ value:"#sales#",
+ gradient:true,
+ border:false,
+ width:30,
+ tooltip:{
+ template:"#sales#"
+ },
+ xAxis:{
+ template:"#year#",
+ title:"Year"
+ },
+ yAxis:{
+ title:"Profit"
+ }
+
+ });
+ barChart2.parse(data,"json");
+
+ </script>
+</body>
+</html>
diff --git a/addons/base_graph/static/lib/dhtmlxGraph/samples/06_bar_chart/04_styles.html b/addons/base_graph/static/lib/dhtmlxGraph/samples/06_bar_chart/04_styles.html new file mode 100644 index 00000000000..0877a95de16 --- /dev/null +++ b/addons/base_graph/static/lib/dhtmlxGraph/samples/06_bar_chart/04_styles.html @@ -0,0 +1,207 @@ +<!--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>Chart</title>
+ <script src="../../codebase/dhtmlxchart.js" type="text/javascript"></script>
+ <link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxchart.css">
+</head>
+<body >
+ <h1>Chart</h1>
+ <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>
+ <td><div id="chart3" style="width:450px;height:300px;border:1px solid #A4BED4;"></div></td>
+ </tr>
+ <tr>
+
+
+ </tr>
+ <tr>
+ <td><div id="chart4" style="width:450px;height:300px;border:1px solid #A4BED4;"></div></td>
+ <td><div id="chart5" style="width:450px;height:300px;border:1px solid #A4BED4;"></div></td>
+ <td><div id="chart6" style="width:450px;height:300px;border:1px solid #A4BED4;"></div></td>
+ </tr>
+ </table>
+
+ <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" }
+ ];
+
+
+ var barChart1 = new dhtmlXChart({
+ view:"bar",
+ alpha:function(data){
+ return data.sales/10;
+ },
+ container:"chart1",
+ value:"#sales#",
+ label:"#sales#",
+ color:"#66cc33",
+ width:50,
+ tooltip:{
+ template:"#sales#"
+ },
+ xAxis:{
+ title:"Sales per year",
+ template:"#year#"
+ },
+ yAxis:{
+ start:0,
+ end:10,
+ step:1,
+ title:"Sales, million"
+ }
+ })
+ barChart1.parse(data,"json");
+
+ var barChart2 = new dhtmlXChart({
+ view:"bar",
+ container:"chart2",
+ value:"#sales#",
+ label:"#sales#",
+ width:2,
+ border:false,
+
+ tooltip:{
+ template:"#sales#"
+ },
+ xAxis:{
+ title:"Years",
+ template:"#year#"
+ },
+ yAxis:{
+ start:0,
+ end:10,
+ step:1,
+ title:"Sales,<br/>million"
+ }
+
+ })
+ barChart2.parse(data,"json");
+
+
+ var barChart3 = new dhtmlXChart({
+ view:"bar",
+ container:"chart3",
+ value:"#sales#",
+ label:"#sales#",
+ width:35,
+ border:false,
+ gradient:true,
+ xAxis:{
+ title:"Sales per year",
+ template:"#year#"
+ },
+ yAxis:{
+ start:0,
+ end:10,
+ step:1,
+ title:"Sales,<br/>million"
+ }
+ });
+ barChart3.parse(data,"json");
+
+ var barChart4 = new dhtmlXChart({
+ view:"bar",
+ alpha:function(data){
+ return data.sales/10;
+ },
+ container:"chart4",
+ value:"#sales#",
+ label:"#sales#",
+ width:50,
+ gradient:function(gradient){
+ gradient.addColorStop(1.0,"#FF0000");
+ gradient.addColorStop(0.3,"#FFFF00");
+ gradient.addColorStop(0.0,"#00FF22");
+ },
+ tooltip:{
+ template:"#sales#"
+ },
+ xAxis:{
+ title:"Sales per year",
+ template:"#year#"
+ },
+ yAxis:{
+ start:0,
+ end:10,
+ step:1,
+ title:"Sales,<br/>million"
+ }
+ })
+ barChart4.parse(data,"json");
+
+
+ var barChart5 = new dhtmlXChart({
+ view:"bar",
+ container:"chart5",
+ value:"#sales#",
+ label:"#sales#",
+ width:35,
+
+ tooltip:{
+ template:"#sales#"
+ },
+ xAxis:{
+ title:"Sales per year",
+ template:"#year#"
+ },
+ yAxis:{
+ start:0,
+ end:10,
+ step:1,
+ title:"Sales,<br/>million"
+ }
+ })
+ barChart5.parse(data,"json");
+
+ var barChart6 = new dhtmlXChart({
+ view:"bar",
+ alpha:function(data){
+ return data.sales/10;
+ },
+ container:"chart6",
+ value:"#sales#",
+ label:"#sales#",
+ color:"#66cc33",
+ border:false,
+ width:30,
+ radius:0,
+ tooltip:{
+ template:"#sales#"
+ },
+ xAxis:{
+ title:"Sales per year",
+ template:"#year#"
+ },
+ yAxis:{
+ start:0,
+ end:10,
+ step:1,
+ title:"Sales,<br/>million"
+ }
+ })
+ barChart6.parse(data,"json");
+
+ </script>
+</body>
+</html>
diff --git a/addons/base_graph/static/lib/dhtmlxGraph/samples/06_bar_chart/05_stacked_chart.html b/addons/base_graph/static/lib/dhtmlxGraph/samples/06_bar_chart/05_stacked_chart.html new file mode 100644 index 00000000000..d165d0bd488 --- /dev/null +++ b/addons/base_graph/static/lib/dhtmlxGraph/samples/06_bar_chart/05_stacked_chart.html @@ -0,0 +1,87 @@ +<!--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>StackedBar Chart</title>
+ <script src="../../codebase/dhtmlxchart.js" type="text/javascript"></script>
+ <link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxchart.css">
+</head>
+<body onload="init()">
+ <h1>StackedBar Chart</h1>
+ <div id="chart1" style="width:450px;height:300px;border:1px solid #A4BED4;"></div>
+
+
+ <script>
+ var data = [
+ { sales:"3.0",sales1:"3.4",sales2:"1.2",sales3:"6.9", year:"2000" },
+ { sales:"5.0",sales1:"5.0",sales2:"5.0",sales3:"5.0", year:"2001" },
+ { sales:"3.4",sales1:"4.7",sales2:"1.9",sales3:"5.5", year:"2002" }
+ ];
+ function init(){
+ var barChart1 = new dhtmlXChart({
+ view:"stackedBar",
+ container:"chart1",
+ value:"#sales#",
+ label:"#sales#",
+ width:60,
+ tooltip:{
+ template:"#sales#"
+ },
+ xAxis:{
+ title:"Sales per year",
+ template:"#year#"
+ },
+ yAxis:{
+ title:"Sales,million"
+ },
+ gradient:"3d",
+ //border:false,
+ color: "#66cc33",
+ legend:{
+ values:[{text:"department A",color:"#66cc33"},{text:"department B",color:"#ff9933"},{text:"department C",color:"#ffff99"},{text:"department D",color:"#66ffcc"}],
+ valign:"top",
+ align:"right",
+ width:120,
+ layout:"y",
+ marker:{
+ width:15,
+ type:"round"
+ }
+ }
+ })
+ barChart1.addSeries({
+ value:"#sales1#",
+ color:"#ff9933",
+ label:"#sales1#",
+ tooltip:{
+ template:"#sales1#"
+ }
+ });
+ barChart1.addSeries({
+ value:"#sales2#",
+ color:"#ffff99",
+ label:"#sales2#",
+ tooltip:{
+ template:"#sales2#"
+ }
+ });
+ barChart1.addSeries({
+ value:"#sales3#",
+ color:"#66ffcc",
+ label:"#sales3#",
+ tooltip:{
+ template:"#sales3#"
+ }
+ });
+ barChart1.parse(data,"json");
+ }
+</script>
+</body>
+</html>
diff --git a/addons/base_graph/static/lib/dhtmlxGraph/samples/06_bar_chart/06_series.html b/addons/base_graph/static/lib/dhtmlxGraph/samples/06_bar_chart/06_series.html new file mode 100644 index 00000000000..3c5fb695692 --- /dev/null +++ b/addons/base_graph/static/lib/dhtmlxGraph/samples/06_bar_chart/06_series.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>Series</title>
+ <script src="../../codebase/dhtmlxchart.js" type="text/javascript"></script>
+ <link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxchart.css">
+</head>
+<body >
+ <h1>Series</h1>
+
+ <div id="chart" style="width:500px;height:300px;border:1px solid #A4BED4;"></div>
+
+ <script>
+ var data = [
+ { sales:"4.2",sales1:"3.4",sales2:"1.2", year:"2000" },
+ { sales:"3.8",sales1:"4.5",sales2:"2.5", year:"2001" },
+ { sales:"3.4",sales1:"4.7",sales2:"1.9", year:"2002" }
+ ];
+
+
+
+ var barChart = new dhtmlXChart({
+ view:"bar",
+ container:"chart",
+ value:"#sales#",
+ label:"#sales#",
+ width:30,
+ tooltip:{
+ template:"#sales#"
+ },
+ xAxis:{
+ title:"Sales per year",
+ template:"#year#"
+ },
+ yAxis:{
+ start:0,
+ step:1,
+ end:5,
+ title:"Sales,million"
+ },
+ gradient:true,
+ border:false,
+ color: "#66cc33",
+ legend:{
+ values:[{text:"department A",color:"#66cc33"},{text:"department B",color:"#ff9933"},{text:"department C",color:"#ffff99"}],
+ valign:"top",
+ align:"center",
+ width:120,
+ layout:"x",
+ marker:{
+ width:15,
+ type:"round"
+ }
+ }
+ })
+ barChart.addSeries({
+ value:"#sales1#",
+ color:"#ff9933",
+ label:"#sales1#"
+ });
+ barChart.addSeries({
+ value:"#sales2#",
+ color:"#ffff99",
+ label:"#sales2#"
+ });
+ barChart.parse(data,"json");
+
+
+
+
+ </script>
+</body>
+</html>
diff --git a/addons/base_graph/static/lib/dhtmlxGraph/samples/06_bar_chart/07_horizonal_bars.html b/addons/base_graph/static/lib/dhtmlxGraph/samples/06_bar_chart/07_horizonal_bars.html new file mode 100644 index 00000000000..6c8046c5855 --- /dev/null +++ b/addons/base_graph/static/lib/dhtmlxGraph/samples/06_bar_chart/07_horizonal_bars.html @@ -0,0 +1,120 @@ +<!--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>Horizontal bar Chart</title>
+ <script src="../../codebase/dhtmlxchart.js" type="text/javascript"></script>
+ <link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxchart.css">
+</head>
+<body >
+ <h3>Horizontal bar Chart</h3>
+
+ <table>
+
+ <tr>
+ <td><div id="chart1" style="width:450px;height:350px;border:1px solid #A4BED4;"></div></td>
+ <td><div id="chart2" style="width:450px;height:350px;border:1px solid #A4BED4;"></div></td>
+ </tr>
+ </table>
+
+
+ <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" }
+ ];
+
+
+ var data2 = [
+ { sales:"3.0",sales1:"3.4",sales2:"1.2",sales3:"6.9", year:"2007" },
+ { sales:"3.8",sales1:"4.5",sales2:"2.5",sales3:"7.5", year:"2008" },
+ { sales:"3.4",sales1:"4.7",sales2:"1.9",sales3:"5.5", year:"2009" }
+ ];
+ var barChart1 = new dhtmlXChart({
+ view:"barH",
+ container:"chart1",
+ value:"#sales#",
+ width:50,
+ label: "#sales#",
+ gradient:"3d",
+ color:"#ffcc00",
+ xAxis:{
+ title:"Sales per year",
+ lines: true
+ },
+ yAxis:{
+ title:"Year",
+ template:"#year#"
+ },
+ padding:{
+ left:75,
+ right:30
+ }
+ })
+ barChart1.parse(data,"json");
+
+
+
+ var barChart2 = new dhtmlXChart({
+ view:"barH",
+ container:"chart2",
+ value:"#sales#",
+ label:"#sales#",
+ width:30,
+ tooltip:{
+ template:"#sales#"
+ },
+ xAxis:{
+ title:"Sales per year"
+ },
+ yAxis:{
+ title:"Year",
+ template:"#year#"
+ },
+ gradient:true,
+ border:false,
+ color: "#66cc33",
+ legend:{
+ values:[{text:"department A",color:"#66cc33"},{text:"department B",color:"#ff9933"},{text:"department C",color:"#ffff99"}],
+
+ width:120,
+ align:"right",
+ valign:"middle",
+ marker:{
+ width:15,
+ type:"round"
+ }
+ },
+ padding:{
+ left:65
+ }
+ });
+ barChart2.addSeries({
+ value:"#sales1#",
+ color:"#ff9933",
+ label:"#sales1#"
+ });
+ barChart2.addSeries({
+ value:"#sales2#",
+ color:"#ffff99",
+ label:"#sales2#"
+ });
+ barChart2.parse(data2,"json");
+ </script>
+</body>
+</html>
diff --git a/addons/base_graph/static/lib/dhtmlxGraph/samples/06_bar_chart/08_horizonal_stacked_bars.html b/addons/base_graph/static/lib/dhtmlxGraph/samples/06_bar_chart/08_horizonal_stacked_bars.html new file mode 100644 index 00000000000..fe4d8509376 --- /dev/null +++ b/addons/base_graph/static/lib/dhtmlxGraph/samples/06_bar_chart/08_horizonal_stacked_bars.html @@ -0,0 +1,75 @@ +<!--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>Horizontal Stacked Bars</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",sales1:"3.4",sales2:"1.2",sales3:"6.9", year:"2007" },
+ { sales:"5.0",sales1:"5.0",sales2:"5.0",sales3:"5.0", year:"2008" },
+ { sales:"3.4",sales1:"4.7",sales2:"1.9",sales3:"5.5", year:"2009" }
+];
+
+window.onload = function(){
+ barChart = new dhtmlXChart({
+ view:"stackedBarH",
+ container:"chart",
+ value:"#sales#",
+ width:50,
+ label: "#sales#",
+ gradient:"3d",
+ color: "#66cc33",
+ xAxis:{
+ title:"Sales per year",
+ lines: false
+ },
+ yAxis:{
+ title:"Year",
+ template:"#year#"
+ },
+ padding:{left:75},
+ legend:{
+ values:[{text:"department A",color:"#66cc33"},{text:"department B",color:"#ff9933"},{text:"department C",color:"#ffff66"},{text:"department D",color:"#66ffcc"}],
+ valign:"top",
+ align:"left",
+ width:120,
+ layout:"x",
+ marker:{
+ width:15,
+ type:"round"
+ }
+ }
+ })
+ barChart.addSeries({
+ value:"#sales1#",
+ color:"#ff9933",
+ label:"#sales1#"
+ });
+ barChart.addSeries({
+ value:"#sales2#",
+ color:"#ffff66",
+ label:"#sales2#"
+ });
+ barChart.addSeries({
+ value:"#sales3#",
+ color:"#66ffcc",
+ label:"#sales3#"
+ });
+ barChart.parse(data,"json");
+}
+ </script>
+</head>
+<body>
+ <div id="chart" style="width:480px;height:350px;border:1px solid #A4BED4;"></div></td>
+</body>
+</html>
|
