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.
52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/pdf/charts/stddev.rb', line 52 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:
68 69 70 |
# File 'lib/pdf/charts/stddev.rb', line 68 def first @first end |
#label ⇒ Object
Defines the label options.
94 95 96 |
# File 'lib/pdf/charts/stddev.rb', line 94 def label @label end |
#last ⇒ Object
:nodoc:
77 78 79 |
# File 'lib/pdf/charts/stddev.rb', line 77 def last @last end |
#range ⇒ Object
Range of the scale. This should be a Range object.
65 66 67 |
# File 'lib/pdf/charts/stddev.rb', line 65 def range @range end |
#show_labels ⇒ Object
Shows the scale labels if true
.
92 93 94 |
# File 'lib/pdf/charts/stddev.rb', line 92 def show_labels @show_labels end |
#step ⇒ Object
Defines the step of the scale. Each step represents a vertical position on the chart.
86 87 88 |
# File 'lib/pdf/charts/stddev.rb', line 86 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.
90 91 92 |
# File 'lib/pdf/charts/stddev.rb', line 90 def style @style end |