void RenderValuationGrowth() { var monthly = CompanyStatisticsUtils.GetValuationGrowth(entity, 3); var yearly = CompanyStatisticsUtils.GetValuationGrowth(entity, 12); var quarGrowth = monthly == 0 ? "???" : Format.Sign(monthly) + "%"; var yrGrowth = yearly == 0 ? "???" : Format.Sign(yearly) + "%"; //ValuationGrowth.text = $"{monGrowth} / {yrGrowth}"; ValuationGrowth.text = QuarterlyOrYearly ? quarGrowth : yrGrowth; }
public override string RenderValue() { int duration = 3; if (Monthly) { duration = 1; } else if (Yearly) { duration = 12; } var growth = CompanyStatisticsUtils.GetValuationGrowth(SelectedCompany, duration); return(Format.Sign(growth) + "%"); }