Generated-output differences

quicktype output changed between the PR base and tested PR merge revisions.
← Back to the pull request
7test cases
7files differ
7modified
0new
0deleted
288changed lines
+144 −144insertions / deletions
Base 7cc8d8a58955a00fa24b69cb53f71f3a32fc4f5e · PR merge 01cd9c0f8577adbd476ff8a71a2e6baa66a57576 · Head 6d4b2bf4c2b6e0bc183aea17990c4315dcef2aac · raw patch
Test case

test/inputs/schema/integer-type.schema

1 generated file · +8 −8
Mschema-rubydefault / TopLevel.rb+8 −8
@@ -20,14 +20,14 @@ module Types
2020 end
2121
2222 class TopLevel < Dry::Struct
23- attribute :above_i32_max, Types::Integer
24- attribute :below_i32_min, Types::Integer
25- attribute :i32_range, Types::Integer
26- attribute :large_bounds, Types::Integer
27- attribute :only_maximum, Types::Integer
28- attribute :only_minimum, Types::Integer
29- attribute :small_negative, Types::Integer
30- attribute :small_positive, Types::Integer
23+ attribute :above_i32_max, Types::Integer.constrained(gteq: 0, lteq: 2147483648)
24+ attribute :below_i32_min, Types::Integer.constrained(gteq: -2147483649, lteq: 0)
25+ attribute :i32_range, Types::Integer.constrained(gteq: -2147483648, lteq: 2147483647)
26+ attribute :large_bounds, Types::Integer.constrained(gteq: -9007199254740991, lteq: 9007199254740991)
27+ attribute :only_maximum, Types::Integer.constrained(lteq: 0)
28+ attribute :only_minimum, Types::Integer.constrained(gteq: 0)
29+ attribute :small_negative, Types::Integer.constrained(gteq: -100, lteq: 0)
30+ attribute :small_positive, Types::Integer.constrained(gteq: 0, lteq: 100)
3131 attribute :unbounded, Types::Integer
3232
3333 def self.from_dynamic!(d)
Test case

test/inputs/schema/minmax-integer.schema

1 generated file · +6 −6
Mschema-rubydefault / TopLevel.rb+6 −6
@@ -21,13 +21,13 @@ end
2121
2222 class TopLevel < Dry::Struct
2323 attribute :free, Types::Integer
24- attribute :intersection, Types::Integer
25- attribute :max, Types::Integer
26- attribute :min, Types::Integer
27- attribute :minmax, Types::Integer
28- attribute :min_max_intersection, Types::Integer
24+ attribute :intersection, Types::Integer.constrained(gteq: 4, lteq: 5)
25+ attribute :max, Types::Integer.constrained(lteq: 5)
26+ attribute :min, Types::Integer.constrained(gteq: 3)
27+ attribute :minmax, Types::Integer.constrained(gteq: 3, lteq: 5)
28+ attribute :min_max_intersection, Types::Integer.constrained(gteq: 3, lteq: 5)
2929 attribute :min_max_union, Types::Integer
30- attribute :union, Types::Integer
30+ attribute :union, Types::Integer.constrained(gteq: 3, lteq: 6)
3131
3232 def self.from_dynamic!(d)
3333 d = Types::Hash[d]
Test case

test/inputs/schema/minmax.schema

1 generated file · +6 −6
Mschema-rubydefault / TopLevel.rb+6 −6
@@ -21,13 +21,13 @@ end
2121
2222 class TopLevel < Dry::Struct
2323 attribute :free, Types::Double
24- attribute :intersection, Types::Double
25- attribute :max, Types::Double
26- attribute :min, Types::Double
27- attribute :minmax, Types::Double
28- attribute :min_max_intersection, Types::Double
24+ attribute :intersection, Types::Double.constrained(gteq: 4, lteq: 5)
25+ attribute :max, Types::Double.constrained(lteq: 5)
26+ attribute :min, Types::Double.constrained(gteq: 3)
27+ attribute :minmax, Types::Double.constrained(gteq: 3, lteq: 5)
28+ attribute :min_max_intersection, Types::Double.constrained(gteq: 3, lteq: 5)
2929 attribute :min_max_union, Types::Double
30- attribute :union, Types::Double
30+ attribute :union, Types::Double.constrained(gteq: 3, lteq: 6)
3131
3232 def self.from_dynamic!(d)
3333 d = Types::Hash[d]
Test case

test/inputs/schema/optional-const-ref.schema

1 generated file · +3 −3
Mschema-rubydefault / TopLevel.rb+3 −3
@@ -51,12 +51,12 @@ end
5151
5252 class TopLevel < Dry::Struct
5353 attribute :coordinates, Types.Array(Coordinate).optional
54- attribute :count, Types::Integer.optional
54+ attribute :count, Types::Integer.constrained(gteq: 1, lteq: 100).optional
5555 attribute :label, Types::String.optional
5656 attribute :required_coordinates, Types.Array(Coordinate)
57- attribute :required_count, Types::Integer
57+ attribute :required_count, Types::Integer.constrained(gteq: 1, lteq: 100)
5858 attribute :required_label, Types::String
59- attribute :weight, Types::Double.optional
59+ attribute :weight, Types::Double.constrained(gteq: 0.5, lteq: 99.5).optional
6060
6161 def self.from_dynamic!(d)
6262 d = Types::Hash[d]
Test case

test/inputs/schema/optional-constraints.schema

1 generated file · +3 −3
Mschema-rubydefault / TopLevel.rb+3 −3
@@ -22,11 +22,11 @@ module Types
2222 end
2323
2424 class TopLevel < Dry::Struct
25- attribute :opt_double, Types::Double.optional
26- attribute :opt_int, Types::Integer.optional
25+ attribute :opt_double, Types::Double.constrained(gteq: 0.5, lteq: 99.5).optional
26+ attribute :opt_int, Types::Integer.constrained(gteq: 0, lteq: 100).optional
2727 attribute :opt_pattern, Types::String.optional
2828 attribute :opt_string, Types::String.optional
29- attribute :req_zero_min, Types::Integer
29+ attribute :req_zero_min, Types::Integer.constrained(gteq: 0, lteq: 100)
3030
3131 def self.from_dynamic!(d)
3232 d = Types::Hash[d]
Test case

test/inputs/schema/schema-constraints.schema

1 generated file · +1 −1
Mschema-rubydefault / TopLevel.rb+1 −1
@@ -22,7 +22,7 @@ end
2222
2323 class TopLevel < Dry::Struct
2424 attribute :min_max_length, Types::String
25- attribute :percent, Types::Double
25+ attribute :percent, Types::Double.constrained(gteq: 0, lteq: 1)
2626
2727 def self.from_dynamic!(d)
2828 d = Types::Hash[d]
Test case

test/inputs/schema/vega-lite.schema

1 generated file · +117 −117
Mschema-rubydefault / TopLevel.rb+117 −117
@@ -253,7 +253,7 @@ end
253253 #
254254 # Font weight for title text.
255255 class FontWeightUnion < Dry::Struct
256- attribute :double, Types::Double.optional
256+ attribute :double, Types::Double.constrained(gteq: 100, lteq: 900).optional
257257 attribute :enum_1, Types::FontWeight.optional
258258
259259 def self.from_dynamic!(d)
@@ -354,7 +354,7 @@ class MarkConfig < Dry::Struct
354354 attribute :align, Types::HorizontalAlign.optional
355355
356356 # The rotation angle of the text, in degrees.
357- attribute :angle, Types::Double.optional
357+ attribute :angle, Types::Double.constrained(gteq: 0, lteq: 360).optional
358358
359359 # The vertical alignment of the text. One of `"top"`, `"middle"`, `"bottom"`.
360360 #
@@ -398,13 +398,13 @@ class MarkConfig < Dry::Struct
398398 # The fill opacity (value between [0,1]).
399399 #
400400 # __Default value:__ `1`
401- attribute :fill_opacity, Types::Double.optional
401+ attribute :fill_opacity, Types::Double.constrained(gteq: 0, lteq: 1).optional
402402
403403 # The typeface to set the text in (e.g., `"Helvetica Neue"`).
404404 attribute :font, Types::String.optional
405405
406406 # The font size, in pixels.
407- attribute :font_size, Types::Double.optional
407+ attribute :font_size, Types::Double.constrained(gteq: 0).optional
408408
409409 # The font style (e.g., `"italic"`).
410410 attribute :font_style, Types::FontStyle.optional
@@ -443,7 +443,7 @@ class MarkConfig < Dry::Struct
443443 #
444444 # __Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or
445445 # `square` marks or layered `bar` charts and `1` otherwise.
446- attribute :opacity, Types::Double.optional
446+ attribute :opacity, Types::Double.constrained(gteq: 0, lteq: 1).optional
447447
448448 # The orientation of a non-stacked bar, tick, area, and line charts.
449449 # The value is either horizontal (default) or vertical.
@@ -458,7 +458,7 @@ class MarkConfig < Dry::Struct
458458
459459 # Polar coordinate radial offset, in pixels, of the text label from the origin determined
460460 # by the `x` and `y` properties.
461- attribute :radius, Types::Double.optional
461+ attribute :radius, Types::Double.constrained(gteq: 0).optional
462462
463463 # The default symbol shape to use. One of: `"circle"` (default), `"square"`, `"cross"`,
464464 # `"diamond"`, `"triangle-up"`, or `"triangle-down"`, or a custom SVG path.
@@ -471,7 +471,7 @@ class MarkConfig < Dry::Struct
471471 # of the size value.
472472 #
473473 # __Default value:__ `30`
474- attribute :size, Types::Double.optional
474+ attribute :size, Types::Double.constrained(gteq: 0).optional
475475
476476 # Default Stroke Color. This has higher precedence than config.color
477477 #
@@ -487,13 +487,13 @@ class MarkConfig < Dry::Struct
487487 # The stroke opacity (value between [0,1]).
488488 #
489489 # __Default value:__ `1`
490- attribute :stroke_opacity, Types::Double.optional
490+ attribute :stroke_opacity, Types::Double.constrained(gteq: 0, lteq: 1).optional
491491
492492 # The stroke width, in pixels.
493- attribute :stroke_width, Types::Double.optional
493+ attribute :stroke_width, Types::Double.constrained(gteq: 0).optional
494494
495495 # Depending on the interpolation type, sets the tension parameter (for line and area marks).
496- attribute :tension, Types::Double.optional
496+ attribute :tension, Types::Double.constrained(gteq: 0, lteq: 1).optional
497497
498498 # Placeholder text if the `text` channel is not specified
499499 attribute :text, Types::String.optional
@@ -743,15 +743,15 @@ class AxisConfig < Dry::Struct
743743 # The stroke opacity of grid (value between [0,1])
744744 #
745745 # __Default value:__ (`1` by default)
746- attribute :grid_opacity, Types::Double.optional
746+ attribute :grid_opacity, Types::Double.constrained(gteq: 0, lteq: 1).optional
747747
748748 # The grid width, in pixels.
749- attribute :grid_width, Types::Double.optional
749+ attribute :grid_width, Types::Double.constrained(gteq: 0).optional
750750
751751 # The rotation angle of the axis labels.
752752 #
753753 # __Default value:__ `-90` for nominal and ordinal fields; `0` otherwise.
754- attribute :label_angle, Types::Double.optional
754+ attribute :label_angle, Types::Double.constrained(gteq: -360, lteq: 360).optional
755755
756756 # Indicates if labels should be hidden if they exceed the axis range. If `false `(the
757757 # default) no bounds overlap analysis is performed. If `true`, labels will be hidden if
@@ -780,7 +780,7 @@ class AxisConfig < Dry::Struct
780780 attribute :label_font, Types::String.optional
781781
782782 # The font size of the label, in pixels.
783- attribute :label_font_size, Types::Double.optional
783+ attribute :label_font_size, Types::Double.constrained(gteq: 0).optional
784784
785785 # Maximum allowed pixel width of axis tick labels.
786786 attribute :label_limit, Types::Double.optional
@@ -830,10 +830,10 @@ class AxisConfig < Dry::Struct
830830 attribute :ticks, Types::Bool.optional
831831
832832 # The size in pixels of axis ticks.
833- attribute :tick_size, Types::Double.optional
833+ attribute :tick_size, Types::Double.constrained(gteq: 0).optional
834834
835835 # The width, in pixels, of ticks.
836- attribute :tick_width, Types::Double.optional
836+ attribute :tick_width, Types::Double.constrained(gteq: 0).optional
837837
838838 # Horizontal text alignment of axis titles.
839839 attribute :title_align, Types::String.optional
@@ -851,7 +851,7 @@ class AxisConfig < Dry::Struct
851851 attribute :title_font, Types::String.optional
852852
853853 # Font size of the title.
854- attribute :title_font_size, Types::Double.optional
854+ attribute :title_font_size, Types::Double.constrained(gteq: 0).optional
855855
856856 # Font weight of the title. (e.g., `"bold"`).
857857 attribute :title_font_weight, Types.Instance(TitleFontWeight).optional
@@ -1021,15 +1021,15 @@ class VGAxisConfig < Dry::Struct
10211021 # The stroke opacity of grid (value between [0,1])
10221022 #
10231023 # __Default value:__ (`1` by default)
1024- attribute :grid_opacity, Types::Double.optional
1024+ attribute :grid_opacity, Types::Double.constrained(gteq: 0, lteq: 1).optional
10251025
10261026 # The grid width, in pixels.
1027- attribute :grid_width, Types::Double.optional
1027+ attribute :grid_width, Types::Double.constrained(gteq: 0).optional
10281028
10291029 # The rotation angle of the axis labels.
10301030 #
10311031 # __Default value:__ `-90` for nominal and ordinal fields; `0` otherwise.
1032- attribute :label_angle, Types::Double.optional
1032+ attribute :label_angle, Types::Double.constrained(gteq: -360, lteq: 360).optional
10331033
10341034 # Indicates if labels should be hidden if they exceed the axis range. If `false `(the
10351035 # default) no bounds overlap analysis is performed. If `true`, labels will be hidden if
@@ -1058,7 +1058,7 @@ class VGAxisConfig < Dry::Struct
10581058 attribute :label_font, Types::String.optional
10591059
10601060 # The font size of the label, in pixels.
1061- attribute :label_font_size, Types::Double.optional
1061+ attribute :label_font_size, Types::Double.constrained(gteq: 0).optional
10621062
10631063 # Maximum allowed pixel width of axis tick labels.
10641064 attribute :label_limit, Types::Double.optional
@@ -1103,10 +1103,10 @@ class VGAxisConfig < Dry::Struct
11031103 attribute :ticks, Types::Bool.optional
11041104
11051105 # The size in pixels of axis ticks.
1106- attribute :tick_size, Types::Double.optional
1106+ attribute :tick_size, Types::Double.constrained(gteq: 0).optional
11071107
11081108 # The width, in pixels, of ticks.
1109- attribute :tick_width, Types::Double.optional
1109+ attribute :tick_width, Types::Double.constrained(gteq: 0).optional
11101110
11111111 # Horizontal text alignment of axis titles.
11121112 attribute :title_align, Types::String.optional
@@ -1124,7 +1124,7 @@ class VGAxisConfig < Dry::Struct
11241124 attribute :title_font, Types::String.optional
11251125
11261126 # Font size of the title.
1127- attribute :title_font_size, Types::Double.optional
1127+ attribute :title_font_size, Types::Double.constrained(gteq: 0).optional
11281128
11291129 # Font weight of the title. (e.g., `"bold"`).
11301130 attribute :title_font_weight, Types.Instance(TitleFontWeight).optional
@@ -1248,7 +1248,7 @@ class BarConfig < Dry::Struct
12481248 attribute :align, Types::HorizontalAlign.optional
12491249
12501250 # The rotation angle of the text, in degrees.
1251- attribute :angle, Types::Double.optional
1251+ attribute :angle, Types::Double.constrained(gteq: 0, lteq: 360).optional
12521252
12531253 # The vertical alignment of the text. One of `"top"`, `"middle"`, `"bottom"`.
12541254 #
@@ -1259,7 +1259,7 @@ class BarConfig < Dry::Struct
12591259 # statisticians) or 1 (Vega-Lite Default, D3 example style).
12601260 #
12611261 # __Default value:__ `1`
1262- attribute :bin_spacing, Types::Double.optional
1262+ attribute :bin_spacing, Types::Double.constrained(gteq: 0).optional
12631263
12641264 # Default color. Note that `fill` and `stroke` have higher precedence than `color` and
12651265 # will override `color`.
@@ -1272,7 +1272,7 @@ class BarConfig < Dry::Struct
12721272 # The default size of the bars on continuous scales.
12731273 #
12741274 # __Default value:__ `5`
1275- attribute :continuous_band_size, Types::Double.optional
1275+ attribute :continuous_band_size, Types::Double.constrained(gteq: 0).optional
12761276
12771277 # The mouse cursor used over the mark. Any valid [CSS cursor
12781278 # type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used.
@@ -1280,7 +1280,7 @@ class BarConfig < Dry::Struct
12801280
12811281 # The size of the bars. If unspecified, the default size is `bandSize-1`,
12821282 # which provides 1 pixel offset between bars.
1283- attribute :discrete_band_size, Types::Double.optional
1283+ attribute :discrete_band_size, Types::Double.constrained(gteq: 0).optional
12841284
12851285 # The horizontal offset, in pixels, between the text label and its anchor point. The offset
12861286 # is applied after rotation by the _angle_ property.
@@ -1307,13 +1307,13 @@ class BarConfig < Dry::Struct
13071307 # The fill opacity (value between [0,1]).
13081308 #
13091309 # __Default value:__ `1`
1310- attribute :fill_opacity, Types::Double.optional
1310+ attribute :fill_opacity, Types::Double.constrained(gteq: 0, lteq: 1).optional
13111311
13121312 # The typeface to set the text in (e.g., `"Helvetica Neue"`).
13131313 attribute :font, Types::String.optional
13141314
13151315 # The font size, in pixels.
1316- attribute :font_size, Types::Double.optional
1316+ attribute :font_size, Types::Double.constrained(gteq: 0).optional
13171317
13181318 # The font style (e.g., `"italic"`).
13191319 attribute :font_style, Types::FontStyle.optional
@@ -1352,7 +1352,7 @@ class BarConfig < Dry::Struct
13521352 #
13531353 # __Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or
13541354 # `square` marks or layered `bar` charts and `1` otherwise.
1355- attribute :opacity, Types::Double.optional
1355+ attribute :opacity, Types::Double.constrained(gteq: 0, lteq: 1).optional
13561356
13571357 # The orientation of a non-stacked bar, tick, area, and line charts.
13581358 # The value is either horizontal (default) or vertical.
@@ -1367,7 +1367,7 @@ class BarConfig < Dry::Struct
13671367
13681368 # Polar coordinate radial offset, in pixels, of the text label from the origin determined
13691369 # by the `x` and `y` properties.
1370- attribute :radius, Types::Double.optional
1370+ attribute :radius, Types::Double.constrained(gteq: 0).optional
13711371
13721372 # The default symbol shape to use. One of: `"circle"` (default), `"square"`, `"cross"`,
13731373 # `"diamond"`, `"triangle-up"`, or `"triangle-down"`, or a custom SVG path.
@@ -1380,7 +1380,7 @@ class BarConfig < Dry::Struct
13801380 # of the size value.
13811381 #
13821382 # __Default value:__ `30`
1383- attribute :size, Types::Double.optional
1383+ attribute :size, Types::Double.constrained(gteq: 0).optional
13841384
13851385 # Default Stroke Color. This has higher precedence than config.color
13861386 #
@@ -1396,13 +1396,13 @@ class BarConfig < Dry::Struct
13961396 # The stroke opacity (value between [0,1]).
13971397 #
13981398 # __Default value:__ `1`
1399- attribute :stroke_opacity, Types::Double.optional
1399+ attribute :stroke_opacity, Types::Double.constrained(gteq: 0, lteq: 1).optional
14001400
14011401 # The stroke width, in pixels.
1402- attribute :stroke_width, Types::Double.optional
1402+ attribute :stroke_width, Types::Double.constrained(gteq: 0).optional
14031403
14041404 # Depending on the interpolation type, sets the tension parameter (for line and area marks).
1405- attribute :tension, Types::Double.optional
1405+ attribute :tension, Types::Double.constrained(gteq: 0, lteq: 1).optional
14061406
14071407 # Placeholder text if the `text` channel is not specified
14081408 attribute :text, Types::String.optional
@@ -1551,7 +1551,7 @@ class LegendConfig < Dry::Struct
15511551 attribute :fill_color, Types::String.optional
15521552
15531553 # The height of the gradient, in pixels.
1554- attribute :gradient_height, Types::Double.optional
1554+ attribute :gradient_height, Types::Double.constrained(gteq: 0).optional
15551555
15561556 # Text baseline for color ramp gradient labels.
15571557 attribute :gradient_label_baseline, Types::String.optional
@@ -1566,10 +1566,10 @@ class LegendConfig < Dry::Struct
15661566 attribute :gradient_stroke_color, Types::String.optional
15671567
15681568 # The width of the gradient stroke, in pixels.
1569- attribute :gradient_stroke_width, Types::Double.optional
1569+ attribute :gradient_stroke_width, Types::Double.constrained(gteq: 0).optional
15701570
15711571 # The width of the gradient, in pixels.
1572- attribute :gradient_width, Types::Double.optional
1572+ attribute :gradient_width, Types::Double.constrained(gteq: 0).optional
15731573
15741574 # The alignment of the legend label, can be left, middle or right.
15751575 attribute :label_align, Types::String.optional
@@ -1586,13 +1586,13 @@ class LegendConfig < Dry::Struct
15861586 # The font size of legend label.
15871587 #
15881588 # __Default value:__ `10`.
1589- attribute :label_font_size, Types::Double.optional
1589+ attribute :label_font_size, Types::Double.constrained(gteq: 0).optional
15901590
15911591 # Maximum allowed pixel width of axis tick labels.
15921592 attribute :label_limit, Types::Double.optional
15931593
15941594 # The offset of the legend label.
1595- attribute :label_offset, Types::Double.optional
1595+ attribute :label_offset, Types::Double.constrained(gteq: 0).optional
15961596
15971597 # The offset, in pixels, by which to displace the legend from the edge of the enclosing
15981598 # group or data rectangle.
@@ -1628,10 +1628,10 @@ class LegendConfig < Dry::Struct
16281628 attribute :symbol_color, Types::String.optional
16291629
16301630 # The size of the legend symbol, in pixels.
1631- attribute :symbol_size, Types::Double.optional
1631+ attribute :symbol_size, Types::Double.constrained(gteq: 0).optional
16321632
16331633 # The width of the symbol's stroke.
1634- attribute :symbol_stroke_width, Types::Double.optional
1634+ attribute :symbol_stroke_width, Types::Double.constrained(gteq: 0).optional
16351635
16361636 # Default shape type (such as "circle") for legend symbols.
16371637 attribute :symbol_type, Types::String.optional
@@ -2040,11 +2040,11 @@ class ScaleConfig < Dry::Struct
20402040 # Default inner padding for `x` and `y` band-ordinal scales.
20412041 #
20422042 # __Default value:__ `0.1`
2043- attribute :band_padding_inner, Types::Double.optional
2043+ attribute :band_padding_inner, Types::Double.constrained(gteq: 0, lteq: 1).optional
20442044
20452045 # Default outer padding for `x` and `y` band-ordinal scales.
20462046 # If not specified, by default, band scale's paddingOuter is paddingInner/2.
2047- attribute :band_padding_outer, Types::Double.optional
2047+ attribute :band_padding_outer, Types::Double.constrained(gteq: 0, lteq: 1).optional
20482048
20492049 # If true, values that exceed the data domain are clamped to either the minimum or maximum
20502050 # range value
@@ -2054,68 +2054,68 @@ class ScaleConfig < Dry::Struct
20542054 #
20552055 # __Default:__ `5` for continuous x-scale of a vertical bar and continuous y-scale of a
20562056 # horizontal bar.; `0` otherwise.
2057- attribute :continuous_padding, Types::Double.optional
2057+ attribute :continuous_padding, Types::Double.constrained(gteq: 0).optional
20582058
20592059 # The default max value for mapping quantitative fields to bar's size/bandSize.
20602060 #
20612061 # If undefined (default), we will use the scale's `rangeStep` - 1.
2062- attribute :max_band_size, Types::Double.optional
2062+ attribute :max_band_size, Types::Double.constrained(gteq: 0).optional
20632063
20642064 # The default max value for mapping quantitative fields to text's size/fontSize.
20652065 #
20662066 # __Default value:__ `40`
2067- attribute :max_font_size, Types::Double.optional
2067+ attribute :max_font_size, Types::Double.constrained(gteq: 0).optional
20682068
20692069 # Default max opacity for mapping a field to opacity.
20702070 #
20712071 # __Default value:__ `0.8`
2072- attribute :max_opacity, Types::Double.optional
2072+ attribute :max_opacity, Types::Double.constrained(gteq: 0, lteq: 1).optional
20732073
20742074 # Default max value for point size scale.
2075- attribute :max_size, Types::Double.optional
2075+ attribute :max_size, Types::Double.constrained(gteq: 0).optional
20762076
20772077 # Default max strokeWidth for strokeWidth (or rule/line's size) scale.
20782078 #
20792079 # __Default value:__ `4`
2080- attribute :max_stroke_width, Types::Double.optional
2080+ attribute :max_stroke_width, Types::Double.constrained(gteq: 0).optional
20812081
20822082 # The default min value for mapping quantitative fields to bar and tick's size/bandSize
20832083 # scale with zero=false.
20842084 #
20852085 # __Default value:__ `2`
2086- attribute :min_band_size, Types::Double.optional
2086+ attribute :min_band_size, Types::Double.constrained(gteq: 0).optional
20872087
20882088 # The default min value for mapping quantitative fields to tick's size/fontSize scale with
20892089 # zero=false
20902090 #
20912091 # __Default value:__ `8`
2092- attribute :min_font_size, Types::Double.optional
2092+ attribute :min_font_size, Types::Double.constrained(gteq: 0).optional
20932093
20942094 # Default minimum opacity for mapping a field to opacity.
20952095 #
20962096 # __Default value:__ `0.3`
2097- attribute :min_opacity, Types::Double.optional
2097+ attribute :min_opacity, Types::Double.constrained(gteq: 0, lteq: 1).optional
20982098
20992099 # Default minimum value for point size scale with zero=false.
21002100 #
21012101 # __Default value:__ `9`
2102- attribute :min_size, Types::Double.optional
2102+ attribute :min_size, Types::Double.constrained(gteq: 0).optional
21032103
21042104 # Default minimum strokeWidth for strokeWidth (or rule/line's size) scale with zero=false.
21052105 #
21062106 # __Default value:__ `1`
2107- attribute :min_stroke_width, Types::Double.optional
2107+ attribute :min_stroke_width, Types::Double.constrained(gteq: 0).optional
21082108
21092109 # Default outer padding for `x` and `y` point-ordinal scales.
21102110 #
21112111 # __Default value:__ `0.5`
2112- attribute :point_padding, Types::Double.optional
2112+ attribute :point_padding, Types::Double.constrained(gteq: 0, lteq: 1).optional
21132113
21142114 # Default range step for band and point scales of (1) the `y` channel
21152115 # and (2) the `x` channel when the mark is not `text`.
21162116 #
21172117 # __Default value:__ `21`
2118- attribute :range_step, Types::Double.optional.optional
2118+ attribute :range_step, Types::Double.constrained(gteq: 0).optional.optional
21192119
21202120 # If true, rounds numeric output values to integers.
21212121 # This can be helpful for snapping to the pixel grid.
@@ -2125,7 +2125,7 @@ class ScaleConfig < Dry::Struct
21252125 # Default range step for `x` band and point scales of text marks.
21262126 #
21272127 # __Default value:__ `90`
2128- attribute :text_x_range_step, Types::Double.optional
2128+ attribute :text_x_range_step, Types::Double.constrained(gteq: 0).optional
21292129
21302130 # Use the source data range before aggregation as scale domain instead of aggregated data
21312131 # for aggregate axis.
@@ -2725,7 +2725,7 @@ class VGMarkConfig < Dry::Struct
27252725 attribute :align, Types::HorizontalAlign.optional
27262726
27272727 # The rotation angle of the text, in degrees.
2728- attribute :angle, Types::Double.optional
2728+ attribute :angle, Types::Double.constrained(gteq: 0, lteq: 360).optional
27292729
27302730 # The vertical alignment of the text. One of `"top"`, `"middle"`, `"bottom"`.
27312731 #
@@ -2752,13 +2752,13 @@ class VGMarkConfig < Dry::Struct
27522752 # The fill opacity (value between [0,1]).
27532753 #
27542754 # __Default value:__ `1`
2755- attribute :fill_opacity, Types::Double.optional
2755+ attribute :fill_opacity, Types::Double.constrained(gteq: 0, lteq: 1).optional
27562756
27572757 # The typeface to set the text in (e.g., `"Helvetica Neue"`).
27582758 attribute :font, Types::String.optional
27592759
27602760 # The font size, in pixels.
2761- attribute :font_size, Types::Double.optional
2761+ attribute :font_size, Types::Double.constrained(gteq: 0).optional
27622762
27632763 # The font style (e.g., `"italic"`).
27642764 attribute :font_style, Types::FontStyle.optional
@@ -2797,7 +2797,7 @@ class VGMarkConfig < Dry::Struct
27972797 #
27982798 # __Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or
27992799 # `square` marks or layered `bar` charts and `1` otherwise.
2800- attribute :opacity, Types::Double.optional
2800+ attribute :opacity, Types::Double.constrained(gteq: 0, lteq: 1).optional
28012801
28022802 # The orientation of a non-stacked bar, tick, area, and line charts.
28032803 # The value is either horizontal (default) or vertical.
@@ -2812,7 +2812,7 @@ class VGMarkConfig < Dry::Struct
28122812
28132813 # Polar coordinate radial offset, in pixels, of the text label from the origin determined
28142814 # by the `x` and `y` properties.
2815- attribute :radius, Types::Double.optional
2815+ attribute :radius, Types::Double.constrained(gteq: 0).optional
28162816
28172817 # The default symbol shape to use. One of: `"circle"` (default), `"square"`, `"cross"`,
28182818 # `"diamond"`, `"triangle-up"`, or `"triangle-down"`, or a custom SVG path.
@@ -2825,7 +2825,7 @@ class VGMarkConfig < Dry::Struct
28252825 # of the size value.
28262826 #
28272827 # __Default value:__ `30`
2828- attribute :size, Types::Double.optional
2828+ attribute :size, Types::Double.constrained(gteq: 0).optional
28292829
28302830 # Default Stroke Color. This has higher precedence than config.color
28312831 #
@@ -2841,13 +2841,13 @@ class VGMarkConfig < Dry::Struct
28412841 # The stroke opacity (value between [0,1]).
28422842 #
28432843 # __Default value:__ `1`
2844- attribute :stroke_opacity, Types::Double.optional
2844+ attribute :stroke_opacity, Types::Double.constrained(gteq: 0, lteq: 1).optional
28452845
28462846 # The stroke width, in pixels.
2847- attribute :stroke_width, Types::Double.optional
2847+ attribute :stroke_width, Types::Double.constrained(gteq: 0).optional
28482848
28492849 # Depending on the interpolation type, sets the tension parameter (for line and area marks).
2850- attribute :tension, Types::Double.optional
2850+ attribute :tension, Types::Double.constrained(gteq: 0, lteq: 1).optional
28512851
28522852 # Placeholder text if the `text` channel is not specified
28532853 attribute :text, Types::String.optional
@@ -2941,7 +2941,7 @@ class TextConfig < Dry::Struct
29412941 attribute :align, Types::HorizontalAlign.optional
29422942
29432943 # The rotation angle of the text, in degrees.
2944- attribute :angle, Types::Double.optional
2944+ attribute :angle, Types::Double.constrained(gteq: 0, lteq: 360).optional
29452945
29462946 # The vertical alignment of the text. One of `"top"`, `"middle"`, `"bottom"`.
29472947 #
@@ -2985,13 +2985,13 @@ class TextConfig < Dry::Struct
29852985 # The fill opacity (value between [0,1]).
29862986 #
29872987 # __Default value:__ `1`
2988- attribute :fill_opacity, Types::Double.optional
2988+ attribute :fill_opacity, Types::Double.constrained(gteq: 0, lteq: 1).optional
29892989
29902990 # The typeface to set the text in (e.g., `"Helvetica Neue"`).
29912991 attribute :font, Types::String.optional
29922992
29932993 # The font size, in pixels.
2994- attribute :font_size, Types::Double.optional
2994+ attribute :font_size, Types::Double.constrained(gteq: 0).optional
29952995
29962996 # The font style (e.g., `"italic"`).
29972997 attribute :font_style, Types::FontStyle.optional
@@ -3030,7 +3030,7 @@ class TextConfig < Dry::Struct
30303030 #
30313031 # __Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or
30323032 # `square` marks or layered `bar` charts and `1` otherwise.
3033- attribute :opacity, Types::Double.optional
3033+ attribute :opacity, Types::Double.constrained(gteq: 0, lteq: 1).optional
30343034
30353035 # The orientation of a non-stacked bar, tick, area, and line charts.
30363036 # The value is either horizontal (default) or vertical.
@@ -3045,7 +3045,7 @@ class TextConfig < Dry::Struct
30453045
30463046 # Polar coordinate radial offset, in pixels, of the text label from the origin determined
30473047 # by the `x` and `y` properties.
3048- attribute :radius, Types::Double.optional
3048+ attribute :radius, Types::Double.constrained(gteq: 0).optional
30493049
30503050 # The default symbol shape to use. One of: `"circle"` (default), `"square"`, `"cross"`,
30513051 # `"diamond"`, `"triangle-up"`, or `"triangle-down"`, or a custom SVG path.
@@ -3061,7 +3061,7 @@ class TextConfig < Dry::Struct
30613061 # of the size value.
30623062 #
30633063 # __Default value:__ `30`
3064- attribute :size, Types::Double.optional
3064+ attribute :size, Types::Double.constrained(gteq: 0).optional
30653065
30663066 # Default Stroke Color. This has higher precedence than config.color
30673067 #
@@ -3077,13 +3077,13 @@ class TextConfig < Dry::Struct
30773077 # The stroke opacity (value between [0,1]).
30783078 #
30793079 # __Default value:__ `1`
3080- attribute :stroke_opacity, Types::Double.optional
3080+ attribute :stroke_opacity, Types::Double.constrained(gteq: 0, lteq: 1).optional
30813081
30823082 # The stroke width, in pixels.
3083- attribute :stroke_width, Types::Double.optional
3083+ attribute :stroke_width, Types::Double.constrained(gteq: 0).optional
30843084
30853085 # Depending on the interpolation type, sets the tension parameter (for line and area marks).
3086- attribute :tension, Types::Double.optional
3086+ attribute :tension, Types::Double.constrained(gteq: 0, lteq: 1).optional
30873087
30883088 # Placeholder text if the `text` channel is not specified
30893089 attribute :text, Types::String.optional
@@ -3183,12 +3183,12 @@ class TickConfig < Dry::Struct
31833183 attribute :align, Types::HorizontalAlign.optional
31843184
31853185 # The rotation angle of the text, in degrees.
3186- attribute :angle, Types::Double.optional
3186+ attribute :angle, Types::Double.constrained(gteq: 0, lteq: 360).optional
31873187
31883188 # The width of the ticks.
31893189 #
31903190 # __Default value:__ 2/3 of rangeStep.
3191- attribute :band_size, Types::Double.optional
3191+ attribute :band_size, Types::Double.constrained(gteq: 0).optional
31923192
31933193 # The vertical alignment of the text. One of `"top"`, `"middle"`, `"bottom"`.
31943194 #
@@ -3232,13 +3232,13 @@ class TickConfig < Dry::Struct
32323232 # The fill opacity (value between [0,1]).
32333233 #
32343234 # __Default value:__ `1`
3235- attribute :fill_opacity, Types::Double.optional
3235+ attribute :fill_opacity, Types::Double.constrained(gteq: 0, lteq: 1).optional
32363236
32373237 # The typeface to set the text in (e.g., `"Helvetica Neue"`).
32383238 attribute :font, Types::String.optional
32393239
32403240 # The font size, in pixels.
3241- attribute :font_size, Types::Double.optional
3241+ attribute :font_size, Types::Double.constrained(gteq: 0).optional
32423242
32433243 # The font style (e.g., `"italic"`).
32443244 attribute :font_style, Types::FontStyle.optional
@@ -3277,7 +3277,7 @@ class TickConfig < Dry::Struct
32773277 #
32783278 # __Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or
32793279 # `square` marks or layered `bar` charts and `1` otherwise.
3280- attribute :opacity, Types::Double.optional
3280+ attribute :opacity, Types::Double.constrained(gteq: 0, lteq: 1).optional
32813281
32823282 # The orientation of a non-stacked bar, tick, area, and line charts.
32833283 # The value is either horizontal (default) or vertical.
@@ -3292,7 +3292,7 @@ class TickConfig < Dry::Struct
32923292
32933293 # Polar coordinate radial offset, in pixels, of the text label from the origin determined
32943294 # by the `x` and `y` properties.
3295- attribute :radius, Types::Double.optional
3295+ attribute :radius, Types::Double.constrained(gteq: 0).optional
32963296
32973297 # The default symbol shape to use. One of: `"circle"` (default), `"square"`, `"cross"`,
32983298 # `"diamond"`, `"triangle-up"`, or `"triangle-down"`, or a custom SVG path.
@@ -3305,7 +3305,7 @@ class TickConfig < Dry::Struct
33053305 # of the size value.
33063306 #
33073307 # __Default value:__ `30`
3308- attribute :size, Types::Double.optional
3308+ attribute :size, Types::Double.constrained(gteq: 0).optional
33093309
33103310 # Default Stroke Color. This has higher precedence than config.color
33113311 #
@@ -3321,13 +3321,13 @@ class TickConfig < Dry::Struct
33213321 # The stroke opacity (value between [0,1]).
33223322 #
33233323 # __Default value:__ `1`
3324- attribute :stroke_opacity, Types::Double.optional
3324+ attribute :stroke_opacity, Types::Double.constrained(gteq: 0, lteq: 1).optional
33253325
33263326 # The stroke width, in pixels.
3327- attribute :stroke_width, Types::Double.optional
3327+ attribute :stroke_width, Types::Double.constrained(gteq: 0).optional
33283328
33293329 # Depending on the interpolation type, sets the tension parameter (for line and area marks).
3330- attribute :tension, Types::Double.optional
3330+ attribute :tension, Types::Double.constrained(gteq: 0, lteq: 1).optional
33313331
33323332 # Placeholder text if the `text` channel is not specified
33333333 attribute :text, Types::String.optional
@@ -3341,7 +3341,7 @@ class TickConfig < Dry::Struct
33413341 # Thickness of the tick mark.
33423342 #
33433343 # __Default value:__ `1`
3344- attribute :thickness, Types::Double.optional
3344+ attribute :thickness, Types::Double.constrained(gteq: 0).optional
33453345
33463346 def self.from_dynamic!(d)
33473347 d = Types::Hash[d]
@@ -3492,13 +3492,13 @@ class VGTitleConfig < Dry::Struct
34923492 # Font size in pixels for title text.
34933493 #
34943494 # __Default value:__ `10`.
3495- attribute :font_size, Types::Double.optional
3495+ attribute :font_size, Types::Double.constrained(gteq: 0).optional
34963496
34973497 # Font weight for title text.
34983498 attribute :font_weight, Types.Instance(FontWeightUnion).optional
34993499
35003500 # The maximum allowed length in pixels of legend labels.
3501- attribute :limit, Types::Double.optional
3501+ attribute :limit, Types::Double.constrained(gteq: 0).optional
35023502
35033503 # Offset in pixels of the title from the chart body and axes.
35043504 attribute :offset, Types::Double.optional
@@ -4238,7 +4238,7 @@ class BinParams < Dry::Struct
42384238 # Maximum number of bins.
42394239 #
42404240 # __Default value:__ `6` for `row`, `column` and `shape` channels; `10` for other channels
4241- attribute :maxbins, Types::Double.optional
4241+ attribute :maxbins, Types::Double.constrained(gteq: 2).optional
42424242
42434243 # A minimum allowable step size (particularly useful for integer values).
42444244 attribute :minstep, Types::Double.optional
@@ -4332,7 +4332,7 @@ end
43324332 # DateTime definition object with `day`** should not be combined with `year`, `quarter`,
43334333 # `month`, or `date`.
43344334 class Day < Dry::Struct
4335- attribute :double, Types::Double.optional
4335+ attribute :double, Types::Double.constrained(gteq: 1, lteq: 7).optional
43364336 attribute :string, Types::String.optional
43374337
43384338 def self.from_dynamic!(d)
@@ -4366,7 +4366,7 @@ end
43664366 # (2) case-insensitive month name (e.g., `"January"`); (3) case-insensitive, 3-character
43674367 # short month name (e.g., `"Jan"`).
43684368 class Month < Dry::Struct
4369- attribute :double, Types::Double.optional
4369+ attribute :double, Types::Double.constrained(gteq: 1, lteq: 12).optional
43704370 attribute :string, Types::String.optional
43714371
43724372 def self.from_dynamic!(d)
@@ -4403,7 +4403,7 @@ end
44034403 class DateTime < Dry::Struct
44044404
44054405 # Integer value representing the date from 1-31.
4406- attribute :date, Types::Double.optional
4406+ attribute :date, Types::Double.constrained(gteq: 1, lteq: 31).optional
44074407
44084408 # Value representing the day of a week. This can be one of: (1) integer value -- `1`
44094409 # represents Monday; (2) case-insensitive day name (e.g., `"Monday"`); (3)
@@ -4413,13 +4413,13 @@ class DateTime < Dry::Struct
44134413 attribute :day, Types.Instance(Day).optional
44144414
44154415 # Integer value representing the hour of a day from 0-23.
4416- attribute :hours, Types::Double.optional
4416+ attribute :hours, Types::Double.constrained(gteq: 0, lteq: 23).optional
44174417
44184418 # Integer value representing the millisecond segment of time.
4419- attribute :milliseconds, Types::Double.optional
4419+ attribute :milliseconds, Types::Double.constrained(gteq: 0, lteq: 999).optional
44204420
44214421 # Integer value representing the minute segment of time from 0-59.
4422- attribute :minutes, Types::Double.optional
4422+ attribute :minutes, Types::Double.constrained(gteq: 0, lteq: 59).optional
44234423
44244424 # One of: (1) integer value representing the month from `1`-`12`. `1` represents January;
44254425 # (2) case-insensitive month name (e.g., `"January"`); (3) case-insensitive, 3-character
@@ -4427,10 +4427,10 @@ class DateTime < Dry::Struct
44274427 attribute :month, Types.Instance(Month).optional
44284428
44294429 # Integer value representing the quarter of the year (from 1-4).
4430- attribute :quarter, Types::Double.optional
4430+ attribute :quarter, Types::Double.constrained(gteq: 1, lteq: 4).optional
44314431
44324432 # Integer value representing the second segment (0-59) of a time value
4433- attribute :seconds, Types::Double.optional
4433+ attribute :seconds, Types::Double.constrained(gteq: 0, lteq: 59).optional
44344434
44354435 # A boolean flag indicating if date time is in utc time. If false, the date time is in
44364436 # local time
@@ -5080,7 +5080,7 @@ class Legend < Dry::Struct
50805080 # A non-positive integer indicating z-index of the legend.
50815081 # If zindex is 0, legend should be drawn behind all chart elements.
50825082 # To put them in front, use zindex = 1.
5083- attribute :zindex, Types::Double.optional
5083+ attribute :zindex, Types::Double.constrained(gteq: 0).optional
50845084
50855085 def self.from_dynamic!(d)
50865086 d = Types::Hash[d]
@@ -5671,7 +5671,7 @@ class Scale < Dry::Struct
56715671 # __Default value:__ For _continuous_ scales, derived from the [scale
56725672 # config](scale.html#config)'s `continuousPadding`.
56735673 # For _band and point_ scales, see `paddingInner` and `paddingOuter`.
5674- attribute :padding, Types::Double.optional
5674+ attribute :padding, Types::Double.constrained(gteq: 0).optional
56755675
56765676 # The inner padding (spacing) within each band step of band scales, as a fraction of the
56775677 # step size. This value must lie in the range [0,1].
@@ -5681,14 +5681,14 @@ class Scale < Dry::Struct
56815681 #
56825682 # __Default value:__ derived from the [scale config](scale.html#config)'s
56835683 # `bandPaddingInner`.
5684- attribute :padding_inner, Types::Double.optional
5684+ attribute :padding_inner, Types::Double.constrained(gteq: 0, lteq: 1).optional
56855685
56865686 # The outer padding (spacing) at the ends of the range of band and point scales,
56875687 # as a fraction of the step size. This value must lie in the range [0,1].
56885688 #
56895689 # __Default value:__ derived from the [scale config](scale.html#config)'s
56905690 # `bandPaddingOuter` for band scales and `pointPadding` for point scales.
5691- attribute :padding_outer, Types::Double.optional
5691+ attribute :padding_outer, Types::Double.constrained(gteq: 0, lteq: 1).optional
56925692
56935693 # The range of the scale. One of:
56945694 #
@@ -5728,7 +5728,7 @@ class Scale < Dry::Struct
57285728 # __Warning__: If `rangeStep` is `null` and the cardinality of the scale's domain is higher
57295729 # than `width` or `height`, the rangeStep might become less than one pixel and the mark
57305730 # might not appear correctly.
5731- attribute :range_step, Types::Double.optional.optional
5731+ attribute :range_step, Types::Double.constrained(gteq: 0).optional.optional
57325732
57335733 # If `true`, rounds numeric output values to integers. This can be helpful for snapping to
57345734 # the pixel grid.
@@ -6238,7 +6238,7 @@ class Header < Dry::Struct
62386238 # The rotation angle of the header labels.
62396239 #
62406240 # __Default value:__ `0`.
6241- attribute :label_angle, Types::Double.optional
6241+ attribute :label_angle, Types::Double.constrained(gteq: -360, lteq: 360).optional
62426242
62436243 # A title for the field. If `null`, the title will be removed.
62446244 #
@@ -7106,7 +7106,7 @@ class Axis < Dry::Struct
71067106 # The rotation angle of the axis labels.
71077107 #
71087108 # __Default value:__ `-90` for nominal and ordinal fields; `0` otherwise.
7109- attribute :label_angle, Types::Double.optional
7109+ attribute :label_angle, Types::Double.constrained(gteq: -360, lteq: 360).optional
71107110
71117111 # Indicates if labels should be hidden if they exceed the axis range. If `false `(the
71127112 # default) no bounds overlap analysis is performed. If `true`, labels will be hidden if
@@ -7188,7 +7188,7 @@ class Axis < Dry::Struct
71887188 attribute :ticks, Types::Bool.optional
71897189
71907190 # The size in pixels of axis ticks.
7191- attribute :tick_size, Types::Double.optional
7191+ attribute :tick_size, Types::Double.constrained(gteq: 0).optional
71927192
71937193 # A title for the field. If `null`, the title will be removed.
71947194 #
@@ -7220,7 +7220,7 @@ class Axis < Dry::Struct
72207220 #
72217221 # __Default value:__ `1` (in front of the marks) for actual axis and `0` (behind the marks)
72227222 # for grids.
7223- attribute :zindex, Types::Double.optional
7223+ attribute :zindex, Types::Double.constrained(gteq: 0).optional
72247224
72257225 def self.from_dynamic!(d)
72267226 d = Types::Hash[d]
@@ -7842,7 +7842,7 @@ class MarkDef < Dry::Struct
78427842 attribute :align, Types::HorizontalAlign.optional
78437843
78447844 # The rotation angle of the text, in degrees.
7845- attribute :angle, Types::Double.optional
7845+ attribute :angle, Types::Double.constrained(gteq: 0, lteq: 360).optional
78467846
78477847 # The vertical alignment of the text. One of `"top"`, `"middle"`, `"bottom"`.
78487848 #
@@ -7889,13 +7889,13 @@ class MarkDef < Dry::Struct
78897889 # The fill opacity (value between [0,1]).
78907890 #
78917891 # __Default value:__ `1`
7892- attribute :fill_opacity, Types::Double.optional
7892+ attribute :fill_opacity, Types::Double.constrained(gteq: 0, lteq: 1).optional
78937893
78947894 # The typeface to set the text in (e.g., `"Helvetica Neue"`).
78957895 attribute :font, Types::String.optional
78967896
78977897 # The font size, in pixels.
7898- attribute :font_size, Types::Double.optional
7898+ attribute :font_size, Types::Double.constrained(gteq: 0).optional
78997899
79007900 # The font style (e.g., `"italic"`).
79017901 attribute :font_style, Types::FontStyle.optional
@@ -7934,7 +7934,7 @@ class MarkDef < Dry::Struct
79347934 #
79357935 # __Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or
79367936 # `square` marks or layered `bar` charts and `1` otherwise.
7937- attribute :opacity, Types::Double.optional
7937+ attribute :opacity, Types::Double.constrained(gteq: 0, lteq: 1).optional
79387938
79397939 # The orientation of a non-stacked bar, tick, area, and line charts.
79407940 # The value is either horizontal (default) or vertical.
@@ -7949,7 +7949,7 @@ class MarkDef < Dry::Struct
79497949
79507950 # Polar coordinate radial offset, in pixels, of the text label from the origin determined
79517951 # by the `x` and `y` properties.
7952- attribute :radius, Types::Double.optional
7952+ attribute :radius, Types::Double.constrained(gteq: 0).optional
79537953
79547954 # The default symbol shape to use. One of: `"circle"` (default), `"square"`, `"cross"`,
79557955 # `"diamond"`, `"triangle-up"`, or `"triangle-down"`, or a custom SVG path.
@@ -7962,7 +7962,7 @@ class MarkDef < Dry::Struct
79627962 # of the size value.
79637963 #
79647964 # __Default value:__ `30`
7965- attribute :size, Types::Double.optional
7965+ attribute :size, Types::Double.constrained(gteq: 0).optional
79667966
79677967 # Default Stroke Color. This has higher precedence than config.color
79687968 #
@@ -7978,10 +7978,10 @@ class MarkDef < Dry::Struct
79787978 # The stroke opacity (value between [0,1]).
79797979 #
79807980 # __Default value:__ `1`
7981- attribute :stroke_opacity, Types::Double.optional
7981+ attribute :stroke_opacity, Types::Double.constrained(gteq: 0, lteq: 1).optional
79827982
79837983 # The stroke width, in pixels.
7984- attribute :stroke_width, Types::Double.optional
7984+ attribute :stroke_width, Types::Double.constrained(gteq: 0).optional
79857985
79867986 # A string or array of strings indicating the name of custom styles to apply to the mark. A
79877987 # style is a named collection of mark property defaults defined within the [style
@@ -7997,7 +7997,7 @@ class MarkDef < Dry::Struct
79977997 attribute :style, Types.Instance(Style).optional
79987998
79997999 # Depending on the interpolation type, sets the tension parameter (for line and area marks).
8000- attribute :tension, Types::Double.optional
8000+ attribute :tension, Types::Double.constrained(gteq: 0, lteq: 1).optional
80018001
80028002 # Placeholder text if the `text` channel is not specified
80038003 attribute :text, Types::String.optional
No generated files match these filters.