Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

After Effects Countdown Komma für Dezimalstellen

Community Beginner ,
Nov 16, 2022 Nov 16, 2022

Hallo zusammen

 

Ich erstelle gerade ein Balkendiagramm mit Zahlen, die von 0 bis 9,7 zählen. Nun hab ich rausgefunden, wie ich bei Tausender den Punkt als Hochkomma anpassen kann. Hab aber noch nicht herausgefunden, wie ich für die Dezimalstellen anstelle eines Punktes (7.9) eine Komma setzen kann (7,9).

 

Ich hab diesen Code im Moment drin:

 

s = "" + (effect("Einstellungen für Punkte")("Punkt")[0]) .toFixed(1) + ""; s.replace(/\B(?=(\d{3})+(?!\d))/g, ",");

 

Vielen Dank schon im Voraus für eure rasche Hilfe.

 

Liebe Grüsse

Nicole

TOPICS
Error or problem , FAQ , Scripting
1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 16, 2022 Nov 16, 2022

Try this:

v = effect("Slider Control")("Slider").value;
s = v.toFixed(1);
n = s.replace(/\B(?=(\d{3})+(?! \d))/g, ",");
n.toString().replace(".", "˛")

Replace the "v" variable with your point controller. 

 

Or you can try just adding the last line of the code to yours like this:

s = "" + (effect("Einstellungen für Punkte")("Punkt")[0]) .toFixed(1) + "";
s.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
s.toString().replace(".", "˛")

The "" + (effect... and the + "" do not really do anything.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 24, 2022 Nov 24, 2022
LATEST

Thank you very much! It worked! 🙂

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines