ユーザ用ツール

サイト用ツール


algraph:円グラフ

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

次のリビジョン
前のリビジョン
algraph:円グラフ [2019/02/04 11:00] – 外部編集 127.0.0.1algraph:円グラフ [2019/04/07 19:37] (現在) hirohito
行 1: 行 1:
 ====== 円グラフ ====== ====== 円グラフ ======
 +
 +===== 基本的な使い方 =====
  
 テンプレートファイル テンプレートファイル
 <code html index.html> <code html index.html>
 <!DOCTYPE html> <!DOCTYPE html>
-<object width="320" height="240" type="image/svg+xml" data="<%= Alone.make_uri(action:'graph_sample') %>"></object>+<img src="<%= Alone.make_uri(action:'graph_sample') %>">
 </code> </code>
  
 コード コード
 <code ruby main.rb> <code ruby main.rb>
-require 'al_template'+require 'alone'
 require 'al_graph_pie' require 'al_graph_pie'
  
行 41: 行 43:
  
  
-デフォルト(再掲)+===== デフォルト(再掲) =====
  
-{{:algraph:pie_sample_01.png?nolink|}}+{{:algraph:pie_sample_01.png?nolink |}}
  
-セパレートして強調+<code ruby> 
 +  def action_pie_sample_01 
 +    ydata1 = [5, 3, 6, 3, 2, 5, 6] 
 +    labels = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
 + 
 +    graph = AlGraphPie.new 
 +    graph.add_data(ydata1, labels) 
 + 
 +    graph.draw 
 +  end 
 +</code> 
 + 
 + 
 +===== セパレートして強調 ===== 
 + 
 +{{:algraph:pie_sample_02.png?nolink |}} 
 + 
 +<code ruby> 
 +  def action_pie_sample_02 
 +    ydata1 = [5, 3, 6, 3, 2, 5, 6] 
 +    labels = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
 + 
 +    graph = AlGraphPie.new 
 +    ds = graph.add_data(ydata1, labels) 
 +    ds[2].separate 
 + 
 +    graph.draw 
 +  end 
 +</code>
  
-{{:algraph:pie_sample_02.png?nolink|}} 
  
algraph/円グラフ.txt · 最終更新: 2019/04/07 19:37 by hirohito