﻿// JavaScript Document
$(document).ready(function(){
						   
   if($("#profit0").length){
	   //Net Sales
	   
	   Data1set = new Array();
	   timeline0 = $("#profit0 .timeline th");
	   
	   Data1set['Time'] = new Array();
	   for(i=1; i<timeline0.length;i++){
		   Data1set['Time'].push(timeline0[i].innerHTML.replace(/ |　/g, '') );
	   }
	   Data1set['LLabel']= $("#profit0 #data0 th").html().replace(/\(Billions of Yen\)/g, '');
	   Data1set['LMax'] = 8000;
	   Data1set['LMin'] = 0;
	   Data1set['LFormat'] = '%d';
	   Data1set['LColor'] = '#FFBBBB';
	   Data1set['Linter'] = 1000;
	   Data1set['Lunit'] = '(Billions of Yen)';
	
	   
	   Data1set['LData'] = new Array();
	   var tmp0 = $("#profit0 #data0 td");
	   
	   for(i=0; i<tmp0.length;i++){
		   Data1set['LData'].push(parseFloat(tmp0[i].innerHTML.replace(/,/g, '')));
		   
	   }
	   
	   Data1set['target'] = 'uriage';
	   Data1set['name'] = 'data0';
	   Data1set['pattern'] = 0;
	   
	   //Gross Profit
	   Data2set = new Array();
	   Data2set['Time'] = Data1set['Time'];
	   Data2set['LLabel']= $("#profit0 #data1 th").html().replace(/\(Billions of Yen\)/g, '');
	   Data2set['LMax'] = 500;
	   Data2set['LMin'] = 0;
	   Data2set['LFormat'] = '%d';
	   Data2set['LColor'] = '#FFBBBB';
	   Data2set['Linter'] = 50;
	   Data2set['Lunit'] = '(Billions of Yen)';
	
	   Data2set['LData'] = new Array();
	   tmp0 = $("#profit0 #data1 td");
	   
	   for(i=0; i<tmp0.length;i++){
		   Data2set['LData'].push(parseFloat(tmp0[i].innerHTML.replace(/,/g, '')));
	   }
	   Data2set['target'] = 'urisou';
	   Data2set['name'] = 'data1';
	   Data2set['pattern'] = 0;
	   
	   
	   
	   //Operating Income
	   Data3set = new Array();
	   timeline1 = $("#profit1 .timeline th");
	   
	   Data3set['Time'] = new Array();
	   for(i=1; i<timeline1.length;i++){
		   Data3set['Time'].push(timeline1[i].innerHTML.replace(/ |　/g, '') );
	   }
	  
	   Data3set['LLabel']= $("#profit1 #data2 th").html().replace(/\(Billions of Yen\)/g, '');
	   Data3set['LMax'] = 160;
	   Data3set['LMin'] = 0;
	   Data3set['LFormat'] = '%d';
	   Data3set['LColor'] = '#FFBBBB';
	   Data3set['Linter'] = 40;
	   Data3set['Lunit'] = '(Billions of Yen)';
	   
	   Data3set['LData'] = new Array();
	   tmp = $("#profit1 #data2 td");
	   
	   for(i=0; i<tmp.length;i++){
		   Data3set['LData'].push(parseFloat(tmp[i].innerHTML.replace(/,/g, '')));
		   
	   }
	   
	
	   Data3set['target'] = 'eigyo';
	   Data3set['name'] = 'data3';
	   Data3set['pattern'] = 0;
	   
	   
	   //Ordinary Income
	   Data4set = new Array();
	   Data4set['Time'] = Data3set['Time'];
	   Data4set['LLabel']= $("#profit1 #data3 th").html().replace(/\(Billions of Yen\)/g, '');
	   Data4set['LMax'] = 160;
	   Data4set['LMin'] = 0;
	   Data4set['LFormat'] = '%d';
	   Data4set['LColor'] = '#FFBBBB';
	   Data4set['Linter'] = 40;
	   Data4set['Lunit'] = '(Billions of Yen)';
	   
	   Data4set['LData'] = new Array();
	   tmp = $("#profit1 #data3 td");
	   
	   for(i=0; i<tmp.length;i++){
		   Data4set['LData'].push(parseFloat(tmp[i].innerHTML.replace(/,/g, '')));
		   
	   }
	   
	   Data4set['target'] = 'keijo';
	   Data4set['name'] = 'data4';
	   Data4set['pattern'] = 0;
	   
	   
	   //Net Income/ROE
	   Data5set = new Array();
	   Data5set['Time'] = new Array();
	   timeline2 = $("#profit2 .timeline th");
	   
	   Data5set['Time'] = new Array();
	   for(i=1; i<timeline2.length;i++){
		   Data5set['Time'].push(timeline2[i].innerHTML.replace(/ |　/g, '') );
	   }
	   Data5set['LLabel']= $("#profit2 #data4 th").html().replace(/Billions of Yen, /g, '');
	   Data5set['LMax'] = 80;
	   Data5set['LMin'] = 0;
	   Data5set['LFormat'] = '%d';
	   Data5set['LColor'] = '#FFBBBB';
	   
	   Data5set['Linter'] = 10;
	   Data5set['Lunit'] = '(Billions of Yen)';
	   
	   Data5set['RLabel']= $("#profit2 #data5 th").html().replace(/%, /g, '');
	   Data5set['RMax'] = 18;
	   Data5set['RMin'] = 0;
	   Data5set['RFormat'] = '%.1f';
	   Data5set['RColor'] = '#666666';
	   
	   Data5set['Rinter'] = 2;
	   Data5set['Runit'] = '(％)';
	   
	   Data5set['LData'] = new Array();
	   tmp = $("#profit2 #data4 td");
	   
	   for(i=0; i<tmp.length;i++){
		   Data5set['LData'].push(parseFloat(tmp[i].innerHTML.replace(/,/g, '')));
		   
	   }
	   
	   Data5set['RData'] = new Array();
	   tmp = $("#profit2 #data5 td");
	   
	   for(i=0; i<tmp.length;i++){
		   Data5set['RData'].push(parseFloat(tmp[i].innerHTML.replace(/,/g, '')));
		   
	   }
	   Data5set['target'] = 'touki';
	   Data5set['name'] = 'data5';
	   Data5set['pattern'] = 1;
	   
	   
	   
	   
	   //Net Income per Share/Dividend per Share
	   Data6set = new Array();
	   Data6set['Time'] = Data5set['Time'];
	   Data6set['LLabel']= $("#profit2 #data6 th").html().replace(/Yen, /g, '');
	   Data6set['LMax'] = 250;
	   Data6set['LMin'] = 0;
	   Data6set['LFormat'] = '%.1f';
	   Data6set['LColor'] = '#FFBBBB';
	   //Data6set['Lticks'] = 7;
	   Data6set['Linter'] = 50;
	   Data6set['Lunit'] = '(Yen)';
	   
	   Data6set['RLabel']= $("#profit2 #data7 th").html().replace(/Yen, /g, '');
	   Data6set['RMax'] = 40;
	   Data6set['RMin'] = 0;
	   Data6set['RFormat'] = '%.1f';
	   Data6set['RColor'] = '#FFBBBB';
	   //Data6set['Rticks'] = 9;
	   Data6set['Rinter'] = 5;
	   Data6set['Runit'] = '(Yen)';
	   
	   Data6set['LData'] = new Array();
	   tmp = $("#profit2 #data6 td");
	   
	   for(i=0; i<tmp.length;i++){
		   Data6set['LData'].push(parseFloat(tmp[i].innerHTML.replace(/,/g, '')) );
		   
	   }
	   
	   Data6set['RData'] = new Array();
	   tmp = $("#profit2 #data7 td");
	   
	   for(i=0; i<tmp.length;i++){
		   Data6set['RData'].push(parseFloat(tmp[i].innerHTML.replace(/,/g, '')) );
		   
	   }
	   
	   Data6set['target'] = 'hitokabu';
	   Data6set['name'] = 'data6';
	   Data6set['pattern'] = 1;
	   
	   
	   //Total Assets/ROA
	   Data7set = new Array();
	   Data7set['Time'] = new Array();
	   timeline3 = $("#profit3 .timeline th");
	   
	   Data7set['Time'] = new Array();
	   for(i=1; i<timeline3.length;i++){
		   Data7set['Time'].push(timeline3[i].innerHTML.replace(/ |　/g, '') );
	   }
	   Data7set['LLabel']= $("#profit3 #data8 th").html().replace(/Billions of Yen, /g, '');
	   Data7set['LMax'] = 3000;
	   Data7set['LMin'] = 0;
	   Data7set['LFormat'] = '%d';
	   Data7set['LColor'] = '#FFBBBB';
	   
	   Data7set['Linter'] = 500;
	   Data7set['Lunit'] = '(Billions of Yen)';
	   
	   Data7set['RLabel']= $("#profit3 #data9 th").html().replace(/%, /g, '');
	   Data7set['RMax'] = 8;
	   Data7set['RMin'] = 0;
	   Data7set['RFormat'] = '%.1f';
	   Data7set['RColor'] = '#666666';
	   
	   Data7set['Rinter'] = 1;
	   Data7set['Runit'] = '(％)';
	   
	   Data7set['LData'] = new Array();
	   tmp = $("#profit3 #data8 td");
	   
	   for(i=0; i<tmp.length;i++){
		   Data7set['LData'].push(parseFloat(tmp[i].innerHTML.replace(/,/g, '')));
		   
	   }
	   
	   Data7set['RData'] = new Array();
	   tmp = $("#profit3 #data9 td");
	   
	   for(i=0; i<tmp.length;i++){
		   Data7set['RData'].push(parseFloat(tmp[i].innerHTML));
		   
	   }
	   Data7set['target'] = 'soushi';
	   Data7set['name'] = 'data8';
	   Data7set['pattern'] = 1;
	   
	   //Net Interest-bearing Debt/Net DER
	   Data8set = new Array();
	   Data8set['Time'] = Data7set['Time']
	   
	   Data8set['LLabel']= $("#profit3 #data10 th").html().replace(/Billions of Yen, /g, '').replace(/<br>|<BR>/g, '');
	   Data8set['LMax'] = 700;
	   Data8set['LMin'] = 0;
	   Data8set['LFormat'] = '%d';
	   
	   Data8set['Linter'] = 100;
	   Data8set['Lunit'] = '(Billions of Yen)';
	   
	   Data8set['RLabel']= $("#profit3 #data11 th").html().replace(/Times, /g, '');
	   Data8set['RMax'] = 1.5;
	   Data8set['RMin'] = 0;
	   Data8set['RFormat'] = '%.1f';
	   
	   Data8set['Rinter'] = 0.3;
	   Data8set['Runit'] = '(％)';
	   
	   Data8set['LData'] = new Array();
	   tmp = $("#profit3 #data10 td");
	   
	   for(i=0; i<tmp.length;i++){
		   Data8set['LData'].push(parseFloat(tmp[i].innerHTML.replace(/,/g, '')));
		   
	   }
	   
	   Data8set['RData'] = new Array();
	   tmp = $("#profit3 #data11 td");
	   
	   for(i=0; i<tmp.length;i++){
		   Data8set['RData'].push(parseFloat(tmp[i].innerHTML));
		   
	   }
	   Data8set['target'] = 'net';
	   Data8set['name'] = 'data10';
	   Data8set['pattern'] = 1;
	   
	   opengraph(Data1set);
	   opengraph(Data2set);
	   opengraph(Data3set);
	   opengraph(Data4set);
	   opengraph(Data5set);
	   opengraph(Data6set);
	   opengraph(Data7set);
	   opengraph(Data8set);
	   
	}else if($("#profit4").length){
		//四半期
		//売上高
	   
	   Data9set = new Array();
	   timeline0 = $("#profit4 .timeline th");
	   
	   Data9set['Time'] = new Array();
	   for(i=1; i<timeline0.length;i++){
		   Data9set['Time'].push(timeline0[i].innerHTML.replace(/ |　/g, '') );
	   }
	   Data9set['LLabel']= $("#profit4 #data8 th").html().replace(/\(Billions of Yen\)/g, '');
	   Data9set['LMax'] = 1800;
	   Data9set['LMin'] = 0;
	   Data9set['LFormat'] = '%d';
	   Data9set['LColor'] = '#FFBBBB';
	   Data9set['Linter'] = 200;
	   Data9set['Lunit'] = '(Billions of Yen)';
	
	   
	   Data9set['LData'] = new Array();
	   var tmp0 = $("#profit4 #data8 td");
	   
	   for(i=0; i<tmp0.length;i++){
		   Data9set['LData'].push(parseFloat(tmp0[i].innerHTML.replace(/,/g, '')));
		   
	   }
	   Data9set['target'] = 'uriageQ';
	   Data9set['name'] = 'data8';
	   Data9set['pattern'] = 0;
	   
	   //売上総利益
	   Data10set = new Array();
	   Data10set['Time'] = Data9set['Time'];
	   Data10set['LLabel']= $("#profit4 #data9 th").html().replace(/\(Billions of Yen\)/g, '');
	   Data10set['LMax'] = 100;
	   Data10set['LMin'] = 0;
	   Data10set['LFormat'] = '%d';
	   Data10set['LColor'] = '#FFBBBB';
	   Data10set['Linter'] = 10;
	   Data10set['Lunit'] = '(Billions of Yen)';
	
	   Data10set['LData'] = new Array();
	   tmp0 = $("#profit4 #data9 td");
	   
	   for(i=0; i<tmp0.length;i++){
		   Data10set['LData'].push(parseFloat(tmp0[i].innerHTML.replace(/,/g, '')));
	   }
	   Data10set['target'] = 'urisouQ';
	   Data10set['name'] = 'data9';
	   Data10set['pattern'] = 0;
	   
	   //営業利益(損失)
	   Data11set = new Array();
	   timeline0 = $("#profit5 .timeline th");
	   
	   Data11set['Time'] = new Array();
	   for(i=1; i<timeline0.length;i++){
		   Data11set['Time'].push(timeline0[i].innerHTML.replace(/ |　/g, '') );
	   }
	   Data11set['LLabel']= $("#profit5 #data10 th").html().replace(/\(Billions of Yen\)/g, '');
	   Data11set['LMax'] = 40;
	   Data11set['LMin'] = -15;
	   Data11set['LFormat'] = '%d';
	   Data11set['LColor'] = '#FFBBBB';
	   Data11set['Linter'] = 5;
	   Data11set['Lunit'] = '(Billions of Yen)';
	
	   Data11set['LData'] = new Array();
	   tmp0 = $("#profit5 #data10 td");
	   
	   for(i=0; i<tmp0.length;i++){
		   if(tmp0[i].innerHTML.match(/\(\d+\)/)){
		       Data11set['LData'].push(parseFloat('-' + tmp0[i].innerHTML.replace(/,/g, '').replace(/\(|\)/g, '') ) );
		   }else{
			   Data11set['LData'].push(parseFloat(tmp0[i].innerHTML.replace(/,/g, '')));
		   }
	   }
	   Data11set['target'] = 'eigyoQ';
	   Data11set['name'] = 'data10';
	   Data11set['pattern'] = 2;
	   
	   
	   //経常利益(損失)
	   Data12set = new Array();
	   Data12set['Time'] = Data11set['Time'];
	   Data12set['LLabel']= $("#profit5 #data11 th").html().replace(/\(Billions of Yen\)/g, '');
	   Data12set['LMax'] = 40;
	   Data12set['LMin'] = -15;
	   Data12set['LFormat'] = '%d';
	   Data12set['LColor'] = '#FFBBBB';
	   Data12set['Linter'] = 5;
	   Data12set['Lunit'] = '(Billions of Yen)';
	
	   Data12set['LData'] = new Array();
	   tmp0 = $("#profit5 #data11 td");
	   
	   for(i=0; i<tmp0.length;i++){
		   if(tmp0[i].innerHTML.match(/\(\d+\)/)){
		       Data12set['LData'].push(parseFloat('-' + tmp0[i].innerHTML.replace(/,/g, '').replace(/\(|\)/g, '') ) );
		   }else{
			   Data12set['LData'].push(parseFloat(tmp0[i].innerHTML.replace(/,/g, '')));
		   }
	   }
	   Data12set['target'] = 'keijoQ';
	   Data12set['name'] = 'data11';
	   Data12set['pattern'] = 2;
	   
	   
	   //当期純利益(損失)
	   Data13set = new Array();
	   timeline0 = $("#profit6 .timeline th");
	   
	   Data13set['Time'] = new Array();
	   for(i=1; i<timeline0.length;i++){
		   Data13set['Time'].push(timeline0[i].innerHTML.replace(/ |　/g, '') );
	   }
	   Data13set['LLabel']= $("#profit6 #data12 th").html().replace(/\(Billions of Yen\)/g, '');
	   Data13set['LMax'] = 20;
	   Data13set['LMin'] = -15;
	   Data13set['LFormat'] = '%d';
	   Data13set['LColor'] = '#FFBBBB';
	   Data13set['Linter'] = 5;
	   Data13set['Lunit'] = '(Billions of Yen)';
	
	   Data13set['LData'] = new Array();
	   tmp0 = $("#profit6 #data12 td");
	   
	   for(i=0; i<tmp0.length;i++){
		   if(tmp0[i].innerHTML.match(/\(\d|\.+\)/)){
		       Data13set['LData'].push(parseFloat('-' + tmp0[i].innerHTML.replace(/,/g, '').replace(/\(|\)/g, '') ) );
		   }else{
			   Data13set['LData'].push(parseFloat(tmp0[i].innerHTML.replace(/,/g, '')));
		   }
	   }
	   Data13set['target'] = 'toukiQ';
	   Data13set['name'] = 'data12';
	   Data13set['pattern'] = 2;
	   
	   
	   //1株当たり当期純利益(損失)
	   Data14set = new Array();
	   Data14set['Time'] = Data13set['Time'];
	   Data14set['LLabel']= $("#profit6 #data13 th").html().replace(/\(Yen\)/g, '');
	   Data14set['LMax'] = 60;
	   Data14set['LMin'] = -50;
	   Data14set['LFormat'] = '%.1f';
	   Data14set['LColor'] = '#FFBBBB';
	   Data14set['Linter'] = 10;
	   Data14set['Lunit'] = '(Yen)';
	
	   Data14set['LData'] = new Array();
	   tmp0 = $("#profit6 #data13 td");
	   
	   for(i=0; i<tmp0.length;i++){
		   if(tmp0[i].innerHTML.match(/\(\d|\.+\)/)){
		       Data14set['LData'].push(parseFloat('-' + tmp0[i].innerHTML.replace(/,/g, '').replace(/\(|\)/g, '') ) );
		   }else{
			   Data14set['LData'].push(parseFloat(tmp0[i].innerHTML.replace(/,/g, '')));
		   }
	   }
	   Data14set['target'] = 'hitokabuQ';
	   Data14set['name'] = 'data13';
	   Data14set['pattern'] = 2;
	   
	   //総資産
	   Data15set = new Array();
	   timeline0 = $("#profit7 .timeline th");
	   
	   Data15set['Time'] = new Array();
	   for(i=1; i<timeline0.length;i++){
		   Data15set['Time'].push(timeline0[i].innerHTML.replace(/ |　/g, '') );
	   }
	   Data15set['LLabel']= $("#profit7 #data14 th").html().replace(/\(Billions of Yen\)/g, '');
	   Data15set['LMax'] = 3000;
	   Data15set['LMin'] = 0;
	   Data15set['LFormat'] = '%d';
	   Data15set['LColor'] = '#FFBBBB';
	   Data15set['Linter'] = 500;
	   Data15set['Lunit'] = '(Billions of Yen)';
	
	   
	   Data15set['LData'] = new Array();
	   var tmp0 = $("#profit7 #data14 td");
	   
	   for(i=0; i<tmp0.length;i++){
		   Data15set['LData'].push(parseFloat(tmp0[i].innerHTML.replace(/,/g, '')));
	   }
	   Data15set['target'] = 'soushiQ';
	   Data15set['name'] = 'data14';
	   Data15set['pattern'] = 0;
	   
	   //ネット有利子負債
	   Data16set = new Array();
	   Data16set['Time'] = Data15set['Time'];
	   Data16set['LLabel']= $("#profit7 #data15 th").html().replace(/\(Billions of Yen\)/g, '');
	   Data16set['LMax'] = 1000;
	   Data16set['LMin'] = 0;
	   Data16set['LFormat'] = '%d';
	   Data16set['LColor'] = '#FFBBBB';
	   Data16set['Linter'] = 200;
	   Data16set['Lunit'] = '(Billions of Yen)';
	
	   Data16set['LData'] = new Array();
	   tmp0 = $("#profit7 #data15 td");
	   
	   for(i=0; i<tmp0.length;i++){
		   Data16set['LData'].push(parseFloat(tmp0[i].innerHTML.replace(/,/g, '')));
	   }
	   Data16set['target'] = 'netQ';
	   Data16set['name'] = 'data15';
	   Data16set['pattern'] = 0;
 
 	   opengraph(Data9set);
	   opengraph(Data10set);
	   opengraph(Data11set);
	   opengraph(Data12set);
	   opengraph(Data13set);
	   opengraph(Data14set);
	   opengraph(Data15set);
	   opengraph(Data16set);
	
	
	}
});

function opengraph(ds){
		$('#' + ds['target']).append("<div id=\""  + ds['target']+ "in" + "\" style=\"width:308px;height:308px;\"></div>");
		makegraph(ds);
		if(typeof ds['Lunit'] != 'undefined'){
			$('#'+ds['target']+ "in").after("<p class=\"Lunit\">" + ds['Lunit'] + "</p>");
		}
		if(typeof ds['Runit'] != 'undefined'){
			$('#'+ds['target']+ "in").after("<p class=\"Runit\">" + ds['Runit'] + "</p>");
		}
		var legends;
		if(typeof ds['RLabel'] == 'undefined'){
			legends = '<table style="position: absolute;" class="jqplot-table-legend" id="graphX' + ds['name']  + '"><tbody><tr class="jqplot-table-legend"><td style="text-align: center; padding-top: 0pt;" class="jqplot-table-legend"><div style="padding:1px"><div style="border-color: rgb(93, 160, 228);" class="jqplot-table-legend-swatch"></div></div></td><td  class="jqplot-table-legend">' + ds['LLabel'] + '</td></tr></tbody></table>';
			
		}else{
			legends = '<table style="position: absolute;" class="jqplot-table-legend" id="graphX' + ds['name']  + '"><tbody><tr class="jqplot-table-legend"><td style="text-align: center; padding-top: 0pt;" class="jqplot-table-legend"><div style="padding:1px"><div style="border-color: rgb(93, 160, 228);" class="jqplot-table-legend-swatch"></div></div></td><td style="padding-top: 0pt;" class="jqplot-table-legend">' + ds['LLabel'] + '</td></tr><tr class="jqplot-table-legend"><td style="text-align: center; padding-top: 0pt;" class="jqplot-table-legend"><div style="padding:1px"><div style="border-color: #013364;" class="jqplot-table-legend-swatch"></div></div></td><td  class="jqplot-table-legend">' + ds['RLabel'] + '</td></tr></tbody></table>';
		}
		
		$('#'+ds['target']+ "in").after(legends);
		var leftoffset = ( ( $('#' + ds['target']).width() / 2 ) - ( $('#' + 'graphX' + ds['name']).width() / 2 ) ) + 'px';
		var topoffse;
		appVersion = window.navigator.appVersion.toLowerCase();
		if(appVersion.indexOf("msie 6.0") != -1){
			adjust = -5;
		}else if(appVersion.indexOf("msie 7.0") != -1){
			adjust = 5;
		}else{
			adjust = 0;
		}
		if(typeof ds['RLabel'] == 'undefined'){
			topoffset = '-' + ( ( $('#' + 'graphX' + ds['name']).height() * 2.5) + adjust ) + 'px';
		}else{
			topoffset = '-' + ( ( $('#' + 'graphX' + ds['name']).height() * 1.6) + adjust ) + 'px';
		}
		//var topoffset = 0;
		$('#' + 'graphX' + ds['name'] ).css({left:leftoffset, top:topoffset});
}


function makegraph(ds){
	switch(ds['pattern']){
		case 0:
		$.jqplot(ds['target']+"in",[ds['LData']],{
				legend:{
					show:false
				},
				seriesDefaults:{
					fill:true,
					fillToZero:true,
					showMarker:false,
					showGridline:true,
					rendererOptions:{barWidth: 22}

				},
				axesDefaults:{
					borderColor: '#5DA0E4'
				},
				series:[
					{
						yaxis: 'yaxis',
						label: ds['LLabel'],
						renderer: $.jqplot.BarRenderer,
						shadow: false
					}
				],
				axes:{
					xaxis:{
						ticks: ds['Time'],
						renderer: $.jqplot.CategoryAxisRenderer,
						tickOptions:{
										mark: 'inside',
										showGridline:false
						},
						useSeriesColor:true
					},
					yaxis:{
						min: ds['LMin'],
						max: ds['LMax'],
						tickInterval:ds['Linter'],
						numberTicks: ds['Lticks'],
						tickOptions:{
										formatString: ds['LFormat'],
										showGridline: true,
										mark: null
						},
						useSeriesColor:true
					}
				},
				cursor: {
						show:false
				},
				grid:{
						shadow: false,
						gridLineColor:'#D2D2D2',
						gridLineWidth: 1.0
				}
		});
		break;
		
		case 1:
		$.jqplot(ds['target']+"in",[ds['LData'],ds['RData']],{
											  
				legend:{
					show:false
				},
				seriesDefaults:{
					shadow: false,
					fillToZero:true,
					showMarker:true,
					showGridline:true

				},
				axesDefaults:{
					borderColor: '#5DA0E4'
				},
				series:[
					
					{
						yaxis: 'yaxis',
						label: ds['LLabel'],
						renderer: $.jqplot.BarRenderer,
						rendererOptions:{barWidth: 22}
					},
					{
						yaxis: 'y2axis',
						label: ds['RLabel'],
						color: '#013364',
						lineWidth:1,
						markerOptions:{size:8}
					}
				],
				axes:{
					xaxis:{
						ticks: ds['Time'],
						renderer: $.jqplot.CategoryAxisRenderer,
						tickOptions:{
										mark: 'inside',
										showGridline:false
						},
						useSeriesColor:true
					},
					yaxis:{
						min: ds['LMin'],
						max: ds['LMax'],
						tickInterval:ds['Linter'],
						numberTicks: ds['Lticks'],
						tickOptions:{
										formatString: ds['LFormat'],
										showGridline: false,
										mark: 'inside'
						},
						useSeriesColor:true
					},
					y2axis:{
						min: ds['RMin'],
						max: ds['RMax'],
						tickInterval:ds['Rinter'],
						numberTicks: ds['Rticks'],
						tickOptions:{
										formatString: ds['RFormat'],
										showGridline: false,
										mark: 'inside'
						},
						useSeriesColor:true
					}
				},
				
				cursor: {
						show:false
				},
				grid:{
						shadow: false,
						gridLineColor: '#D2D2D2',
						gridLineWidth: 1.0
				}
		});
		break;
		
		case 2:
		$.jqplot(ds['target']+"in",[ds['LData']],{
				legend:{
					show:false
				},
				seriesDefaults:{
					fill:true,
					fillToZero:true,
					showMarker:false,
					showGridline:true,
					rendererOptions:{barWidth: 22}
				},
				axesDefaults:{
					borderColor: '#5DA0E4'
				},
				series:[
					{
						yaxis: 'yaxis',
						label: ds['LLabel'],
						renderer: $.jqplot.BarRenderer,
						shadow: false
					}
				],
				axes:{
					xaxis:{
						ticks: ds['Time'],
						renderer: $.jqplot.CategoryAxisRenderer,
						tickOptions:{
										mark: 'inside',
										showGridline:false
						},
						useSeriesColor:true
					},
					yaxis:{
						min: ds['LMin'],
						max: ds['LMax'],
						tickInterval:ds['Linter'],
						numberTicks: ds['Lticks'],
						tickOptions:{
										formatString: ds['LFormat'],
										showGridline: true,
										mark: null
						},
						useSeriesColor:true
					}
				},
				cursor: {
						show:false
				},
				grid:{
						shadow: false,
						gridLineColor:'#D2D2D2',
						gridLineWidth: 1.0
				}
		});
		break;
	}
	
}	





