コード例 #1
0
ファイル: ChartController.cs プロジェクト: nimaj/D3Maps
        public ActionResult PostChart(dynamic o)
        {
            var myChart = new ChartDrawService();

            //Session["chartData"] = myChart.DrawChart(1, 1);
            string str = myChart.DrawChart(1, 1);
            //            return Json(str);
            return Json(new ChartViewModel(str));
        }
コード例 #2
0
ファイル: ChartController.cs プロジェクト: nimaj/D3Maps
        public ActionResult DrawChart()
        {
            var myChart = new ChartDrawService(new ChartDataServiceFactory(new EntityFrameworkEntityRepository(new ChartContext())));

            //var dummyData = new Measurment
            //{
            //    ServiceUserID = new Guid("19E78A2C-4207-4C4B-907F-1A13F72266CD"),
            //    Id = new Guid("EB5C3B06-11C4-49AD-862E-2191148D2504"),
            //    MeasurmentDate = DateTime.Now,
            //    MeasurmentType = MeasurmentType.Weight,
            //    MeasurmentValue = 75
            //};

            //myChart.AddMeasurement(dummyData);
            //Session["chartData"] = myChart.DrawChart(1, 1);
            string str = myChart.DrawChart(new Guid("19E78A2C-4207-4C4B-907F-1A13F72266CD"));
            //            return Json(str);
            return Json(new ChartViewModel(str));
        }