Example #1
0
 public nfloat ValueForSecondaryBarAtIndex(BarChart barChart, int index)
 {
     if (_reportView.MaxTotal == 0)
     {
         return(0);
     }
     return((ActivityList [index].BillableTime == 0) ? 0 : (nfloat)(ActivityList [index].BillableTime / TimeSpan.FromHours(_reportView.MaxTotal).TotalSeconds));
 }
Example #2
0
        public BarChartView()
        {
            ActivityList = new List <ReportActivity> ();

            titleTimeLabel      = new UILabel();
            titleTimeLabel.Text = "ReportsTotalLabel".Tr();
            titleTimeLabel.Apply(Style.ReportsView.BarCharLabelTitle);
            Add(titleTimeLabel);

            totalTimeLabel = new UILabel();
            totalTimeLabel.Apply(Style.ReportsView.BarCharLabelValue);
            Add(totalTimeLabel);

            titleMoneyLabel = new UILabel();
            titleMoneyLabel.Apply(Style.ReportsView.BarCharLabelTitle);
            titleMoneyLabel.Text = "ReportsBillableLabel".Tr();
            Add(titleMoneyLabel);
            moneyLabel = new UILabel();
            moneyLabel.Apply(Style.ReportsView.BarCharLabelValue);
            Add(moneyLabel);

            barChart = new BarChart()
            {
                DataSource = this
            };
            Add(barChart);

            noProjectTitleLabel        = new UILabel();
            noProjectTitleLabel.Center = new CGPoint(barChart.Center.X, barChart.Center.Y - 20);
            noProjectTitleLabel.Apply(Style.ReportsView.NoProjectTitle);
            noProjectTitleLabel.Text = "ReportsLoadingTitle".Tr();
            Add(noProjectTitleLabel);

            noProjectTextLabel        = new UILabel();
            noProjectTextLabel.Center = new CGPoint(barChart.Center.X, barChart.Center.Y + 5);
            noProjectTextLabel.Apply(Style.ReportsView.DonutMoneyLabel);
            noProjectTextLabel.Lines = 2;
            noProjectTextLabel.Text  = "ReportsLoadingText".Tr();
            Add(noProjectTextLabel);
        }
Example #3
0
        public BarChartView ()
        {
            ActivityList = new List<ReportActivity> ();

            titleTimeLabel = new UILabel ();
            titleTimeLabel.Text = "ReportsTotalLabel".Tr ();
            titleTimeLabel.Apply (Style.ReportsView.BarCharLabelTitle );
            Add (titleTimeLabel);

            totalTimeLabel = new UILabel ();
            totalTimeLabel.Apply (Style.ReportsView.BarCharLabelValue);
            Add (totalTimeLabel);

            titleMoneyLabel = new UILabel ();
            titleMoneyLabel.Apply (Style.ReportsView.BarCharLabelTitle);
            titleMoneyLabel.Text = "ReportsBillableLabel".Tr ();
            Add (titleMoneyLabel);
            moneyLabel = new UILabel ();
            moneyLabel.Apply (Style.ReportsView.BarCharLabelValue );
            Add (moneyLabel);

            barChart = new BarChart () {
                DataSource = this
            };
            Add (barChart);

            noProjectTitleLabel = new UILabel ();
            noProjectTitleLabel.Center = new CGPoint (barChart.Center.X, barChart.Center.Y - 20);
            noProjectTitleLabel.Apply (Style.ReportsView.NoProjectTitle);
            noProjectTitleLabel.Text = "ReportsLoadingTitle".Tr ();
            Add (noProjectTitleLabel);

            noProjectTextLabel = new UILabel ();
            noProjectTextLabel.Center = new CGPoint (barChart.Center.X, barChart.Center.Y + 5 );
            noProjectTextLabel.Apply (Style.ReportsView.DonutMoneyLabel);
            noProjectTextLabel.Lines = 2;
            noProjectTextLabel.Text = "ReportsLoadingText".Tr ();
            Add (noProjectTextLabel);
        }
Example #4
0
 public string TextForBarAtIndex (BarChart barChart, int index)
 {
     return _reportView.ChartRowLabels [index];
 }
Example #5
0
 public nfloat ValueForSecondaryBarAtIndex (BarChart barChart, int index)
 {
     if (_reportView.MaxTotal == 0) {
         return 0;
     }
     return (ActivityList [index].BillableTime == 0) ? 0 : (nfloat) (ActivityList [index].BillableTime / TimeSpan.FromHours (_reportView.MaxTotal ).TotalSeconds);
 }
Example #6
0
 public int NumberOfBarsOnChart (BarChart barChart)
 {
     return ActivityList.Count;
 }
Example #7
0
 public string TextForBarAtIndex(BarChart barChart, int index)
 {
     return(_reportView.ChartRowLabels [index]);
 }
Example #8
0
 public int NumberOfBarsOnChart(BarChart barChart)
 {
     return(ActivityList.Count);
 }