Class: AlGraph::GraphView

Inherits:
Object
  • Object
show all
Defined in:
lib/al_graph_base.rb

Overview

描画機能のベースクラス

Direct Known Subclasses

Axis, BarPlot, GraphBase, LinePlot

Constant Summary collapse

ATTR_NAMES =

make_common_attribute_string()用アトリビュート制御テーブル 値がnilなら無視するアトリビュート、Stringならそれにリネームする。

{
  # ignores
  :node_value => nil,
  :format => nil,
  :grid => nil,
  :image => nil,
  :length => nil,
  :position => nil,
  :rotate => nil,
  :separate_distance => nil,
  :shape => nil,
  :size => nil,
  :line_spacing => nil,
  :renderer => nil,

  # stroke styles
  :stroke_width => "stroke-width",
  :stroke_dasharray => "stroke-dasharray",
  # fonts
  :font_size => "font-size",
  :font_family => "font-family",
  :font_weight => "font-weight",
  :font_style => "font-style",
  :text_anchor => "text-anchor",
  :text_decoration => "text-decoration",
  # opacity
  :stroke_opacity => "stroke-opacity",
  :fill_opacity => "fill-opacity",
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(width, height) ⇒ GraphView

(GraphView) constructor

Parameters:

  • width (Integer)

  • height (Integer)

    高さ



82
83
84
85
86
# File 'lib/al_graph_base.rb', line 82

def initialize(width, height)
  @width = width
  @height = height
  @data_series = []
end

Instance Attribute Details

#data_seriesArray<DataContainer> (readonly)

Returns データコンテナの配列.

Returns:



72
73
74
# File 'lib/al_graph_base.rb', line 72

def data_series
  @data_series
end

#heightInteger

Returns 占める領域の高さ.

Returns:

  • (Integer)

    占める領域の高さ



69
70
71
# File 'lib/al_graph_base.rb', line 69

def height
  @height
end

#widthInteger

Returns 占める領域の幅.

Returns:

  • (Integer)

    占める領域の幅



66
67
68
# File 'lib/al_graph_base.rb', line 66

def width
  @width
end