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)); }
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); }
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); }
public string TextForBarAtIndex (BarChart barChart, int index) { return _reportView.ChartRowLabels [index]; }
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); }
public int NumberOfBarsOnChart (BarChart barChart) { return ActivityList.Count; }
public string TextForBarAtIndex(BarChart barChart, int index) { return(_reportView.ChartRowLabels [index]); }
public int NumberOfBarsOnChart(BarChart barChart) { return(ActivityList.Count); }