class Squid::AxisLabel

Attributes

align[R]
label[R]
width[R]
y[R]

Public Class Methods

for(axis, height:, align:) click to toggle source
# File lib/squid/axis_label.rb, line 3
def self.for(axis, height:, align:)
  height.step(0, -height/(axis.labels.size-1).to_f).map.with_index do |y, i|
    new y: y, label: axis.labels[i], align: align, width: axis.width
  end
end
new(label:, y:, align:, width:) click to toggle source
# File lib/squid/axis_label.rb, line 11
def initialize(label:, y:, align:, width:)
  @label, @y, @align, @width = label, y, align, width
end