PdfRpt.VectorCharts.VerticalBarChart.drawYAxis C# (CSharp) Method

drawYAxis() private method

private drawYAxis ( ) : void
return void
        private void drawYAxis()
        {
            drawYAxisLine();

            // this value is used to increment the y-axis marker value.
            var yMarkerValue = (float)Math.Ceiling(_maxValueItem.Value / ScaleFactor);

            // get the scale based on the current max y value and other chart element area adjustments.
            var scale = ((yMarkerValue * 100f / (float)_maxValueItem.Value)) *
                ((ChartHeight - Margin - Margin - BottomMargin) / 100f);

            var y1 = Margin + BottomMargin;

            double yAxisValue = 0;

            for (var i = 0; i <= ScaleFactor; i++)
            {
                addMarkerLineToChart(y1);
                drawHorizontalGrid(y1);
                addMarkerTextToChart(y1, yAxisValue);

                y1 += scale;
                yAxisValue += yMarkerValue;
            }
        }