REF rename style to config

This commit is contained in:
Nathan Dwarshuis 2021-07-24 01:02:12 -04:00
parent 97120bc9f9
commit 9c31293f9d
3 changed files with 10 additions and 10 deletions

2
core

@ -1 +1 @@
Subproject commit 896bd289485dec964b5edb43c8243e5e3a8d0f7d Subproject commit dd025fd52a623a4cec0ed471c642dd5aa6b078ad

View File

@ -123,32 +123,32 @@ end
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- label plot -- label plot
M.default_grid_style = Timeseries.grid_style( M.default_grid_config = Timeseries.grid_config(
PLOT_GRID_X_N, PLOT_GRID_X_N,
PLOT_GRID_Y_N, PLOT_GRID_Y_N,
Theme.PLOT_GRID_FG Theme.PLOT_GRID_FG
) )
M.default_plot_style = Timeseries.style( M.default_plot_style = Timeseries.config(
PLOT_NUM_POINTS, PLOT_NUM_POINTS,
Theme.PLOT_OUTLINE_FG, Theme.PLOT_OUTLINE_FG,
Theme.PLOT_FILL_BORDER_PRIMARY, Theme.PLOT_FILL_BORDER_PRIMARY,
Theme.PLOT_FILL_BG_PRIMARY, Theme.PLOT_FILL_BG_PRIMARY,
M.default_grid_style M.default_grid_config
) )
M.percent_label_style = Timeseries.label_style( M.percent_label_config = Timeseries.label_config(
Theme.INACTIVE_TEXT_FG, Theme.INACTIVE_TEXT_FG,
M.label_font_spec, M.label_font_spec,
function(_) return function(z) return Util.round_to_string(z * 100)..'%' end end function(_) return function(z) return Util.round_to_string(z * 100)..'%' end end
) )
M.initThemedLabelPlot = function(x, y, w, h, label_style, update_freq) M.initThemedLabelPlot = function(x, y, w, h, label_config, update_freq)
return Timeseries.build( return Timeseries.build(
F.make_box(x, y, w, h), F.make_box(x, y, w, h),
update_freq, update_freq,
M.default_plot_style, M.default_plot_style,
label_style label_config
) )
end end
@ -170,7 +170,7 @@ M.initPercentPlot_formatted = function(x, y, w, h, spacing, label, update_freq,
y + spacing, y + spacing,
w, w,
h, h,
M.percent_label_style, M.percent_label_config,
update_freq update_freq
), ),
} }
@ -243,7 +243,7 @@ M.initThemedScalePlot = function(x, y, w, h, f, min_domain, update_freq)
F.make_box(x, y, w, h), F.make_box(x, y, w, h),
update_freq, update_freq,
M.default_plot_style, M.default_plot_style,
Timeseries.label_style( Timeseries.label_config(
Theme.INACTIVE_TEXT_FG, Theme.INACTIVE_TEXT_FG,
M.label_font_spec, M.label_font_spec,
f f

View File

@ -104,7 +104,7 @@ return function(update_freq)
PLOT_Y, PLOT_Y,
Geometry.SECTION_WIDTH, Geometry.SECTION_WIDTH,
PLOT_HEIGHT, PLOT_HEIGHT,
Common.percent_label_style, Common.percent_label_config,
update_freq update_freq
) )