Exemplo n.º 1
0
        public LineItem createIntervals(ZedGraphControl zgc, MouseEventArgs e, HRMObjectClass hrmobject)
        {
            GraphPane pane = zgc.GraphPane;

            // x & y variables to store the axis values
            double xVal;
            double yVal;

            pane.ReverseTransform(e.Location, out xVal, out yVal);

            LineItem line = new LineItem(String.Empty, new[] { xVal, xVal },
                                         new[] { 0.0, hrmobject.calcMax() },
                                         Color.Black, SymbolType.None);

            line.Line.Width = 1f;

            // Add Interval Points to List
            intervalManualClickList.Add(xVal, pane.YAxis.Scale.Min);
            intervalManualClickList.Add(xVal, hrmobject.calcMax());

            // Add Curve to Zedgraph
            pane.CurveList.Add(line);

            zgc.Refresh();

            return(line);
        }
Exemplo n.º 2
0
        public GraphPane plotPieChart(ZedGraphControl zgc, HRMObjectClass hrmObject)
        {
            GraphPane pane = zgc.GraphPane;

            clearPane(pane);
            pane.AddYAxis("");
            pane.Title.Text = "Power Balance";

            // Left Right Balance % distribution
            PieItem segment1 = pane.AddPieSlice(hrmObject.calcAvg(), Color.LightBlue, 0F, "Left Leg");
            PieItem segment2 = pane.AddPieSlice(100 - hrmObject.calcAvg(), Color.LightGreen, 0F, "Right Leg");

            // Segment Label Type (Name and %)
            segment1.LabelType = PieLabelType.Percent;
            segment2.LabelType = PieLabelType.Percent;

            ZGraphControl(zgc);

            return(pane);
        }
Exemplo n.º 3
0
 public void remove(HRMObjectClass HRMObject)
 {
     this.HRMObjects.Remove(HRMObject);
 }
Exemplo n.º 4
0
 public void add(HRMObjectClass HRMObject)
 {
     this.HRMObjects.Add(HRMObject);
 }