// JavaScript Document
function show_H(data){
	var data1arr=data.split("<||>");
	var data1=new Array();
	for(var i=0;i<data1arr.length-1;i++)
	{
		data1[i]={label:data1arr[i].split("<|>")[0],value:data1arr[i].split("<|>")[1]}
	}
  Morris.Donut({
				element: 'chart1',
				data:data1,
				labelColor: '#303641',
				colors: [ '#00a651', '#00bff3', '#0072bc','#f26c4f','#ff1919','#ffff19','#00FF00','#000FF0','#0000FF','#AFF000','#0FF0AA','#0FF000','#FFFFFF','#0FF000','#0FF000']
			});
}
function show_2dzhu(data)
{
	
	var data2arr=data.split("<||>");
	var data2=new Array();
	for(var i=0;i<data2arr.length-1;i++)
	{
		data2[i]={x:data2arr[i].split("<|>")[0],y:data2arr[i].split("<|>")[1],z:[get_color(i)]}
	}
  Morris.Bar({
		element: 'chart2',
		data:data2,
		xkey: 'x',
		ykeys: ['y'],
		labels: ['数目'],
		stacked: true,
		barColors:["#AFD8F8"]
	});
}
function show_in_zhu(data)
{	
			var data3arr=data.split("<||>")
			var data3=new Array();
			for (var i=0 ;i<data3arr.length-1;i++)
			{
			data3[i]={x: data3arr[i].split("<|>")[0],y:data3arr[i].split("<|>")[1], z:[get_color(i)]
			//z:data3arr[i].split			("<|>")[2], a: data3arr[i].split("<|>")[3]
			};	
			}
			Morris.Bar({
				element: 'chart3',
				axes: true,
				data: data3,
				xkey: 'x',
				ykeys: ['y'],
				labels: ['预约数'],
				barColors: ['#AFD8F8','#F6BD0F','#8BBA00']
			});	
}
function get_color(n)
{
	var s
	s="#AFD8F8,#F6BD0F,#8BBA00,#FF8E46,#008E8E,#D64646,#8E468E,#588526,#B3AA00,#008ED6,#9D080D,#A186BE"
	var arr=new Array();
	arr=s.split(",")
	var i
	i=n%12
	//初始化
	//num=parseInt(Math.random()*11+1);
	return arr[i].toString();
}

function get_color()
{
	var s
	s="#AFD8F8,#F6BD0F,#8BBA00,#FF8E46,#008E8E,#D64646,#8E468E,#588526,#B3AA00,#008ED6,#9D080D,#A186BE"
	var arr=new Array();
	arr=s.split(",")
	//var i
	//i=n%12
	//初始化
	num=parseInt(Math.random()*11+1);
	return arr[num].toString();
}