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
1870 1871 1872 1873 1874 1875 1876 1877 |
# File 'lib/al_graph.rb', line 1870 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 マーカーの描画アトリビュート.
1854 1855 1856 |
# File 'lib/al_graph.rb', line 1854 def at_marker @at_marker end |
#at_marker_several ⇒ Array<Hash>
Returns 個別のマーカーの描画アトリビュート.
1857 1858 1859 |
# File 'lib/al_graph.rb', line 1857 def at_marker_several @at_marker_several end |
#at_plot_line ⇒ Hash
Returns 線の描画アトリビュート.
1851 1852 1853 |
# File 'lib/al_graph.rb', line 1851 def at_plot_line @at_plot_line end |
#mode_missing_data ⇒ Symbol
Returns 欠損データに対する描画モード :MODE_CONTINUOUS :MODE_BREAK.
1860 1861 1862 |
# File 'lib/al_graph.rb', line 1860 def mode_missing_data @mode_missing_data end |
Instance Method Details
#clear_line ⇒ Object
(ContainerLine) 線を表示しない
1883 1884 1885 |
# File 'lib/al_graph.rb', line 1883 def clear_line() @at_plot_line.clear end |
#clear_marker ⇒ Object
(ContainerLine) マーカーを表示しない
1891 1892 1893 |
# File 'lib/al_graph.rb', line 1891 def clear_marker() @at_marker.clear end |
#set_color(color) ⇒ Object Also known as: color=
(ContainerLine) 色の指定
1904 1905 1906 1907 |
# File 'lib/al_graph.rb', line 1904 def set_color(color) @at_plot_line[:stroke] = color if !@at_plot_line.empty? @at_marker[:fill] = color if !@at_marker.empty? end |