You need to sign in to do that
Don't have an account?

Flex Help
I'm trying to format a number(revenue) being returned from my SOQL query in the datatipfunction. I have multiple lineseries in my linechart and this is the function I'm trying to use but it only formats the number for one of the lineseries, no matter which line series my mouse is over it only shows the amount from the bottom line. How can I get the correct value to format?
public function myDataTipFunction(e:HitData):String
{
var cf:CurrencyFormatter = new CurrencyFormatter();
cf.rounding="none";
cf.decimalSeparatorTo=".";
cf.thousandsSeparatorTo=",";
cf.useThousandsSeparator="true";
cf.currencySymbol="$";
cf.alignSymbol="left";
cf.precision="0";
var s:String;
s = "<B>" + e.item.Week + "</B>\n";
s += "<I>Amount:</I> <FONT COLOR='#339966'>";
s += cf.format(e.item.Amount) + "</FONT>\n";
return s;
}
public function myDataTipFunction(e:HitData):String
{
var cf:CurrencyFormatter = new CurrencyFormatter();
cf.rounding="none";
cf.decimalSeparatorTo=".";
cf.thousandsSeparatorTo=",";
cf.useThousandsSeparator="true";
cf.currencySymbol="$";
cf.alignSymbol="left";
cf.precision="0";
var s:String;
s = "<B>" + e.item.Week + "</B>\n";
s += "<I>Amount:</I> <FONT COLOR='#339966'>";
s += cf.format(e.item.Amount) + "</FONT>\n";
return s;
}
is that possible?
you can add debug statements to this code and then view the log to see if it's getting called with different values or called only once.
public function myDataTipFunction(e:HitData):String
{
var cf:CurrencyFormatter = new CurrencyFormatter();
var s:String;
cf.rounding="none";
cf.decimalSeparatorTo=".";
cf.thousandsSeparatorTo=",";
cf.useThousandsSeparator="true";
cf.currencySymbol="$";
cf.alignSymbol="left";
cf.precision="0";
var item:LineSeriesItem = e.chartItem as LineSeriesItem;
s = "<B>" + e.item.Week + "</B>\n";
s += "<I>Amount:</I> <FONT COLOR='#339966'>";
s += cf.format(item.yNumber) + "</FONT>\n";
return s;
}