HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
📌
hkob's Notion
/
ℹ️
逆引きFormula 2.0
/
💾
Database storage
/
🧵
ステータスの進捗度をRingで表示するには?
🧵

ステータスの進捗度をRingで表示するには?

Status
Update
関数説明
📓
replaceAll
📓
toNumber
属性名
Progress
返り値
Integer
関連するもの
ℹ️
逆引きFormula 2.0
に戻る
まず、ステータスプロパティに進捗度の数値を入れておきます。あとは以前説明した
🧵
文字列から数値を取り出すには?
のテクニックを使って数値にします。
  1. 文字列から数値を取り出し、Ring で表示します。
    1. /* Status プロパティの数字以外の文字をすべて削除 */ prop("Status").replaceAll("[^0-9]+", "") /* 数値に変換 */ .toNumber()
      →
      📓
      replaceAll
      📓
      toNumber
  1. 進捗度の最大値を Divide by に入れ、Ring 表示にします。Show number を消しておけば、幅を最短にできます。
    1. notion image
      Progress from Status
      Name
      Status
      Progress
      Create a new task
      NaN
      Now designing
      Start design(1)
      1
      Now testing
      Start test(2)
      2
      Now imprementing
      Start imprement(3)
      3
      Finished
      Done(4)
      4