I understand this is a relatively new product, but I'm running into a pretty odd issue with the chart not formatting decimal values from a Typed List into currency.
Here is what's on the front-end. Note, that for the DataFormatString in the Series' Label and Tooltip Appearance I've tried ${0}, {0:C}, ${0:0.00}, and a multitude of other options. However, it would show the entire decimal value (rather than rounding up on the last two digits) (see attached). What's interesting is that the Y-Axis label comes up perfectly fine.
This is what generates the data for the chart:
Now, if I change the line that generates the sum of CommissionDue to decimal.Round(r.Sum(x => x.CommissionDue), 2, MidpointRounding.AwayFromZero) it obviously rounds up the first two digits, but doesn't show a comma.
Shouldn't the front end format it using either of those formatting options or am I doing something wrong?
Here is what's on the front-end. Note, that for the DataFormatString in the Series' Label and Tooltip Appearance I've tried ${0}, {0:C}, ${0:0.00}, and a multitude of other options. However, it would show the entire decimal value (rather than rounding up on the last two digits) (see attached). What's interesting is that the Y-Axis label comes up perfectly fine.
This is what generates the data for the chart:
var qry = _ctx.VSalesRepCommissionGroupeds
.Where(s => s.SurgeryDate.Value >= RadCommissionChartBeginOn)
.OrderBy(s => s.SurgeryDate.Value)
.Select(r =>
new
{
r.CommissionDue,
SurgeryDate = r.SurgeryDate.Value.ToString(
"MMM yyyy"
)
}).ToList();
radData = qry.GroupBy(r => r.SurgeryDate).Select(r =>
new
RepCommissionChartData
{
Commissions = r.Sum(x => x.CommissionDue),
SurgeryDate = r.Key
}).ToList();
Now, if I change the line that generates the sum of CommissionDue to decimal.Round(r.Sum(x => x.CommissionDue), 2, MidpointRounding.AwayFromZero) it obviously rounds up the first two digits, but doesn't show a comma.
Shouldn't the front end format it using either of those formatting options or am I doing something wrong?