Esempio n. 1
0
        private string GetExamplesReport2()
        {
            tot = 0;
            int[]    Examples = GetExamplesData2();
            BarGraph L        = new BarGraph();

            L.Title = "ఉదాహరణలు";
            for (int i = 0; i < Examples.Length; i++)
            {
                BarGraphValue B = new BarGraphValue();
                B.Value = (Examples[i] * 100) / tot;
                switch (i)
                {
                case 0:
                    B.Title = string.Format("<b>{0}</b> పద్యరకాలకు కనీసం ఒక్క ఉదాహరణ కూడా లేదు.", Examples[i], i);
                    break;

                case 5:
                    B.Title = string.Format("<b>{0}</b> పద్యరకాలకు <b>{1}</b> లేదా అంతకంటే ఎక్కువ ఉదాహరణలు కలవు.", Examples[i], i);
                    break;

                default:
                    B.Title = string.Format("<b>{0}</b> పద్యరకాలకు కనీసం <b>{1}</b> ఉదాహరణలు కలవు.", Examples[i], i);
                    break;
                }

                B.Color = ColorCode(i);
                L.Add(B);
            }
            return(BarGraph.BuildGraph(L));
        }
Esempio n. 2
0
        private string GetExamplesReport()
        {
            tot = 0;
            int[]    Examples = GetExamplesData();
            BarGraph L        = new BarGraph();

            L.Title = "ఉదాహరణలు";
            for (int i = 0; i < Examples.Length; i++)
            {
                BarGraphValue B = new BarGraphValue();
                B.Value = (Examples[i] * 100) / tot;

                switch (i)
                {
                case 0:
                    B.Title = string.Format("<b>{0}</b> పద్యరకాలకు ఉదాహరణలు లేవు.", Examples[i]);
                    break;

                default:
                    if (i > 5)
                    {
                        B.Title = string.Format("<b>{0}</b> పద్యరకాలకు <b>5</b> కంటే ఎక్కువ ఉదాహరణలు కలవు.", Examples[i]);
                    }
                    else
                    {
                        B.Title = string.Format("<b>{0}</b> పద్యరకాలకు <b>{1}</b> ఉదాహరణలు కలవు.", Examples[i], i);
                    }
                    break;
                }
                B.Color = ColorCode(i);
                L.Add(B);
            }
            return(BarGraph.BuildGraph(L));
        }
Esempio n. 3
0
        private string GetYatiReport()
        {
            tot = 0;
            int[] YatiData = GetYatiData();

            BarGraph L = new BarGraph();

            L.Title = "యతి";
            for (int i = 0; i < YatiData.Length; i++)
            {
                BarGraphValue B = new BarGraphValue();
                B.Value = (YatiData[i] * 100) / tot;
                B.Title = string.Format("<b>{0}</b> పద్యరకాలకు  యతులు <b>{1}</b>", YatiData[i], i != 0 ? "కలవు" : "లేవు");
                B.Color = (i == 0 ? "Red" : "Green");
                L.Add(B);
            }
            return(BarGraph.BuildGraph(L));
        }