V1 is the one I have been messing with and sequence V2 should have the original. Thanks!
PVG_MarketUpdate_InfoG_DB.aep
Now that I'm a little more awake here's the solution. Basically you have to define the calculated number as the s (short for string) value that Dan's punctuation expression expression is looking for. That needs to happen just after the { that starts the if calculation and just after the { that starts the else calculation.
You have manually added a leading $ to the text string and Dan's punctuation expression is going to see that as a column so it could add an extra comma. You have to remove the "$" but for reasons that I did not dig through you have to leave in the "".
I found the trouble by quickly going through the expression you wrote and giving it some punctuation and comments. I also corrected the ease_in method and basically used the default language from the Expression Language Menu > Interpolation helper and just added an e to the else arrays to keep them separated.
The corrected expression looks like this:
// punctuation setup
numDecimals = 0;
commas = true;
dollarSign = true;
// variables from sliders
duration = thisComp.layer("BarsController").effect("Animation duration labels")("Slider");
offset = thisComp.layer("BarsController").effect("Animation labels start time offset")("Slider");
circle_offset = thisComp.layer("BarsController").effect("Animation bar scale offset")("Slider");
distance = thisComp.layer("BarsController").effect("Distance amount")("Slider");
label_Ypos = thisComp.layer("BarsController").effect("Labels distance")("Slider");
endAt = thisComp.layer("BarsController").effect("Animation labels end time offset")("Slider");
stay = thisComp.layer("BarsController").effect("Stay still until")("Slider")
// find layer and retrieve name
str = thisLayer.name;
if(str.length < 7){
pos = parseInt(str[6]);}
else{
pos = parseInt(str.substr(6,str.length));}
pos = pos-1;
t = time;
// calculate if values
tMin = 1+pos*circle_offset+offset;
tMax = 1+pos*circle_offset+offset+duration;
value1 = 0;
value2 = thisComp.layer(thisLayer.name.substr(5, thisLayer.name.length)).effect("Value")("Slider");
// calculate else values
etMin = stay+endAt;
etMax = stay+endAt+pos*circle_offset+offset+duration;
evalue1 = thisComp.layer(thisLayer.name.substr(5, thisLayer.name.length)).effect("Value")("Slider");
evalue2 = 0;
if(time < stay+endAt){
s = ""+ Math.round(easeIn(t, tMin, tMax, value1, value2));}
else{
s = ""+ Math.round(easeIn(t, etMin, etMax, evalue1 ,evalue2));}
// insert punctuation
prefix = "";
if (s[0] == "-"){
prefix = "-";
s = s.substr(1);
}
if(dollarSign) prefix += "$";
if (commas){
decimals = "";
if (numDecimals > 0){
decimals = s.substr(-(numDecimals + 1));
s = s.substr(0,s.length - (numDecimals + 1));
}
outStr = s.substr(-s.length, (s.length-1)%3 +1);
for (i = Math.floor((s.length-1)/3); i > 0; i--){
outStr += "," + s.substr(-i*3,3);
}
prefix + outStr + decimals;
}else{
prefix + s;
}
It is amazing how much easier it is to troubleshoot an expression if you give it a little air by using tabs and spaces. This is a much more complicated way of creating this data animation than I would have used. Index instead of layer name would be a good place to start. Expression controlled values for you bars would be another place. My approach would have been to use an index - argument and tie things together so one animated value would drive everything and all you had to do was duplicate the layer set to bring in more bars.
Anyway, copy and paste the expression and things should work. I hope you followed the logic.