李其學JavaScript物件CANVAS繪製選擇權到期日損益

identifier名稱,身分證id card

李其學w3schools學物件

CANVAS繪製選擇權到期日損益

以上CANVAS繪製選擇權到期日損益圖程式碼

<canvas canvas="" height="300" id="myCanvas" width="500">

<script>

const canvas = document.getElementById("myCanvas");

const ctx = canvas.getContext("2d");

ctx.beginPath();

ctx.moveTo(0,0);

ctx.lineTo(100,100);

ctx.lineTo(200,100);

ctx.font="30px";

ctx.fillText("買入賣權puts的到期日損益",0,120)

ctx.moveTo(300,100);

ctx.lineTo(400,100);

ctx.lineTo(500,0);

ctx.fillText("買入買權calls的到期日損益",300,120)

ctx.moveTo(0,300);

ctx.lineTo(100,200);

ctx.lineTo(200,200);

ctx.fillText("賣出賣權puts的到期日損益",0,180)

ctx.moveTo(300,200);

ctx.lineTo(400,200);

ctx.lineTo(500,300);

ctx.fillText("賣出買權calls的到期日損益",300,180)

ctx.stroke();

</script>

</canvas>

wikipedia括號brackets

  • 圓括弧(英語:parentheses或英語:round brackets),中文中又稱小括弧括弧
  • 方括弧(英語:brackets或英語:square brackets),中文中又稱中括弧
    • 半形 :[ ]
    • 全形:[ ]
  • 花括弧(英語:braces,或英語:curly brackets), 中文中又稱大括弧
    • 半形:{ }
    • 全形:{ }
  • 角括弧(英語:chevrons或英語:angle brackets),中文中又稱為尖括弧
    • 半形 :⟨ ⟩,在英文中指示想到而未說的話語,但經常由小於號<)和大於號>)代替 。
    • 全形 :〈 〉,在中文中用作單書名號
  • 雙角括弧(英語:double angle brackets),中文中又稱為雙尖括弧
    • 半形:⟪ ⟫
    • 全形:《 》,在中文中用作雙書名號

留言

  1. 1211要自己做,才會進步!https://kevin124574811.blogspot.com/2023/12/blog-post.html

    回覆刪除

張貼留言

這個網誌中的熱門文章

李其學[串列list](元組tuple){集合set}{字典:dict}

李其學視窗物件控制連續的視窗物件

李其學w3schools學習emoji與Javascript迴圈