Class: PDF::Charts::StdDev::Scale

Inherits:
Object
  • Object
show all
Defined in:
lib/gems/pdf-writer-1.1.8/lib/pdf/charts/stddev.rb

Overview

The scale of the dataset.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = { }) {|_self| ... } ⇒ Scale

Returns a new instance of Scale.

Yields:

  • (_self)

Yield Parameters:

Raises:

  • (TypeError)


51
52
53
54
55
56
57
58
59
60
61
# File 'lib/gems/pdf-writer-1.1.8/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

#firstObject

:nodoc:



67
68
69
# File 'lib/gems/pdf-writer-1.1.8/lib/pdf/charts/stddev.rb', line 67

def first
  @first
end

#labelObject

Defines the label options.



93
94
95
# File 'lib/gems/pdf-writer-1.1.8/lib/pdf/charts/stddev.rb', line 93

def label
  @label
end

#lastObject

:nodoc:



76
77
78
# File 'lib/gems/pdf-writer-1.1.8/lib/pdf/charts/stddev.rb', line 76

def last
  @last
end

#rangeObject

Range of the scale. This should be a Range object.



64
65
66
# File 'lib/gems/pdf-writer-1.1.8/lib/pdf/charts/stddev.rb', line 64

def range
  @range
end

#show_labelsObject

Shows the scale labels if true.



91
92
93
# File 'lib/gems/pdf-writer-1.1.8/lib/pdf/charts/stddev.rb', line 91

def show_labels
  @show_labels
end

#stepObject

Defines the step of the scale. Each step represents a vertical position on the chart.



85
86
87
# File 'lib/gems/pdf-writer-1.1.8/lib/pdf/charts/stddev.rb', line 85

def step
  @step
end

#styleObject

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/gems/pdf-writer-1.1.8/lib/pdf/charts/stddev.rb', line 89

def style
  @style
end