Пример #1
0
        //-------------------------------------------------------------------------

        public void Generate(BarGraphInfo barGraphInfo,
                             int maximumAmount,
                             Dictionary <string, double> categoryTotals)
        {
            _graphics      = barGraphInfo.Graphics;
            _scale         = barGraphInfo.Scale;
            _maximumAmount = maximumAmount;

            DrawAxes(barGraphInfo.StartPoint);
            AddAllYAxisLabels(barGraphInfo.StartPoint);
            AddAllXAxisLabels(barGraphInfo.StartPoint, barGraphInfo.BarWidth, categoryTotals);
        }
Пример #2
0
        //-------------------------------------------------------------------------

        public void Generate(BarGraphInfo barGraphInfo,
                             Dictionary <string, double> categoryTotals)
        {
            _graphics   = barGraphInfo.Graphics;
            _startPoint = barGraphInfo.StartPoint;
            _barWidth   = barGraphInfo.BarWidth;
            _scale      = barGraphInfo.Scale;

            foreach (var category in categoryTotals)
            {
                DrawBars(category.Value, _categoriesInfo.GetBudgetForCategory(category.Key));
            }
        }
Пример #3
0
        //-------------------------------------------------------------------------

        private void GenerateBars(BarGraphInfo barGraphInfo)
        {
            _bars.Generate(barGraphInfo, _categoryTotals);
        }
Пример #4
0
        //-------------------------------------------------------------------------

        private void GenerateAxes(BarGraphInfo barGraphInfo)
        {
            _axes.Generate(barGraphInfo,
                           _maximumAmount,
                           _categoryTotals);
        }