<script type="text/javascript">
$(function () {
        $('#container').highcharts({
            chart: {
                type: 'line',
                borderWidth: 0,
				spacingTop: 30,
                marginRight: 10,
                marginBottom: 25
            },
            title: {
                text: '',
                x: -10 //center
            },
            subtitle: {
                text: "",
                x: -10
            },
            xAxis: {
				gridLineWidth: 1, //默认是0，即在图上没有纵轴间隔线
				lineWidth: 1, //自定义y轴宽度
				showFirstLabel: false,
                gridLineDashStyle: 'Dot',
                lineColor: '#808080',
                categories: ['0', '1', '2', '3', '4', '5',
                    '6', '7', '8', '9', '10', '11',  '12', '13', '14', '15',
                    '16', '17', '18', '19', '20', '21', '22', '23']
            },
            yAxis: {
                title: {
                    text: '房源刷新效果对比'
                },
                endOnTick: false,
                maxPadding: 2,
                minPadding: 0,
				tickWidth: 1, //刻度的宽度  
                lineWidth: 1, //自定义y轴宽度  
                gridLineWidth: 1, //默认是0，即在图上没有纵轴间隔线  
                maxPadding: 0.5,
                gridLineDashStyle: 'Dot',
                lineColor: '#808080',
                plotLines: [{
                   value: 0,
                   width: 1,
                   color: '#808080'
                }]
            },
		   plotOptions: { spline: { marker: { radius: 4, lineColor: '#666666', lineWidth: 1 } } },
           tooltip: {
            formatter: function() {
                return '<b>'+ this.series.name +'</b><br/>'+
                    this.x +'时: '+ this.y+'次';
            }
        },
        credits : {  
            enabled:false //不显示highCharts版权信息,不显示为false  
        },  
        legend: {
				enabled : true,//控制显示
                //layout: 'horizontal',
                //align: 'bottom',
                verticalAlign: 'top',
                //x: -20,
                y: -30
                //shadow: true,
                //borderWidth: 1
            },
            series: [{
                name: '房源刷新次数',
				marker: { symbol: 'square' },
				color	: '#FEA010',
                data: <?php echo $RefreshNum_json;?>
				},
				{ 
				name: '网友搜索次数', 
				data: <?php echo $SearchNum_json;?>
			}]
        });
    });
</script>

<div id="centre" class="layout">
	<div class="centreInner ">
		<div class="mainInner radius5 ">
			<div class="forms "> </div>
			<div class="statisticsReport">
			 <form name ="search_form" id ="search_form" method="post" action='' >
				<div class="forms ">
					<dl class="list">
						<dd class="list_item clearfix">
							<label class="label">选择时间：</label>
							<div class="fields">
								<div class="fgInput ">
                                <input readonly type="text" class="Wdate input_text w126" style='cursor:pointer' id="count_day" name='count_day' value='<?php echo $count_day;?>'  onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'%y-%M-{%d-30}',maxDate:'%y-%M-{%d-1}'})"/>    
								</div>
								<p class="textFg textFg2">&nbsp;</p>
								<div class="fgInput" > 
								<a style="float:left;" class="downReportBtn downReportBtn2 btnCon radius5" href="####" id='search_button'>查询</a> 
								</div>
							</div>
						</dd>
					</dl>
				</div>

				<input type='hidden' name='showType' id= 'showType' value="<?php echo $showType;?>">
				</form> 
				<div class="statisticalChartBox">
					<div class="title"> 
					总刷新量：<em class="num"><?php echo $refresh_total;?></em>
                                        出售房源刷新量：<em class="num"><?php echo $refresh_sell;?></em>
                                        出租房源刷新量：<em class="num"><?php  echo $refresh_rent;?></em>
                                        <span class="time">时间：<?php  echo $count_day;?></span>
					<div class="tabBox clearfix">
						<dl class="list">
							<dd class="item"><a class="tab <?php if($showType=='all' ){?> tabOn <?php  } ?>" href="####" value='all'>全部</a></dd>
							<dd class="item"><a class="tab <?php if($showType=='sell'){?> tabOn <?php  } ?>" href="####" value='sell'>出售</a></dd>
							<dd class="item"><a class="tab <?php if($showType=='rent'){?> tabOn <?php  } ?>" href="####" value='rent'>出租</a></dd>
						</dl>
					</div>
				</div>
					<div class="statisticalChart" id="container" style="min-width: 400px; height:260px ;margin: 0 auto"></div>
				</div>
			</div>
			<!----> 
		</div>
	</div>
</div>

<!--提交表单JS-->
<script>
$(function(){
	$('#search_button').click(function (){
	   $('#search_form').submit();
	}),

	$('.tab').click(function (){
            $('#showType').val( $(this).attr('value') );
            $('#search_form').submit();
	})
});
</script>