Sha256: 9f19939b073f91ec2a0a2440501b3d8ce5efe9a45e790792477071693e21f374
Contents?: true
Size: 411 Bytes
Versions: 11
Compression:
Stored size: 411 Bytes
Contents
module Squid class AxisLabel 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 attr_reader :label, :y, :align, :width def initialize(label:, y:, align:, width:) @label, @y, @align, @width = label, y, align, width end end end
Version data entries
11 entries across 11 versions & 1 rubygems