mirror of
https://github.com/red-data-tools/YouPlot.git
synced 2025-05-05 22:31:11 +08:00
Add new file params.rb
This commit is contained in:
parent
50cb8d7463
commit
3b8846efbe
@ -5,33 +5,6 @@ module Uplot
|
||||
Data = Struct.new(:headers, :series)
|
||||
|
||||
class Command
|
||||
Params = Struct.new(
|
||||
# Sort me!
|
||||
:title,
|
||||
:width,
|
||||
:height,
|
||||
:border,
|
||||
:margin,
|
||||
:padding,
|
||||
:color,
|
||||
:xlabel,
|
||||
:ylabel,
|
||||
:labels,
|
||||
:symbol,
|
||||
:xscale,
|
||||
:nbins,
|
||||
:closed,
|
||||
:canvas,
|
||||
:xlim,
|
||||
:ylim,
|
||||
:grid,
|
||||
:name
|
||||
) do
|
||||
def to_hc
|
||||
to_h.compact
|
||||
end
|
||||
end
|
||||
|
||||
attr_accessor :params, :command
|
||||
attr_reader :raw_inputs, :data, :fmt
|
||||
|
||||
|
30
lib/uplot/command/params.rb
Normal file
30
lib/uplot/command/params.rb
Normal file
@ -0,0 +1,30 @@
|
||||
module Uplot
|
||||
class Command
|
||||
Params = Struct.new(
|
||||
# Sort me!
|
||||
:title,
|
||||
:width,
|
||||
:height,
|
||||
:border,
|
||||
:margin,
|
||||
:padding,
|
||||
:color,
|
||||
:xlabel,
|
||||
:ylabel,
|
||||
:labels,
|
||||
:symbol,
|
||||
:xscale,
|
||||
:nbins,
|
||||
:closed,
|
||||
:canvas,
|
||||
:xlim,
|
||||
:ylim,
|
||||
:grid,
|
||||
:name
|
||||
) do
|
||||
def to_hc
|
||||
to_h.compact
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user