Chart Usage Example

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<script src="../../../codebase/touchui.js" type="text/javascript"></script>
	<link rel="STYLESHEET" type="text/css" href="../../../codebase/touchui.css">
 
 
	<script>
        var salesData = [
	       { sales: 9.5, year: 2006 },
	       { sales: 8.6, year: 2007 },
	       { sales: 6.7, year: 2008 },
	       { sales: 4.9, year: 2009 },
	       { sales: 6.2, year: 2010 }
        ];
 
 
	window.onload=function(){
 
	dhx.ui({
	container:"container",
		  rows:[{
					view:"toolbar", type:"MainBar", height:20, data:[{type:"label", label:"Sales Information"}]
				},
				{
				 cols:[{
							view:"chart",
							type:"bar",
							id:"barChart",
							value:"#sales#",
							label:"#year#",
							padding:{
								bottom:2,
								right:0,
								left:0
							},
							barWidth:30		
						},
						{ 
							width:200,
							view:"grid",
							fields:[{
								id:"sales",
								label:"Sales",
								template:"#sales#",
								width:100
							},
							{
								id:"year",
								label:"Year",
								template:"#year#"
							}],
							datatype:"json",
							data:salesData
				 }]
		  }]
	})
 
	$$('barChart').parse(salesData,"json");
	}
 
	</script>
 
</head>
<body>
	<div id="container" style="width:450px;height:303px;border:0px solid #A4BED4;float:left;margin-right:20px"></div>
</body>
</html>