Skip to content

Instantly share code, notes, and snippets.

@shoe116
Last active April 1, 2022 01:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shoe116/f201964543bcc9b8d64f177ffd647ac2 to your computer and use it in GitHub Desktop.
Save shoe116/f201964543bcc9b8d64f177ffd647ac2 to your computer and use it in GitHub Desktop.
バフェットコードの提供するwidgetの使い方です

バフェットコード ウィジットの使い方

下記の手順に従って、適切なページに埋め込んでください。 ウィジットのsrc、バフェットコードへのリンクの ${TICKER} 文字列は、ご自身の会社の銘柄コード(4桁の半角整数)に置き換えてください。

決算ハイライト

<div id="buffett-code-widget-financial-highlights" data-chart-colors="rgba(0, 104, 183, 0.8):rgba(199, 36, 36, 0.8):rgba(255, 163, 25, 0.8):rgba(35, 172, 14, 0.8)"></div>
<script type="module" src="https://widget.buffett-code.com/v1/${TICKER}/financial-highlights.js" async charset="utf-8"></script>
<a href="https://www.buffett-code.com/company/${TICKER}/" style="font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif">Powered by バフェット・コード</a>

グラフの凡例の配色変更

data-chart-colors 属性を指定することでグラフの凡例の色を変更できます。
#ff6600 のような16進数カラーコード、または rgba(255, 127, 0, 1) のようなCSSの色指定リテラルのいずれかを、区切り文字 : で連結して4色指定してください。 未設定の場合、指定色が足りない場合はデフォルトで配色されます。

株式の状況

<div id="buffett-code-widget-stock-information"></div>
<script type="module" src="https://widget.buffett-code.com/v1/${TICKER}/stock-information.js" async charset="utf-8"></script>
<a href="https://www.buffett-code.com/company/${TICKER}/" style="font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif">Powered by バフェット・コード</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment