Class: AlGraph::ContainerLine
- Inherits:
-
DataContainer
- Object
- DataContainer
- AlGraph::ContainerLine
- Defined in:
- lib/al_graph.rb
Overview
折れ線グラフ用データコンテナ
線を消してマーカのみの表示にすることもできる。
Direct Known Subclasses
Instance Attribute Summary collapse
-
#at_marker ⇒ Hash
マーカーの描画アトリビュート.
-
#at_marker_several ⇒ Array<Hash>
個別のマーカーの描画アトリビュート.
-
#at_plot_line ⇒ Hash
線の描画アトリビュート.
-
#mode_missing_data ⇒ Symbol
欠損データに対する描画モード :MODE_CONTINUOUS :MODE_BREAK.
Attributes inherited from DataContainer
#at_data_labels, #id, #labels, #legend, #plot, #x_axis, #y_axis, #y_data
Instance Method Summary collapse
-
#clear_line ⇒ Object
(ContainerLine) 線を表示しない.
-
#clear_marker ⇒ Object
(ContainerLine) マーカーを表示しない.
-
#initialize(ydata, legend = nil) ⇒ ContainerLine
constructor
(ContainerLine) constructor.
-
#set_color(color) ⇒ Object
(also: #color=)
(ContainerLine) 色の指定.
Methods inherited from DataContainer
#add_data_labels, #each, #size
Constructor Details
#initialize(ydata, legend = nil) ⇒ ContainerLine
(ContainerLine) constructor
1868 1869 1870 1871 1872 1873 1874 1875 |
# File 'lib/al_graph.rb', line 1868 def initialize(ydata, legend = nil) super @at_plot_line = {:stroke_width=>2, :fill=>:none} @at_marker = {:format=>nil, :stroke=>:black, :stroke_width=>2} @at_marker_several = [] @mode_missing_data = :MODE_CONTINUOUS end |
Instance Attribute Details
#at_marker ⇒ Hash
Returns マーカーの描画アトリビュート.
1852 1853 1854 |
# File 'lib/al_graph.rb', line 1852 def at_marker @at_marker end |
#at_marker_several ⇒ Array<Hash>
Returns 個別のマーカーの描画アトリビュート.
1855 1856 1857 |
# File 'lib/al_graph.rb', line 1855 def at_marker_several @at_marker_several end |
#at_plot_line ⇒ Hash
Returns 線の描画アトリビュート.
1849 1850 1851 |
# File 'lib/al_graph.rb', line 1849 def at_plot_line @at_plot_line end |
#mode_missing_data ⇒ Symbol
Returns 欠損データに対する描画モード :MODE_CONTINUOUS :MODE_BREAK.
1858 1859 1860 |
# File 'lib/al_graph.rb', line 1858 def mode_missing_data @mode_missing_data end |
Instance Method Details
#clear_line ⇒ Object
(ContainerLine) 線を表示しない
1881 1882 1883 |
# File 'lib/al_graph.rb', line 1881 def clear_line() @at_plot_line.clear end |
#clear_marker ⇒ Object
(ContainerLine) マーカーを表示しない
1889 1890 1891 |
# File 'lib/al_graph.rb', line 1889 def clear_marker() @at_marker.clear end |
#set_color(color) ⇒ Object Also known as: color=
(ContainerLine) 色の指定
1902 1903 1904 1905 |
# File 'lib/al_graph.rb', line 1902 def set_color(color) @at_plot_line[:stroke] = color if !@at_plot_line.empty? @at_marker[:fill] = color if !@at_marker.empty? end |