这是我从网上收集的,最爽的一个,基本没有再使用ajax之类的读取,也没有象我以前,使用JS进行echar赋值。
上面是效果图,下面是页面部份。
@{
ViewBag.Title = "Home Page";
Layout = null;
string date1 = "";
string date2 = "";
if (ViewBag.date1!=null)
{
date1 = ViewBag.date1;
}
if (ViewBag.date2 != null)
{
date2 = ViewBag.date2;
}
}
@**@
$(function() {
$("#startdate").datepicker();
$("#enddate").datepicker();
});
起始日期
结束日期
// 基于准备好的dom,初始化echarts实例
var myChart = echarts.init(documen