
$('.form_date').datetimepicker({
    language:  'zh-CN',
    weekStart: 1,
    todayBtn:  1,
	autoclose: 1,
	todayHighlight: 1,
	startView: 2,
	minView: 2,
	forceParse: 0
});

function Canvas(id, datas) {
    var randomScalingFactor = function () { return Math.round(Math.random() * 100) };
    var lineChartData = {
        labels: ["当天注册", "次日留存", "3日留存", "5日留存", "7日留存", "15日留存", "30日留存"],
        datasets: [
            {
                fillColor: "rgba(220,220,220,0.2)",
                strokeColor: "rgba(220,220,220,1)",
                pointColor: "rgba(220,220,220,1)",
                pointStrokeColor: "#fff",
                pointHighlightFill: "#fff",
                pointHighlightStroke: "rgba(220,220,220,1)",
                data: datas
            }
        ]
    }
    var ctx = document.getElementById(id).getContext("2d");
    window.myLine = new Chart(ctx).Line(lineChartData, {
        bezierCurve: false,
    });
}

function ok_click(){
	Canvas("orderCanvas", [1,2,3,4,5,6,7]);
	Canvas("userCanvas", [1,2,3,4,5,6,7]);
}
