Skip to content

Commit 9ebb9d4

Browse files
committed
Include ColorEnum type in color fields in optional parameter definitions.
1 parent b5f04af commit 9ebb9d4

File tree

12 files changed

+143
-68
lines changed

12 files changed

+143
-68
lines changed

haas-production-flex-numbers/hs.charting.def.lua

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ function ChangeColorOpacity(color, opacity) end
88

99
--- The optional parameters of ChartAddAxisLabel.
1010
--- @shape OptionalParametersOf_ChartAddAxisLabel
11-
--- @field color string | nil The label fill color.
12-
--- @field textColor string | nil The text color.
11+
--- @field color string | ColorEnum | nil The label fill color.
12+
--- @field textColor string | ColorEnum | nil The text color.
1313

1414
--- Adds a label on the y-axis.
1515
--- @param chartId number | number[] The chart index on which to add the label.
@@ -66,7 +66,7 @@ function ChartSetOptions(chartId, title, height, style) end
6666

6767
--- The optional parameters of LineOptions.
6868
--- @shape OptionalParametersOf_LineOptions
69-
--- @field color string | nil The color of the line.
69+
--- @field color string | ColorEnum | nil The color of the line.
7070
--- @field style Enum | nil The style of the line (Spiked, Smooth, Step and others).
7171
--- @field deco Enum | nil The line decoration (Solid, Dashed, Dotted).
7272
--- @field width number | number[] | nil The width of the line.
@@ -116,7 +116,7 @@ function MarkCandle(chartId, depth) end
116116

117117
--- The optional parameters of Plot.
118118
--- @shape OptionalParametersOf_Plot
119-
--- @field colorOrOptions any | nil Line options object or a color string.
119+
--- @field colorOrOptions any | ColorEnum | nil Line options object or a color string.
120120

121121
--- Creates a data line on the chart. The line can be styled accordingly. A positive chartId will place the line below the main price chart. A negative index above.
122122
--- @param chartId number | number[] Index on which to plot the line.
@@ -138,7 +138,7 @@ function PlotBands(lineGuid1, lineGuid2, fillColor) end
138138
--- The optional parameters of PlotBars.
139139
--- @shape OptionalParametersOf_PlotBars
140140
--- @field baseValue number | number[] | nil The value from where the bars are drawn. Default is 0.
141-
--- @field fillColor string | nil The inner color of the bars. Default is none.
141+
--- @field fillColor string | ColorEnum | nil The inner color of the bars. Default is none.
142142

143143
--- Changes a line to bars.
144144
--- @param lineGuid string Line guid returned by Plot(). Suggestions: Plot
@@ -174,7 +174,7 @@ function PlotBuySellZone(chartId, start, endValue) end
174174

175175
--- The optional parameters of PlotCircle.
176176
--- @shape OptionalParametersOf_PlotCircle
177-
--- @field fillColor string | nil The inner color of the circles. Default is none.
177+
--- @field fillColor string | ColorEnum | nil The inner color of the circles. Default is none.
178178

179179
--- Changes the line into circles.
180180
--- @param lineGuid string Line guid returned by Plot(). Suggestions: Plot
@@ -193,7 +193,7 @@ function PlotCloud(lineGuid1, lineGuid2, opacity) end
193193

194194
--- The optional parameters of PlotDoubleColor.
195195
--- @shape OptionalParametersOf_PlotDoubleColor
196-
--- @field fillColor string | nil The inner color between the line and the base value. Default is none.
196+
--- @field fillColor string | ColorEnum | nil The inner color between the line and the base value. Default is none.
197197

198198
--- Changes the color of the line based on a base value.
199199
--- @param lineGuid string Line guid returned by Plot(). Suggestions: Plot
@@ -291,11 +291,11 @@ function PlotPivot(leftStrength, rightStrength) end
291291
--- @shape OptionalParametersOf_PlotPrice
292292
--- @field interval number | number[] | nil The interval which to plot.
293293
--- @field style Enum | nil The price plot style.
294-
--- @field upColor string | nil The outer color of the up candle.
294+
--- @field upColor string | ColorEnum | nil The outer color of the up candle.
295295
--- @field upFill boolean | nil The inner color of the up candle.
296-
--- @field downColor string | nil The outer color of the down candle.
296+
--- @field downColor string | ColorEnum | nil The outer color of the down candle.
297297
--- @field downFill boolean | nil The inner color of the down candle.
298-
--- @field markColor string | nil The outer color of the marked candle.
298+
--- @field markColor string | ColorEnum | nil The outer color of the marked candle.
299299
--- @field markFill boolean | nil The inner color of the marked candle.
300300

301301
--- Creates a price plot. Candlestick by default.
@@ -325,11 +325,11 @@ function PlotPrice(chartId, market, interval, style, upColor, upFill, downColor,
325325
--- @shape OptionalParametersOf_PlotShape
326326
--- @field chartId number | number[] | nil Index on which to plot the line.
327327
--- @field shape Enum | nil The shape type.
328-
--- @field color string | nil The color of the shape.
328+
--- @field color string | ColorEnum | nil The color of the shape.
329329
--- @field size number | number[] | nil Size of the shape.
330330
--- @field aboveCandle boolean | nil If true, the shape will be drawn above the candle else below.
331331
--- @field text string | nil Text above or below the candle or shape.
332-
--- @field textColor string | nil The color of the text.
332+
--- @field textColor string | ColorEnum | nil The color of the text.
333333
--- @field offset number | number[] | nil A positive offset will move the data points x number of candles. A negative number will move the data points back.
334334

335335
--- Draws a shape above the candle or first line on the chart.
@@ -355,7 +355,7 @@ function PlotShape(chartId, shape, color, size, aboveCandle, text, textColor, of
355355

356356
--- The optional parameters of PlotShapes.
357357
--- @shape OptionalParametersOf_PlotShapes
358-
--- @field fillColor string | nil The inner color of the circles. Default is none.
358+
--- @field fillColor string | ColorEnum | nil The inner color of the circles. Default is none.
359359

360360
--- Changes the line into a specific shape.
361361
--- @param lineGuid string Line guid returned by Plot(). Suggestions: Plot
@@ -409,8 +409,8 @@ function PlotVerticalZone(chartId, name, color, start, endValue) end
409409

410410
--- The optional parameters of PlotVolume.
411411
--- @shape OptionalParametersOf_PlotVolume
412-
--- @field upColor string | nil The outer color of the up candle volume bars.
413-
--- @field downColor string | nil The outer color of the down candle volume bars.
412+
--- @field upColor string | ColorEnum | nil The outer color of the up candle volume bars.
413+
--- @field downColor string | ColorEnum | nil The outer color of the down candle volume bars.
414414
--- @field upFill boolean | nil The inner color of the up candle volume bars.
415415
--- @field downFill boolean | nil The inner color of the down candle volume bars.
416416
--- @field side Enum | nil The axis side to snap.

haas-production-flex-numbers/hs.input-fields.def.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,13 @@ function InputTable(options, ...) end
305305
--- @return any Returns the options objects.
306306
function InputTableColumn(name, ...) end
307307

308+
--- Creates an table column options object for InputTable() with a dropdown
309+
--- @param name string Column name.
310+
--- @param options any Dropdown options. For example { "options-A", "options-B" }
311+
--- @vararg any Optional - Default values.
312+
--- @return any Returns the options objects.
313+
function InputTableColumnDropdown(name, options, ...) end
314+
308315
--- The optional parameters of InputTableOptions.
309316
--- @shape OptionalParametersOf_InputTableOptions
310317
--- @field title string | nil Name of the table.

haas-production-flex-numbers/hs.memory-helpers.def.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function Load(key, defaultValue) end
2525

2626
--- The optional parameters of Log.
2727
--- @shape OptionalParametersOf_Log
28-
--- @field color string | nil The color of the log message.
28+
--- @field color string | ColorEnum | nil The color of the log message.
2929

3030
--- Create a message in the log.
3131
--- @param message any Message to log.

haas-production/hs.charting.def.lua

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ function ChangeColorOpacity(color, opacity) end
88

99
--- The optional parameters of ChartAddAxisLabel.
1010
--- @shape OptionalParametersOf_ChartAddAxisLabel
11-
--- @field color string | nil The label fill color.
12-
--- @field textColor string | nil The text color.
11+
--- @field color string | ColorEnum | nil The label fill color.
12+
--- @field textColor string | ColorEnum | nil The text color.
1313

1414
--- Adds a label on the y-axis.
1515
--- @param chartId number The chart index on which to add the label.
@@ -66,7 +66,7 @@ function ChartSetOptions(chartId, title, height, style) end
6666

6767
--- The optional parameters of LineOptions.
6868
--- @shape OptionalParametersOf_LineOptions
69-
--- @field color string | nil The color of the line.
69+
--- @field color string | ColorEnum | nil The color of the line.
7070
--- @field style Enum | nil The style of the line (Spiked, Smooth, Step and others).
7171
--- @field deco Enum | nil The line decoration (Solid, Dashed, Dotted).
7272
--- @field width number | nil The width of the line.
@@ -116,7 +116,7 @@ function MarkCandle(chartId, depth) end
116116

117117
--- The optional parameters of Plot.
118118
--- @shape OptionalParametersOf_Plot
119-
--- @field colorOrOptions any | nil Line options object or a color string.
119+
--- @field colorOrOptions any | ColorEnum | nil Line options object or a color string.
120120

121121
--- Creates a data line on the chart. The line can be styled accordingly. A positive chartId will place the line below the main price chart. A negative index above.
122122
--- @param chartId number Index on which to plot the line.
@@ -138,7 +138,7 @@ function PlotBands(lineGuid1, lineGuid2, fillColor) end
138138
--- The optional parameters of PlotBars.
139139
--- @shape OptionalParametersOf_PlotBars
140140
--- @field baseValue number | nil The value from where the bars are drawn. Default is 0.
141-
--- @field fillColor string | nil The inner color of the bars. Default is none.
141+
--- @field fillColor string | ColorEnum | nil The inner color of the bars. Default is none.
142142

143143
--- Changes a line to bars.
144144
--- @param lineGuid string Line guid returned by Plot(). Suggestions: Plot
@@ -174,7 +174,7 @@ function PlotBuySellZone(chartId, start, endValue) end
174174

175175
--- The optional parameters of PlotCircle.
176176
--- @shape OptionalParametersOf_PlotCircle
177-
--- @field fillColor string | nil The inner color of the circles. Default is none.
177+
--- @field fillColor string | ColorEnum | nil The inner color of the circles. Default is none.
178178

179179
--- Changes the line into circles.
180180
--- @param lineGuid string Line guid returned by Plot(). Suggestions: Plot
@@ -193,7 +193,7 @@ function PlotCloud(lineGuid1, lineGuid2, opacity) end
193193

194194
--- The optional parameters of PlotDoubleColor.
195195
--- @shape OptionalParametersOf_PlotDoubleColor
196-
--- @field fillColor string | nil The inner color between the line and the base value. Default is none.
196+
--- @field fillColor string | ColorEnum | nil The inner color between the line and the base value. Default is none.
197197

198198
--- Changes the color of the line based on a base value.
199199
--- @param lineGuid string Line guid returned by Plot(). Suggestions: Plot
@@ -291,11 +291,11 @@ function PlotPivot(leftStrength, rightStrength) end
291291
--- @shape OptionalParametersOf_PlotPrice
292292
--- @field interval number | nil The interval which to plot.
293293
--- @field style Enum | nil The price plot style.
294-
--- @field upColor string | nil The outer color of the up candle.
294+
--- @field upColor string | ColorEnum | nil The outer color of the up candle.
295295
--- @field upFill boolean | nil The inner color of the up candle.
296-
--- @field downColor string | nil The outer color of the down candle.
296+
--- @field downColor string | ColorEnum | nil The outer color of the down candle.
297297
--- @field downFill boolean | nil The inner color of the down candle.
298-
--- @field markColor string | nil The outer color of the marked candle.
298+
--- @field markColor string | ColorEnum | nil The outer color of the marked candle.
299299
--- @field markFill boolean | nil The inner color of the marked candle.
300300

301301
--- Creates a price plot. Candlestick by default.
@@ -325,11 +325,11 @@ function PlotPrice(chartId, market, interval, style, upColor, upFill, downColor,
325325
--- @shape OptionalParametersOf_PlotShape
326326
--- @field chartId number | nil Index on which to plot the line.
327327
--- @field shape Enum | nil The shape type.
328-
--- @field color string | nil The color of the shape.
328+
--- @field color string | ColorEnum | nil The color of the shape.
329329
--- @field size number | nil Size of the shape.
330330
--- @field aboveCandle boolean | nil If true, the shape will be drawn above the candle else below.
331331
--- @field text string | nil Text above or below the candle or shape.
332-
--- @field textColor string | nil The color of the text.
332+
--- @field textColor string | ColorEnum | nil The color of the text.
333333
--- @field offset number | nil A positive offset will move the data points x number of candles. A negative number will move the data points back.
334334

335335
--- Draws a shape above the candle or first line on the chart.
@@ -355,7 +355,7 @@ function PlotShape(chartId, shape, color, size, aboveCandle, text, textColor, of
355355

356356
--- The optional parameters of PlotShapes.
357357
--- @shape OptionalParametersOf_PlotShapes
358-
--- @field fillColor string | nil The inner color of the circles. Default is none.
358+
--- @field fillColor string | ColorEnum | nil The inner color of the circles. Default is none.
359359

360360
--- Changes the line into a specific shape.
361361
--- @param lineGuid string Line guid returned by Plot(). Suggestions: Plot
@@ -409,8 +409,8 @@ function PlotVerticalZone(chartId, name, color, start, endValue) end
409409

410410
--- The optional parameters of PlotVolume.
411411
--- @shape OptionalParametersOf_PlotVolume
412-
--- @field upColor string | nil The outer color of the up candle volume bars.
413-
--- @field downColor string | nil The outer color of the down candle volume bars.
412+
--- @field upColor string | ColorEnum | nil The outer color of the up candle volume bars.
413+
--- @field downColor string | ColorEnum | nil The outer color of the down candle volume bars.
414414
--- @field upFill boolean | nil The inner color of the up candle volume bars.
415415
--- @field downFill boolean | nil The inner color of the down candle volume bars.
416416
--- @field side Enum | nil The axis side to snap.

haas-production/hs.input-fields.def.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,13 @@ function InputTable(options, ...) end
305305
--- @return any Returns the options objects.
306306
function InputTableColumn(name, ...) end
307307

308+
--- Creates an table column options object for InputTable() with a dropdown
309+
--- @param name string Column name.
310+
--- @param options any Dropdown options. For example { "options-A", "options-B" }
311+
--- @vararg any Optional - Default values.
312+
--- @return any Returns the options objects.
313+
function InputTableColumnDropdown(name, options, ...) end
314+
308315
--- The optional parameters of InputTableOptions.
309316
--- @shape OptionalParametersOf_InputTableOptions
310317
--- @field title string | nil Name of the table.

haas-production/hs.memory-helpers.def.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function Load(key, defaultValue) end
2525

2626
--- The optional parameters of Log.
2727
--- @shape OptionalParametersOf_Log
28-
--- @field color string | nil The color of the log message.
28+
--- @field color string | ColorEnum | nil The color of the log message.
2929

3030
--- Create a message in the log.
3131
--- @param message any Message to log.

0 commit comments

Comments
 (0)