Class: PDF::Charts::StdDev::Scale
- Inherits:
-
Object
- Object
- PDF::Charts::StdDev::Scale
- Defined in:
- lib/pdf/charts/stddev.rb
Overview
The scale of the dataset.
Instance Attribute Summary collapse
-
#first ⇒ Object
:nodoc:.
-
#label ⇒ Object
Defines the label options.
-
#last ⇒ Object
:nodoc:.
-
#range ⇒ Object
Range of the scale.
-
#show_labels ⇒ Object
Shows the scale labels if
true
. -
#step ⇒ Object
Defines the step of the scale.
-
#style ⇒ Object
Defines the line style for the scale on the chart.
Instance Method Summary collapse
-
#initialize(args = { }) {|_self| ... } ⇒ Scale
constructor
A new instance of Scale.
Constructor Details
#initialize(args = { }) {|_self| ... } ⇒ Scale
Returns a new instance of Scale.
51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/pdf/charts/stddev.rb', line 51 def initialize(args = { }) @range = args[:range] @step = args[:step] @style = args[:style] @show_labels = false yield self if block_given? raise TypeError, PDF::Lange[:charts_stddev_scale_norange] if @range.nil? raise TypeError, PDF::Lange[:charts_stddev_scale_nostep] if @step.nil? end |
Instance Attribute Details
#first ⇒ Object
:nodoc:
67 68 69 |
# File 'lib/pdf/charts/stddev.rb', line 67 def first @first end |
#label ⇒ Object
Defines the label options.
93 94 95 |
# File 'lib/pdf/charts/stddev.rb', line 93 def label @label end |
#last ⇒ Object
:nodoc:
76 77 78 |
# File 'lib/pdf/charts/stddev.rb', line 76 def last @last end |
#range ⇒ Object
Range of the scale. This should be a Range object.
64 65 66 |
# File 'lib/pdf/charts/stddev.rb', line 64 def range @range end |
#show_labels ⇒ Object
Shows the scale labels if true
.
91 92 93 |
# File 'lib/pdf/charts/stddev.rb', line 91 def show_labels @show_labels end |
#step ⇒ Object
Defines the step of the scale. Each step represents a vertical position on the chart.
85 86 87 |
# File 'lib/pdf/charts/stddev.rb', line 85 def step @step end |
#style ⇒ Object
Defines the line style for the scale on the chart. If this is unset (nil
), there will be no horizontal marks across the chart for the steps of the scale.
89 90 91 |
# File 'lib/pdf/charts/stddev.rb', line 89 def style @style end |