Example #1
0
        public Dictionary <string, string> GetValues(RrdGraphDef gdef)
        {
            this.gdef = gdef;

            bool lazy   = lazyCheck();
            var  values = new Dictionary <string, string>();

            if (!lazy || gdef.printStatementCount() != 0)
            {
                fetchData();
                resolveTextElements();
                foreach (CommentText comment in gdef.comments)
                {
                    if (comment.GetType() == typeof(PrintText))
                    {
                        PrintText pt = (PrintText)comment;
                        //Todo:Need to make hash key uniqe
                        if (pt.isPrint())
                        {
                            values.Add(pt.SrcName, pt.resolvedText);
                        }
                    }
                }
            }
            return(values);
        }
Example #2
0
        private void createGraph()
        {
            bool lazy = lazyCheck();

            if (!lazy || gdef.printStatementCount() != 0)
            {
                fetchData();
                resolveTextElements();
                if (gdef.shouldPlot() && !lazy)
                {
                    calculatePlotValues();
                    findMinMaxValues();
                    identifySiUnit();
                    expandValueRange();
                    removeOutOfRangeRules();
                    initializeLimits();
                    placeLegends();
                    createImageWorker();
                    drawBackground();
                    drawAxis();
                    drawData();
                    drawGrid();
                    drawText();
                    drawLegend();
                    drawRules();
                    gator();
                    drawOverlay();
                    saveImage();
                }
            }
            collectInfo();
        }
Example #3
0
      public Dictionary<string, string> GetValues(RrdGraphDef gdef)
      {
         this.gdef = gdef;

         bool lazy = lazyCheck();
         var values = new Dictionary<string, string>();
         if (!lazy || gdef.printStatementCount() != 0)
         {
            fetchData();
            resolveTextElements();
            foreach (CommentText comment in gdef.comments)
            {
               if (comment.GetType() == typeof(PrintText))
               {
                  PrintText pt = (PrintText)comment;
                  //Todo:Need to make hash key uniqe
                  if (pt.isPrint())
                  {
                     values.Add(pt.SrcName , pt.resolvedText);
                  }
               }
            }
         }
         return values;
      }