Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ChartSession cs = SessionManager.ChartSession;

            if (!cs.IsEmpty())
            {
                LineChartConfig cfg = cs.ChartConfig as LineChartConfig;
                if (cs.Name == SessionChartName.P2Hour ||
                    cs.Name == SessionChartName.PDuringWL ||
                    cs.Name == SessionChartName.PDuringFlux ||
                    cs.Name == SessionChartName.PDuringAmount)
                {
                    CreateLineConfig(cfg, cs.DataSource);
                    //LineChartConfig cfg = Create(cs.DataSource);
                }

                //if (cs.Name == SessionChartName.PDuringWL)
                //{
                //    LineChartConfig cfg = cs.ChartConfig as LineChartConfig;
                //    CreateLineConfig(cfg, cs.DataSource);
                //}
                //if (cs.Name == "...")
                //{

                //}

                ChartFactory f = new ChartFactory();
                OpenFlashChart.OpenFlashChart chart = f.Create(cs.DataSource as DataTable, cfg);
                Response.Write(chart.ToString());
            }
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int             i   = 2 - 1;
            ChartSession    cs  = SessionManager.ChartSessionManager.GetChartSession(i);
            LineChartConfig cfg = cs.ChartConfig as LineChartConfig;

            ChartFactory f = new ChartFactory();

            OpenFlashChart.OpenFlashChart chart = f.Create(cs.DataSource as DataTable, cfg);
            Response.Write(chart.ToString());
        }