algraph:円グラフ
差分
このページの2つのバージョン間の差分を表示します。
次のリビジョン | 前のリビジョン | ||
algraph:円グラフ [2019/02/04 11:00] – 外部編集 127.0.0.1 | algraph:円グラフ [2019/04/07 19:37] (現在) – hirohito | ||
---|---|---|---|
行 1: | 行 1: | ||
====== 円グラフ ====== | ====== 円グラフ ====== | ||
+ | |||
+ | ===== 基本的な使い方 ===== | ||
テンプレートファイル | テンプレートファイル | ||
<code html index.html> | <code html index.html> | ||
< | < | ||
- | <object width=" | + | <img src="< |
</ | </ | ||
コード | コード | ||
<code ruby main.rb> | <code ruby main.rb> | ||
- | require 'al_template' | + | require 'alone' |
require ' | require ' | ||
行 41: | 行 43: | ||
- | デフォルト(再掲) | + | ===== デフォルト(再掲) |
- | {{: | + | {{: |
- | セパレートして強調 | + | <code ruby> |
+ | def action_pie_sample_01 | ||
+ | ydata1 = [5, 3, 6, 3, 2, 5, 6] | ||
+ | labels = [' | ||
+ | |||
+ | graph = AlGraphPie.new | ||
+ | graph.add_data(ydata1, | ||
+ | |||
+ | graph.draw | ||
+ | end | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== セパレートして強調 | ||
+ | |||
+ | {{: | ||
+ | |||
+ | <code ruby> | ||
+ | def action_pie_sample_02 | ||
+ | ydata1 = [5, 3, 6, 3, 2, 5, 6] | ||
+ | labels = [' | ||
+ | |||
+ | graph = AlGraphPie.new | ||
+ | ds = graph.add_data(ydata1, | ||
+ | ds[2].separate | ||
+ | |||
+ | graph.draw | ||
+ | end | ||
+ | </ | ||
- | {{: | ||
algraph/円グラフ.txt · 最終更新: 2019/04/07 19:37 by hirohito