public void Calc() { RectangleF rcf = new RectangleF(m_rcf.Left + 180.0f, m_rcf.Top + 25.0f, m_rcf.Width - 150.0f, 100.0f); // we are going to have a number of graphs on the page; // calc them all. // let's assume we're only graphing one for now m_plmpg = new ArrayList(); foreach (MP mp in m_plmp) { // graph the meals MPG mpg = new MPG(mp); mpg.Plsbge = new ArrayList(); int i = 0, iMac = mp.NGetSampleSize(); for (i = 0; i < iMac; i++) { SBGE sbge = new SBGE(m_gp, m_dxOffsetForSbge, m_dyOffsetForSbge + 15.0f, false); sbge.Tag = mp; sbge.SetDataSet(mp.SlbgeForSample(i), null); sbge.SetMealLegend(mp.DttmMealForSample(i)); sbge.SetLineWidth(0.2f); sbge.CalcGraph(rcf); mpg.Plsbge.Add(sbge); } m_plmpg.Add(mpg); rcf.Y += 140.0f; // rcf = new RectangleF(m_rcf.Left + 120.0f, m_rcf.Top + 110.0f, m_rcf.Width - 150.0f, 100.0f); // i = 0; // iMac = mp.NGetSampleSize(); // for (i = 0; i < iMac; i++) // { // SBGE sbge = new SBGE(m_gp, m_dxOffsetForSbge, m_dyOffsetForSbge, false); // // sbge.SetDataSet(mp.SlbgeForSample(i), null); // sbge.SetMealLegend(mp.DttmMealForSample(i)); // sbge.SetLineWidth(0.2f); // sbge.CalcGraph(rcf); // mpg.Plsbge.Add(sbge); // } // m_plmpg.Add(mpg); } }
/* S E T D A T A P O I N T S */ /*---------------------------------------------------------------------------- * %%Function: SetDataPoints * %%Qualified: bg.Grapher.SetDataPoints * %%Contact: rlittle * * GraphicBox interface * ----------------------------------------------------------------------------*/ public void SetDataPoints(object oData, VScrollBar sbv, HScrollBar sbh) { m_sbge.SetDataSet((SortedList)oData, sbh); m_sbgeAvg.SetDataSet((SortedList)oData, sbh); }