plotilla 0.2.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -11
- package/data/boundaries/world_countries.geojson +1 -1
- package/dist/colour/colour_scale.d.ts +55 -0
- package/dist/colour/colour_scale.js +80 -0
- package/dist/colour/palette.d.ts +176 -0
- package/dist/colour/palette.js +220 -0
- package/dist/fields/axis_fields.d.ts +56 -0
- package/dist/fields/axis_fields.js +46 -0
- package/dist/fields/colour_fields.d.ts +32 -0
- package/dist/fields/colour_fields.js +31 -0
- package/dist/fields/column_fields.d.ts +52 -0
- package/{src/fields/column_fields.ts → dist/fields/column_fields.js} +15 -29
- package/dist/fields/common_fields.d.ts +9 -0
- package/{src/fields/common_fields.ts → dist/fields/common_fields.js} +3 -6
- package/dist/fields/decide_plot_axes.d.ts +56 -0
- package/dist/fields/decide_plot_axes.js +71 -0
- package/dist/fields/marker_fields.d.ts +8 -0
- package/dist/fields/marker_fields.js +13 -0
- package/dist/fields/read_date_time.d.ts +85 -0
- package/dist/fields/read_date_time.js +199 -0
- package/dist/figure/check_axis_year_formats.d.ts +36 -0
- package/dist/figure/check_axis_year_formats.js +116 -0
- package/dist/figure/check_plot_category_limits.d.ts +128 -0
- package/dist/figure/check_plot_category_limits.js +284 -0
- package/dist/figure/plot_figure.d.ts +861 -0
- package/dist/figure/plot_figure.js +58 -0
- package/dist/figure/resolve_plot_figure.d.ts +28 -0
- package/dist/figure/resolve_plot_figure.js +41 -0
- package/dist/figure/validate_plot_figure.d.ts +50 -0
- package/dist/figure/validate_plot_figure.js +441 -0
- package/dist/map/assign_map_layer_hue_slots.d.ts +89 -0
- package/dist/map/assign_map_layer_hue_slots.js +146 -0
- package/dist/map/boundary_sets.d.ts +65 -0
- package/dist/map/boundary_sets.js +103 -0
- package/dist/map/build_world_outline_across_180.d.ts +21 -0
- package/dist/map/build_world_outline_across_180.js +23 -0
- package/dist/map/check_map_layers.d.ts +16 -0
- package/dist/map/check_map_layers.js +31 -0
- package/dist/map/fetch_region_outlines.d.ts +25 -0
- package/dist/map/fetch_region_outlines.js +39 -0
- package/dist/map/geojson.d.ts +150 -0
- package/dist/map/geojson.js +248 -0
- package/dist/map/join_region_rows.d.ts +40 -0
- package/dist/map/join_region_rows.js +45 -0
- package/dist/map/map_layers.d.ts +229 -0
- package/dist/map/map_layers.js +87 -0
- package/dist/model/find_panel_colour_scale.d.ts +25 -0
- package/dist/model/find_panel_colour_scale.js +27 -0
- package/dist/model/map_model.d.ts +30 -0
- package/dist/model/map_model.js +234 -0
- package/dist/model/panel_layout.d.ts +42 -0
- package/dist/model/panel_layout.js +154 -0
- package/dist/model/panel_model.d.ts +223 -0
- package/dist/model/panel_model.js +7 -0
- package/dist/model/plot_model.d.ts +28 -0
- package/dist/model/plot_model.js +431 -0
- package/dist/model/statistics.d.ts +83 -0
- package/dist/model/statistics.js +107 -0
- package/dist/plots/bar_plot.d.ts +46 -0
- package/dist/plots/bar_plot.js +30 -0
- package/dist/plots/box_plot.d.ts +30 -0
- package/dist/plots/box_plot.js +21 -0
- package/dist/plots/density_plot.d.ts +36 -0
- package/dist/plots/density_plot.js +23 -0
- package/dist/plots/heatmap_plot.d.ts +22 -0
- package/dist/plots/heatmap_plot.js +18 -0
- package/dist/plots/histogram_plot.d.ts +32 -0
- package/dist/plots/histogram_plot.js +24 -0
- package/dist/plots/line_plot.d.ts +44 -0
- package/dist/plots/line_plot.js +25 -0
- package/dist/plots/map_plot.d.ts +92 -0
- package/dist/plots/map_plot.js +35 -0
- package/dist/plots/pie_plot.d.ts +17 -0
- package/dist/plots/pie_plot.js +16 -0
- package/dist/plots/scatter_plot.d.ts +47 -0
- package/dist/plots/scatter_plot.js +27 -0
- package/dist/renderers/date_ticks.d.ts +37 -0
- package/dist/renderers/date_ticks.js +148 -0
- package/dist/renderers/echarts_map.d.ts +47 -0
- package/dist/renderers/echarts_map.js +492 -0
- package/dist/renderers/echarts_options.d.ts +30 -0
- package/dist/renderers/echarts_options.js +449 -0
- package/dist/renderers/echarts_pie_radius.d.ts +52 -0
- package/dist/renderers/echarts_pie_radius.js +158 -0
- package/dist/renderers/escape_html.d.ts +10 -0
- package/dist/renderers/escape_html.js +15 -0
- package/dist/renderers/line_colour_segments.d.ts +39 -0
- package/dist/renderers/line_colour_segments.js +41 -0
- package/dist/renderers/plotly_map.d.ts +48 -0
- package/dist/renderers/plotly_map.js +159 -0
- package/dist/renderers/plotly_options.d.ts +19 -0
- package/dist/renderers/plotly_options.js +345 -0
- package/dist/renderers/year_ticks.d.ts +27 -0
- package/dist/renderers/year_ticks.js +42 -0
- package/dist/table/check_column.d.ts +36 -0
- package/dist/table/check_column.js +46 -0
- package/dist/table/check_values_have_spread.d.ts +30 -0
- package/{src/table/check_values_have_spread.ts → dist/table/check_values_have_spread.js} +16 -17
- package/dist/table/compute_quantile.d.ts +16 -0
- package/dist/table/compute_quantile.js +23 -0
- package/dist/table/data_table.d.ts +59 -0
- package/dist/table/data_table.js +87 -0
- package/dist/table/density_bandwidth.d.ts +64 -0
- package/dist/table/density_bandwidth.js +88 -0
- package/dist/table/find_line_fit.d.ts +30 -0
- package/dist/table/find_line_fit.js +36 -0
- package/dist/table/get_number_range.d.ts +16 -0
- package/{src/table/get_number_range.ts → dist/table/get_number_range.js} +8 -8
- package/dist/table/group_rows.d.ts +40 -0
- package/dist/table/group_rows.js +67 -0
- package/dist/table/list_categories.d.ts +14 -0
- package/{src/table/list_categories.ts → dist/table/list_categories.js} +2 -3
- package/dist/table/read_number.d.ts +12 -0
- package/dist/table/read_number.js +14 -0
- package/package.json +30 -25
- package/src/colour/colour_scale.ts +0 -80
- package/src/colour/palette.ts +0 -220
- package/src/examples/example_figures.ts +0 -320
- package/src/fields/axis_fields.ts +0 -32
- package/src/fields/colour_fields.ts +0 -40
- package/src/fields/decide_plot_axes.ts +0 -77
- package/src/fields/marker_fields.ts +0 -16
- package/src/figure/plot_figure.ts +0 -67
- package/src/figure/resolve_plot_figure.ts +0 -47
- package/src/figure/validate_plot_figure.ts +0 -412
- package/src/map/boundary_sets.ts +0 -116
- package/src/map/check_map_layers.ts +0 -32
- package/src/map/fetch_region_outlines.ts +0 -48
- package/src/map/geojson.ts +0 -174
- package/src/map/map_layers.ts +0 -108
- package/src/model/check_axis_shows_years.ts +0 -58
- package/src/model/map_model.ts +0 -238
- package/src/model/panel_layout.ts +0 -171
- package/src/model/panel_model.ts +0 -85
- package/src/model/plot_model.ts +0 -347
- package/src/model/statistics.ts +0 -134
- package/src/plots/bar_plot.ts +0 -36
- package/src/plots/box_plot.ts +0 -26
- package/src/plots/density_plot.ts +0 -29
- package/src/plots/heatmap_plot.ts +0 -24
- package/src/plots/histogram_plot.ts +0 -29
- package/src/plots/line_plot.ts +0 -29
- package/src/plots/map_plot.ts +0 -46
- package/src/plots/pie_plot.ts +0 -23
- package/src/plots/scatter_plot.ts +0 -32
- package/src/renderers/echarts_map.ts +0 -194
- package/src/renderers/echarts_options.ts +0 -317
- package/src/renderers/plotly_map.ts +0 -170
- package/src/renderers/plotly_options.ts +0 -318
- package/src/table/check_column.ts +0 -34
- package/src/table/compute_quantile.ts +0 -23
- package/src/table/data_table.ts +0 -83
- package/src/table/density_bandwidth.ts +0 -94
- package/src/table/find_line_fit.ts +0 -44
- package/src/table/group_rows.ts +0 -71
|
@@ -0,0 +1,861 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The figure: one shared table and one or more plots in a grid. This is
|
|
3
|
+
* the whole shape a caller sends, and the one list of plot types.
|
|
4
|
+
*/
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
/** Every plot type's schema, in the order the catalogue lists them. */
|
|
7
|
+
export declare const PLOT_SCHEMAS: readonly [z.ZodObject<{
|
|
8
|
+
colour: z.ZodOptional<z.ZodString>;
|
|
9
|
+
colour_type: z.ZodOptional<z.ZodEnum<{
|
|
10
|
+
categorical: "categorical";
|
|
11
|
+
continuous: "continuous";
|
|
12
|
+
}>>;
|
|
13
|
+
colour_scale: z.ZodOptional<z.ZodEnum<{
|
|
14
|
+
linear: "linear";
|
|
15
|
+
log: "log";
|
|
16
|
+
quantile: "quantile";
|
|
17
|
+
}>>;
|
|
18
|
+
x_label: z.ZodOptional<z.ZodString>;
|
|
19
|
+
y_label: z.ZodOptional<z.ZodString>;
|
|
20
|
+
x_scale: z.ZodDefault<z.ZodEnum<{
|
|
21
|
+
linear: "linear";
|
|
22
|
+
log: "log";
|
|
23
|
+
}>>;
|
|
24
|
+
y_scale: z.ZodDefault<z.ZodEnum<{
|
|
25
|
+
linear: "linear";
|
|
26
|
+
log: "log";
|
|
27
|
+
}>>;
|
|
28
|
+
x_year_format: z.ZodOptional<z.ZodEnum<{
|
|
29
|
+
YY: "YY";
|
|
30
|
+
YYYY: "YYYY";
|
|
31
|
+
}>>;
|
|
32
|
+
y_year_format: z.ZodOptional<z.ZodEnum<{
|
|
33
|
+
YY: "YY";
|
|
34
|
+
YYYY: "YYYY";
|
|
35
|
+
}>>;
|
|
36
|
+
title: z.ZodOptional<z.ZodString>;
|
|
37
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
38
|
+
show_markers: z.ZodOptional<z.ZodBoolean>;
|
|
39
|
+
type: z.ZodLiteral<"line">;
|
|
40
|
+
x: z.ZodString;
|
|
41
|
+
y: z.ZodString;
|
|
42
|
+
line_type: z.ZodOptional<z.ZodString>;
|
|
43
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
44
|
+
colour: z.ZodOptional<z.ZodString>;
|
|
45
|
+
colour_type: z.ZodOptional<z.ZodEnum<{
|
|
46
|
+
categorical: "categorical";
|
|
47
|
+
continuous: "continuous";
|
|
48
|
+
}>>;
|
|
49
|
+
colour_scale: z.ZodOptional<z.ZodEnum<{
|
|
50
|
+
linear: "linear";
|
|
51
|
+
log: "log";
|
|
52
|
+
quantile: "quantile";
|
|
53
|
+
}>>;
|
|
54
|
+
x_label: z.ZodOptional<z.ZodString>;
|
|
55
|
+
y_label: z.ZodOptional<z.ZodString>;
|
|
56
|
+
x_scale: z.ZodDefault<z.ZodEnum<{
|
|
57
|
+
linear: "linear";
|
|
58
|
+
log: "log";
|
|
59
|
+
}>>;
|
|
60
|
+
y_scale: z.ZodDefault<z.ZodEnum<{
|
|
61
|
+
linear: "linear";
|
|
62
|
+
log: "log";
|
|
63
|
+
}>>;
|
|
64
|
+
x_year_format: z.ZodOptional<z.ZodEnum<{
|
|
65
|
+
YY: "YY";
|
|
66
|
+
YYYY: "YYYY";
|
|
67
|
+
}>>;
|
|
68
|
+
y_year_format: z.ZodOptional<z.ZodEnum<{
|
|
69
|
+
YY: "YY";
|
|
70
|
+
YYYY: "YYYY";
|
|
71
|
+
}>>;
|
|
72
|
+
title: z.ZodOptional<z.ZodString>;
|
|
73
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
74
|
+
type: z.ZodLiteral<"scatter">;
|
|
75
|
+
x: z.ZodString;
|
|
76
|
+
y: z.ZodString;
|
|
77
|
+
marker_shape: z.ZodOptional<z.ZodString>;
|
|
78
|
+
size: z.ZodOptional<z.ZodString>;
|
|
79
|
+
show_trend_line: z.ZodDefault<z.ZodBoolean>;
|
|
80
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
81
|
+
colour: z.ZodOptional<z.ZodString>;
|
|
82
|
+
colour_type: z.ZodOptional<z.ZodEnum<{
|
|
83
|
+
categorical: "categorical";
|
|
84
|
+
continuous: "continuous";
|
|
85
|
+
}>>;
|
|
86
|
+
colour_scale: z.ZodOptional<z.ZodEnum<{
|
|
87
|
+
linear: "linear";
|
|
88
|
+
log: "log";
|
|
89
|
+
quantile: "quantile";
|
|
90
|
+
}>>;
|
|
91
|
+
x_label: z.ZodOptional<z.ZodString>;
|
|
92
|
+
y_label: z.ZodOptional<z.ZodString>;
|
|
93
|
+
y_scale: z.ZodDefault<z.ZodEnum<{
|
|
94
|
+
linear: "linear";
|
|
95
|
+
log: "log";
|
|
96
|
+
}>>;
|
|
97
|
+
title: z.ZodOptional<z.ZodString>;
|
|
98
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
99
|
+
type: z.ZodLiteral<"bar">;
|
|
100
|
+
x: z.ZodString;
|
|
101
|
+
y: z.ZodString;
|
|
102
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
103
|
+
grouped: "grouped";
|
|
104
|
+
stacked: "stacked";
|
|
105
|
+
}>>;
|
|
106
|
+
orientation: z.ZodDefault<z.ZodEnum<{
|
|
107
|
+
horizontal: "horizontal";
|
|
108
|
+
vertical: "vertical";
|
|
109
|
+
}>>;
|
|
110
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
111
|
+
colour: z.ZodOptional<z.ZodString>;
|
|
112
|
+
colour_type: z.ZodOptional<z.ZodEnum<{
|
|
113
|
+
categorical: "categorical";
|
|
114
|
+
continuous: "continuous";
|
|
115
|
+
}>>;
|
|
116
|
+
x_label: z.ZodOptional<z.ZodString>;
|
|
117
|
+
y_label: z.ZodOptional<z.ZodString>;
|
|
118
|
+
y_scale: z.ZodDefault<z.ZodEnum<{
|
|
119
|
+
linear: "linear";
|
|
120
|
+
log: "log";
|
|
121
|
+
}>>;
|
|
122
|
+
y_year_format: z.ZodOptional<z.ZodEnum<{
|
|
123
|
+
YY: "YY";
|
|
124
|
+
YYYY: "YYYY";
|
|
125
|
+
}>>;
|
|
126
|
+
title: z.ZodOptional<z.ZodString>;
|
|
127
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
128
|
+
show_markers: z.ZodOptional<z.ZodBoolean>;
|
|
129
|
+
type: z.ZodLiteral<"box">;
|
|
130
|
+
y: z.ZodString;
|
|
131
|
+
x: z.ZodOptional<z.ZodString>;
|
|
132
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
133
|
+
colour: z.ZodOptional<z.ZodString>;
|
|
134
|
+
colour_type: z.ZodOptional<z.ZodEnum<{
|
|
135
|
+
categorical: "categorical";
|
|
136
|
+
continuous: "continuous";
|
|
137
|
+
}>>;
|
|
138
|
+
x_label: z.ZodOptional<z.ZodString>;
|
|
139
|
+
y_label: z.ZodOptional<z.ZodString>;
|
|
140
|
+
y_scale: z.ZodDefault<z.ZodEnum<{
|
|
141
|
+
linear: "linear";
|
|
142
|
+
log: "log";
|
|
143
|
+
}>>;
|
|
144
|
+
x_year_format: z.ZodOptional<z.ZodEnum<{
|
|
145
|
+
YY: "YY";
|
|
146
|
+
YYYY: "YYYY";
|
|
147
|
+
}>>;
|
|
148
|
+
title: z.ZodOptional<z.ZodString>;
|
|
149
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
150
|
+
type: z.ZodLiteral<"histogram">;
|
|
151
|
+
x: z.ZodString;
|
|
152
|
+
bins: z.ZodOptional<z.ZodNumber>;
|
|
153
|
+
is_normalised: z.ZodDefault<z.ZodBoolean>;
|
|
154
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
155
|
+
colour: z.ZodOptional<z.ZodString>;
|
|
156
|
+
colour_type: z.ZodOptional<z.ZodEnum<{
|
|
157
|
+
categorical: "categorical";
|
|
158
|
+
continuous: "continuous";
|
|
159
|
+
}>>;
|
|
160
|
+
x_label: z.ZodOptional<z.ZodString>;
|
|
161
|
+
y_label: z.ZodOptional<z.ZodString>;
|
|
162
|
+
x_scale: z.ZodDefault<z.ZodEnum<{
|
|
163
|
+
linear: "linear";
|
|
164
|
+
log: "log";
|
|
165
|
+
}>>;
|
|
166
|
+
y_scale: z.ZodDefault<z.ZodEnum<{
|
|
167
|
+
linear: "linear";
|
|
168
|
+
log: "log";
|
|
169
|
+
}>>;
|
|
170
|
+
x_year_format: z.ZodOptional<z.ZodEnum<{
|
|
171
|
+
YY: "YY";
|
|
172
|
+
YYYY: "YYYY";
|
|
173
|
+
}>>;
|
|
174
|
+
title: z.ZodOptional<z.ZodString>;
|
|
175
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
176
|
+
type: z.ZodLiteral<"density">;
|
|
177
|
+
x: z.ZodString;
|
|
178
|
+
bandwidth: z.ZodOptional<z.ZodNumber>;
|
|
179
|
+
show_area: z.ZodDefault<z.ZodBoolean>;
|
|
180
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
181
|
+
colour_scale: z.ZodOptional<z.ZodEnum<{
|
|
182
|
+
linear: "linear";
|
|
183
|
+
log: "log";
|
|
184
|
+
quantile: "quantile";
|
|
185
|
+
}>>;
|
|
186
|
+
x_label: z.ZodOptional<z.ZodString>;
|
|
187
|
+
y_label: z.ZodOptional<z.ZodString>;
|
|
188
|
+
title: z.ZodOptional<z.ZodString>;
|
|
189
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
190
|
+
type: z.ZodLiteral<"heatmap">;
|
|
191
|
+
x: z.ZodString;
|
|
192
|
+
y: z.ZodString;
|
|
193
|
+
value: z.ZodString;
|
|
194
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
195
|
+
title: z.ZodOptional<z.ZodString>;
|
|
196
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
197
|
+
type: z.ZodLiteral<"pie">;
|
|
198
|
+
label: z.ZodString;
|
|
199
|
+
value: z.ZodString;
|
|
200
|
+
hole: z.ZodDefault<z.ZodNumber>;
|
|
201
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
202
|
+
title: z.ZodOptional<z.ZodString>;
|
|
203
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
204
|
+
type: z.ZodLiteral<"map">;
|
|
205
|
+
projection: z.ZodDefault<z.ZodEnum<{
|
|
206
|
+
flat: "flat";
|
|
207
|
+
globe: "globe";
|
|
208
|
+
}>>;
|
|
209
|
+
centre: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
210
|
+
zoom: z.ZodOptional<z.ZodNumber>;
|
|
211
|
+
layers: z.ZodArray<z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
212
|
+
colour: z.ZodOptional<z.ZodString>;
|
|
213
|
+
colour_type: z.ZodOptional<z.ZodEnum<{
|
|
214
|
+
categorical: "categorical";
|
|
215
|
+
continuous: "continuous";
|
|
216
|
+
}>>;
|
|
217
|
+
colour_scale: z.ZodOptional<z.ZodEnum<{
|
|
218
|
+
linear: "linear";
|
|
219
|
+
log: "log";
|
|
220
|
+
quantile: "quantile";
|
|
221
|
+
}>>;
|
|
222
|
+
type: z.ZodLiteral<"points">;
|
|
223
|
+
longitude: z.ZodString;
|
|
224
|
+
latitude: z.ZodString;
|
|
225
|
+
label: z.ZodOptional<z.ZodString>;
|
|
226
|
+
size: z.ZodOptional<z.ZodString>;
|
|
227
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
228
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
229
|
+
type: z.ZodLiteral<"density">;
|
|
230
|
+
longitude: z.ZodString;
|
|
231
|
+
latitude: z.ZodString;
|
|
232
|
+
weight: z.ZodOptional<z.ZodString>;
|
|
233
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
234
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
235
|
+
colour_scale: z.ZodOptional<z.ZodEnum<{
|
|
236
|
+
linear: "linear";
|
|
237
|
+
log: "log";
|
|
238
|
+
quantile: "quantile";
|
|
239
|
+
}>>;
|
|
240
|
+
type: z.ZodLiteral<"regions">;
|
|
241
|
+
boundaries: z.ZodOptional<z.ZodEnum<{
|
|
242
|
+
canada_provinces: "canada_provinces";
|
|
243
|
+
eu_countries: "eu_countries";
|
|
244
|
+
us_states: "us_states";
|
|
245
|
+
world_countries: "world_countries";
|
|
246
|
+
}>>;
|
|
247
|
+
geojson: z.ZodOptional<z.ZodUnknown>;
|
|
248
|
+
geojson_url: z.ZodOptional<z.ZodURL>;
|
|
249
|
+
feature_property: z.ZodOptional<z.ZodString>;
|
|
250
|
+
key: z.ZodString;
|
|
251
|
+
value: z.ZodOptional<z.ZodString>;
|
|
252
|
+
colour_type: z.ZodOptional<z.ZodEnum<{
|
|
253
|
+
categorical: "categorical";
|
|
254
|
+
continuous: "continuous";
|
|
255
|
+
}>>;
|
|
256
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
257
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
258
|
+
colour: z.ZodOptional<z.ZodString>;
|
|
259
|
+
colour_type: z.ZodOptional<z.ZodEnum<{
|
|
260
|
+
categorical: "categorical";
|
|
261
|
+
continuous: "continuous";
|
|
262
|
+
}>>;
|
|
263
|
+
colour_scale: z.ZodOptional<z.ZodEnum<{
|
|
264
|
+
linear: "linear";
|
|
265
|
+
log: "log";
|
|
266
|
+
quantile: "quantile";
|
|
267
|
+
}>>;
|
|
268
|
+
type: z.ZodLiteral<"lines">;
|
|
269
|
+
from_longitude: z.ZodString;
|
|
270
|
+
from_latitude: z.ZodString;
|
|
271
|
+
to_longitude: z.ZodString;
|
|
272
|
+
to_latitude: z.ZodString;
|
|
273
|
+
label: z.ZodOptional<z.ZodString>;
|
|
274
|
+
width: z.ZodOptional<z.ZodString>;
|
|
275
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
276
|
+
}, z.core.$strict>], "type">>;
|
|
277
|
+
}, z.core.$strict>];
|
|
278
|
+
/** Any one plot, told apart by its type. */
|
|
279
|
+
export declare const PLOT_SCHEMA: z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
280
|
+
colour: z.ZodOptional<z.ZodString>;
|
|
281
|
+
colour_type: z.ZodOptional<z.ZodEnum<{
|
|
282
|
+
categorical: "categorical";
|
|
283
|
+
continuous: "continuous";
|
|
284
|
+
}>>;
|
|
285
|
+
colour_scale: z.ZodOptional<z.ZodEnum<{
|
|
286
|
+
linear: "linear";
|
|
287
|
+
log: "log";
|
|
288
|
+
quantile: "quantile";
|
|
289
|
+
}>>;
|
|
290
|
+
x_label: z.ZodOptional<z.ZodString>;
|
|
291
|
+
y_label: z.ZodOptional<z.ZodString>;
|
|
292
|
+
x_scale: z.ZodDefault<z.ZodEnum<{
|
|
293
|
+
linear: "linear";
|
|
294
|
+
log: "log";
|
|
295
|
+
}>>;
|
|
296
|
+
y_scale: z.ZodDefault<z.ZodEnum<{
|
|
297
|
+
linear: "linear";
|
|
298
|
+
log: "log";
|
|
299
|
+
}>>;
|
|
300
|
+
x_year_format: z.ZodOptional<z.ZodEnum<{
|
|
301
|
+
YY: "YY";
|
|
302
|
+
YYYY: "YYYY";
|
|
303
|
+
}>>;
|
|
304
|
+
y_year_format: z.ZodOptional<z.ZodEnum<{
|
|
305
|
+
YY: "YY";
|
|
306
|
+
YYYY: "YYYY";
|
|
307
|
+
}>>;
|
|
308
|
+
title: z.ZodOptional<z.ZodString>;
|
|
309
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
310
|
+
show_markers: z.ZodOptional<z.ZodBoolean>;
|
|
311
|
+
type: z.ZodLiteral<"line">;
|
|
312
|
+
x: z.ZodString;
|
|
313
|
+
y: z.ZodString;
|
|
314
|
+
line_type: z.ZodOptional<z.ZodString>;
|
|
315
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
316
|
+
colour: z.ZodOptional<z.ZodString>;
|
|
317
|
+
colour_type: z.ZodOptional<z.ZodEnum<{
|
|
318
|
+
categorical: "categorical";
|
|
319
|
+
continuous: "continuous";
|
|
320
|
+
}>>;
|
|
321
|
+
colour_scale: z.ZodOptional<z.ZodEnum<{
|
|
322
|
+
linear: "linear";
|
|
323
|
+
log: "log";
|
|
324
|
+
quantile: "quantile";
|
|
325
|
+
}>>;
|
|
326
|
+
x_label: z.ZodOptional<z.ZodString>;
|
|
327
|
+
y_label: z.ZodOptional<z.ZodString>;
|
|
328
|
+
x_scale: z.ZodDefault<z.ZodEnum<{
|
|
329
|
+
linear: "linear";
|
|
330
|
+
log: "log";
|
|
331
|
+
}>>;
|
|
332
|
+
y_scale: z.ZodDefault<z.ZodEnum<{
|
|
333
|
+
linear: "linear";
|
|
334
|
+
log: "log";
|
|
335
|
+
}>>;
|
|
336
|
+
x_year_format: z.ZodOptional<z.ZodEnum<{
|
|
337
|
+
YY: "YY";
|
|
338
|
+
YYYY: "YYYY";
|
|
339
|
+
}>>;
|
|
340
|
+
y_year_format: z.ZodOptional<z.ZodEnum<{
|
|
341
|
+
YY: "YY";
|
|
342
|
+
YYYY: "YYYY";
|
|
343
|
+
}>>;
|
|
344
|
+
title: z.ZodOptional<z.ZodString>;
|
|
345
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
346
|
+
type: z.ZodLiteral<"scatter">;
|
|
347
|
+
x: z.ZodString;
|
|
348
|
+
y: z.ZodString;
|
|
349
|
+
marker_shape: z.ZodOptional<z.ZodString>;
|
|
350
|
+
size: z.ZodOptional<z.ZodString>;
|
|
351
|
+
show_trend_line: z.ZodDefault<z.ZodBoolean>;
|
|
352
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
353
|
+
colour: z.ZodOptional<z.ZodString>;
|
|
354
|
+
colour_type: z.ZodOptional<z.ZodEnum<{
|
|
355
|
+
categorical: "categorical";
|
|
356
|
+
continuous: "continuous";
|
|
357
|
+
}>>;
|
|
358
|
+
colour_scale: z.ZodOptional<z.ZodEnum<{
|
|
359
|
+
linear: "linear";
|
|
360
|
+
log: "log";
|
|
361
|
+
quantile: "quantile";
|
|
362
|
+
}>>;
|
|
363
|
+
x_label: z.ZodOptional<z.ZodString>;
|
|
364
|
+
y_label: z.ZodOptional<z.ZodString>;
|
|
365
|
+
y_scale: z.ZodDefault<z.ZodEnum<{
|
|
366
|
+
linear: "linear";
|
|
367
|
+
log: "log";
|
|
368
|
+
}>>;
|
|
369
|
+
title: z.ZodOptional<z.ZodString>;
|
|
370
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
371
|
+
type: z.ZodLiteral<"bar">;
|
|
372
|
+
x: z.ZodString;
|
|
373
|
+
y: z.ZodString;
|
|
374
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
375
|
+
grouped: "grouped";
|
|
376
|
+
stacked: "stacked";
|
|
377
|
+
}>>;
|
|
378
|
+
orientation: z.ZodDefault<z.ZodEnum<{
|
|
379
|
+
horizontal: "horizontal";
|
|
380
|
+
vertical: "vertical";
|
|
381
|
+
}>>;
|
|
382
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
383
|
+
colour: z.ZodOptional<z.ZodString>;
|
|
384
|
+
colour_type: z.ZodOptional<z.ZodEnum<{
|
|
385
|
+
categorical: "categorical";
|
|
386
|
+
continuous: "continuous";
|
|
387
|
+
}>>;
|
|
388
|
+
x_label: z.ZodOptional<z.ZodString>;
|
|
389
|
+
y_label: z.ZodOptional<z.ZodString>;
|
|
390
|
+
y_scale: z.ZodDefault<z.ZodEnum<{
|
|
391
|
+
linear: "linear";
|
|
392
|
+
log: "log";
|
|
393
|
+
}>>;
|
|
394
|
+
y_year_format: z.ZodOptional<z.ZodEnum<{
|
|
395
|
+
YY: "YY";
|
|
396
|
+
YYYY: "YYYY";
|
|
397
|
+
}>>;
|
|
398
|
+
title: z.ZodOptional<z.ZodString>;
|
|
399
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
400
|
+
show_markers: z.ZodOptional<z.ZodBoolean>;
|
|
401
|
+
type: z.ZodLiteral<"box">;
|
|
402
|
+
y: z.ZodString;
|
|
403
|
+
x: z.ZodOptional<z.ZodString>;
|
|
404
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
405
|
+
colour: z.ZodOptional<z.ZodString>;
|
|
406
|
+
colour_type: z.ZodOptional<z.ZodEnum<{
|
|
407
|
+
categorical: "categorical";
|
|
408
|
+
continuous: "continuous";
|
|
409
|
+
}>>;
|
|
410
|
+
x_label: z.ZodOptional<z.ZodString>;
|
|
411
|
+
y_label: z.ZodOptional<z.ZodString>;
|
|
412
|
+
y_scale: z.ZodDefault<z.ZodEnum<{
|
|
413
|
+
linear: "linear";
|
|
414
|
+
log: "log";
|
|
415
|
+
}>>;
|
|
416
|
+
x_year_format: z.ZodOptional<z.ZodEnum<{
|
|
417
|
+
YY: "YY";
|
|
418
|
+
YYYY: "YYYY";
|
|
419
|
+
}>>;
|
|
420
|
+
title: z.ZodOptional<z.ZodString>;
|
|
421
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
422
|
+
type: z.ZodLiteral<"histogram">;
|
|
423
|
+
x: z.ZodString;
|
|
424
|
+
bins: z.ZodOptional<z.ZodNumber>;
|
|
425
|
+
is_normalised: z.ZodDefault<z.ZodBoolean>;
|
|
426
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
427
|
+
colour: z.ZodOptional<z.ZodString>;
|
|
428
|
+
colour_type: z.ZodOptional<z.ZodEnum<{
|
|
429
|
+
categorical: "categorical";
|
|
430
|
+
continuous: "continuous";
|
|
431
|
+
}>>;
|
|
432
|
+
x_label: z.ZodOptional<z.ZodString>;
|
|
433
|
+
y_label: z.ZodOptional<z.ZodString>;
|
|
434
|
+
x_scale: z.ZodDefault<z.ZodEnum<{
|
|
435
|
+
linear: "linear";
|
|
436
|
+
log: "log";
|
|
437
|
+
}>>;
|
|
438
|
+
y_scale: z.ZodDefault<z.ZodEnum<{
|
|
439
|
+
linear: "linear";
|
|
440
|
+
log: "log";
|
|
441
|
+
}>>;
|
|
442
|
+
x_year_format: z.ZodOptional<z.ZodEnum<{
|
|
443
|
+
YY: "YY";
|
|
444
|
+
YYYY: "YYYY";
|
|
445
|
+
}>>;
|
|
446
|
+
title: z.ZodOptional<z.ZodString>;
|
|
447
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
448
|
+
type: z.ZodLiteral<"density">;
|
|
449
|
+
x: z.ZodString;
|
|
450
|
+
bandwidth: z.ZodOptional<z.ZodNumber>;
|
|
451
|
+
show_area: z.ZodDefault<z.ZodBoolean>;
|
|
452
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
453
|
+
colour_scale: z.ZodOptional<z.ZodEnum<{
|
|
454
|
+
linear: "linear";
|
|
455
|
+
log: "log";
|
|
456
|
+
quantile: "quantile";
|
|
457
|
+
}>>;
|
|
458
|
+
x_label: z.ZodOptional<z.ZodString>;
|
|
459
|
+
y_label: z.ZodOptional<z.ZodString>;
|
|
460
|
+
title: z.ZodOptional<z.ZodString>;
|
|
461
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
462
|
+
type: z.ZodLiteral<"heatmap">;
|
|
463
|
+
x: z.ZodString;
|
|
464
|
+
y: z.ZodString;
|
|
465
|
+
value: z.ZodString;
|
|
466
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
467
|
+
title: z.ZodOptional<z.ZodString>;
|
|
468
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
469
|
+
type: z.ZodLiteral<"pie">;
|
|
470
|
+
label: z.ZodString;
|
|
471
|
+
value: z.ZodString;
|
|
472
|
+
hole: z.ZodDefault<z.ZodNumber>;
|
|
473
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
474
|
+
title: z.ZodOptional<z.ZodString>;
|
|
475
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
476
|
+
type: z.ZodLiteral<"map">;
|
|
477
|
+
projection: z.ZodDefault<z.ZodEnum<{
|
|
478
|
+
flat: "flat";
|
|
479
|
+
globe: "globe";
|
|
480
|
+
}>>;
|
|
481
|
+
centre: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
482
|
+
zoom: z.ZodOptional<z.ZodNumber>;
|
|
483
|
+
layers: z.ZodArray<z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
484
|
+
colour: z.ZodOptional<z.ZodString>;
|
|
485
|
+
colour_type: z.ZodOptional<z.ZodEnum<{
|
|
486
|
+
categorical: "categorical";
|
|
487
|
+
continuous: "continuous";
|
|
488
|
+
}>>;
|
|
489
|
+
colour_scale: z.ZodOptional<z.ZodEnum<{
|
|
490
|
+
linear: "linear";
|
|
491
|
+
log: "log";
|
|
492
|
+
quantile: "quantile";
|
|
493
|
+
}>>;
|
|
494
|
+
type: z.ZodLiteral<"points">;
|
|
495
|
+
longitude: z.ZodString;
|
|
496
|
+
latitude: z.ZodString;
|
|
497
|
+
label: z.ZodOptional<z.ZodString>;
|
|
498
|
+
size: z.ZodOptional<z.ZodString>;
|
|
499
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
500
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
501
|
+
type: z.ZodLiteral<"density">;
|
|
502
|
+
longitude: z.ZodString;
|
|
503
|
+
latitude: z.ZodString;
|
|
504
|
+
weight: z.ZodOptional<z.ZodString>;
|
|
505
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
506
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
507
|
+
colour_scale: z.ZodOptional<z.ZodEnum<{
|
|
508
|
+
linear: "linear";
|
|
509
|
+
log: "log";
|
|
510
|
+
quantile: "quantile";
|
|
511
|
+
}>>;
|
|
512
|
+
type: z.ZodLiteral<"regions">;
|
|
513
|
+
boundaries: z.ZodOptional<z.ZodEnum<{
|
|
514
|
+
canada_provinces: "canada_provinces";
|
|
515
|
+
eu_countries: "eu_countries";
|
|
516
|
+
us_states: "us_states";
|
|
517
|
+
world_countries: "world_countries";
|
|
518
|
+
}>>;
|
|
519
|
+
geojson: z.ZodOptional<z.ZodUnknown>;
|
|
520
|
+
geojson_url: z.ZodOptional<z.ZodURL>;
|
|
521
|
+
feature_property: z.ZodOptional<z.ZodString>;
|
|
522
|
+
key: z.ZodString;
|
|
523
|
+
value: z.ZodOptional<z.ZodString>;
|
|
524
|
+
colour_type: z.ZodOptional<z.ZodEnum<{
|
|
525
|
+
categorical: "categorical";
|
|
526
|
+
continuous: "continuous";
|
|
527
|
+
}>>;
|
|
528
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
529
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
530
|
+
colour: z.ZodOptional<z.ZodString>;
|
|
531
|
+
colour_type: z.ZodOptional<z.ZodEnum<{
|
|
532
|
+
categorical: "categorical";
|
|
533
|
+
continuous: "continuous";
|
|
534
|
+
}>>;
|
|
535
|
+
colour_scale: z.ZodOptional<z.ZodEnum<{
|
|
536
|
+
linear: "linear";
|
|
537
|
+
log: "log";
|
|
538
|
+
quantile: "quantile";
|
|
539
|
+
}>>;
|
|
540
|
+
type: z.ZodLiteral<"lines">;
|
|
541
|
+
from_longitude: z.ZodString;
|
|
542
|
+
from_latitude: z.ZodString;
|
|
543
|
+
to_longitude: z.ZodString;
|
|
544
|
+
to_latitude: z.ZodString;
|
|
545
|
+
label: z.ZodOptional<z.ZodString>;
|
|
546
|
+
width: z.ZodOptional<z.ZodString>;
|
|
547
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
548
|
+
}, z.core.$strict>], "type">>;
|
|
549
|
+
}, z.core.$strict>], "type">;
|
|
550
|
+
/** Any one plot, through the schema. */
|
|
551
|
+
export type Plot = z.infer<typeof PLOT_SCHEMA>;
|
|
552
|
+
/** The name of a plot type. */
|
|
553
|
+
export type PlotType = Plot["type"];
|
|
554
|
+
/**
|
|
555
|
+
* Find a plot type's schema.
|
|
556
|
+
*
|
|
557
|
+
* @param type - The plot type.
|
|
558
|
+
* @returns Its schema.
|
|
559
|
+
*/
|
|
560
|
+
export declare function findPlotSchema(type: Plot["type"]): (typeof PLOT_SCHEMAS)[number];
|
|
561
|
+
/** Every plot but a map: the plots with x and y. */
|
|
562
|
+
export type ChartPlot = Exclude<Plot, {
|
|
563
|
+
type: "map";
|
|
564
|
+
}>;
|
|
565
|
+
/** Each plot type's column fields that must hold numbers. */
|
|
566
|
+
export declare const NUMERIC_COLUMNS: Readonly<Record<PlotType, readonly string[]>>;
|
|
567
|
+
/** The chart libraries a figure can be drawn with. */
|
|
568
|
+
export declare const RENDERERS: readonly ["plotly", "echarts"];
|
|
569
|
+
/** Whether panels share an axis when the agent does not say: no. */
|
|
570
|
+
export declare const DEFAULT_IS_AXIS_SHARED = false;
|
|
571
|
+
/** The whole figure an agent sends: one table and its plots. Its JSON Schema is what an agent reads. */
|
|
572
|
+
export declare const PLOT_FIGURE_SCHEMA: z.ZodObject<{
|
|
573
|
+
data: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>;
|
|
574
|
+
plots: z.ZodArray<z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
575
|
+
colour: z.ZodOptional<z.ZodString>;
|
|
576
|
+
colour_type: z.ZodOptional<z.ZodEnum<{
|
|
577
|
+
categorical: "categorical";
|
|
578
|
+
continuous: "continuous";
|
|
579
|
+
}>>;
|
|
580
|
+
colour_scale: z.ZodOptional<z.ZodEnum<{
|
|
581
|
+
linear: "linear";
|
|
582
|
+
log: "log";
|
|
583
|
+
quantile: "quantile";
|
|
584
|
+
}>>;
|
|
585
|
+
x_label: z.ZodOptional<z.ZodString>;
|
|
586
|
+
y_label: z.ZodOptional<z.ZodString>;
|
|
587
|
+
x_scale: z.ZodDefault<z.ZodEnum<{
|
|
588
|
+
linear: "linear";
|
|
589
|
+
log: "log";
|
|
590
|
+
}>>;
|
|
591
|
+
y_scale: z.ZodDefault<z.ZodEnum<{
|
|
592
|
+
linear: "linear";
|
|
593
|
+
log: "log";
|
|
594
|
+
}>>;
|
|
595
|
+
x_year_format: z.ZodOptional<z.ZodEnum<{
|
|
596
|
+
YY: "YY";
|
|
597
|
+
YYYY: "YYYY";
|
|
598
|
+
}>>;
|
|
599
|
+
y_year_format: z.ZodOptional<z.ZodEnum<{
|
|
600
|
+
YY: "YY";
|
|
601
|
+
YYYY: "YYYY";
|
|
602
|
+
}>>;
|
|
603
|
+
title: z.ZodOptional<z.ZodString>;
|
|
604
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
605
|
+
show_markers: z.ZodOptional<z.ZodBoolean>;
|
|
606
|
+
type: z.ZodLiteral<"line">;
|
|
607
|
+
x: z.ZodString;
|
|
608
|
+
y: z.ZodString;
|
|
609
|
+
line_type: z.ZodOptional<z.ZodString>;
|
|
610
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
611
|
+
colour: z.ZodOptional<z.ZodString>;
|
|
612
|
+
colour_type: z.ZodOptional<z.ZodEnum<{
|
|
613
|
+
categorical: "categorical";
|
|
614
|
+
continuous: "continuous";
|
|
615
|
+
}>>;
|
|
616
|
+
colour_scale: z.ZodOptional<z.ZodEnum<{
|
|
617
|
+
linear: "linear";
|
|
618
|
+
log: "log";
|
|
619
|
+
quantile: "quantile";
|
|
620
|
+
}>>;
|
|
621
|
+
x_label: z.ZodOptional<z.ZodString>;
|
|
622
|
+
y_label: z.ZodOptional<z.ZodString>;
|
|
623
|
+
x_scale: z.ZodDefault<z.ZodEnum<{
|
|
624
|
+
linear: "linear";
|
|
625
|
+
log: "log";
|
|
626
|
+
}>>;
|
|
627
|
+
y_scale: z.ZodDefault<z.ZodEnum<{
|
|
628
|
+
linear: "linear";
|
|
629
|
+
log: "log";
|
|
630
|
+
}>>;
|
|
631
|
+
x_year_format: z.ZodOptional<z.ZodEnum<{
|
|
632
|
+
YY: "YY";
|
|
633
|
+
YYYY: "YYYY";
|
|
634
|
+
}>>;
|
|
635
|
+
y_year_format: z.ZodOptional<z.ZodEnum<{
|
|
636
|
+
YY: "YY";
|
|
637
|
+
YYYY: "YYYY";
|
|
638
|
+
}>>;
|
|
639
|
+
title: z.ZodOptional<z.ZodString>;
|
|
640
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
641
|
+
type: z.ZodLiteral<"scatter">;
|
|
642
|
+
x: z.ZodString;
|
|
643
|
+
y: z.ZodString;
|
|
644
|
+
marker_shape: z.ZodOptional<z.ZodString>;
|
|
645
|
+
size: z.ZodOptional<z.ZodString>;
|
|
646
|
+
show_trend_line: z.ZodDefault<z.ZodBoolean>;
|
|
647
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
648
|
+
colour: z.ZodOptional<z.ZodString>;
|
|
649
|
+
colour_type: z.ZodOptional<z.ZodEnum<{
|
|
650
|
+
categorical: "categorical";
|
|
651
|
+
continuous: "continuous";
|
|
652
|
+
}>>;
|
|
653
|
+
colour_scale: z.ZodOptional<z.ZodEnum<{
|
|
654
|
+
linear: "linear";
|
|
655
|
+
log: "log";
|
|
656
|
+
quantile: "quantile";
|
|
657
|
+
}>>;
|
|
658
|
+
x_label: z.ZodOptional<z.ZodString>;
|
|
659
|
+
y_label: z.ZodOptional<z.ZodString>;
|
|
660
|
+
y_scale: z.ZodDefault<z.ZodEnum<{
|
|
661
|
+
linear: "linear";
|
|
662
|
+
log: "log";
|
|
663
|
+
}>>;
|
|
664
|
+
title: z.ZodOptional<z.ZodString>;
|
|
665
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
666
|
+
type: z.ZodLiteral<"bar">;
|
|
667
|
+
x: z.ZodString;
|
|
668
|
+
y: z.ZodString;
|
|
669
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
670
|
+
grouped: "grouped";
|
|
671
|
+
stacked: "stacked";
|
|
672
|
+
}>>;
|
|
673
|
+
orientation: z.ZodDefault<z.ZodEnum<{
|
|
674
|
+
horizontal: "horizontal";
|
|
675
|
+
vertical: "vertical";
|
|
676
|
+
}>>;
|
|
677
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
678
|
+
colour: z.ZodOptional<z.ZodString>;
|
|
679
|
+
colour_type: z.ZodOptional<z.ZodEnum<{
|
|
680
|
+
categorical: "categorical";
|
|
681
|
+
continuous: "continuous";
|
|
682
|
+
}>>;
|
|
683
|
+
x_label: z.ZodOptional<z.ZodString>;
|
|
684
|
+
y_label: z.ZodOptional<z.ZodString>;
|
|
685
|
+
y_scale: z.ZodDefault<z.ZodEnum<{
|
|
686
|
+
linear: "linear";
|
|
687
|
+
log: "log";
|
|
688
|
+
}>>;
|
|
689
|
+
y_year_format: z.ZodOptional<z.ZodEnum<{
|
|
690
|
+
YY: "YY";
|
|
691
|
+
YYYY: "YYYY";
|
|
692
|
+
}>>;
|
|
693
|
+
title: z.ZodOptional<z.ZodString>;
|
|
694
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
695
|
+
show_markers: z.ZodOptional<z.ZodBoolean>;
|
|
696
|
+
type: z.ZodLiteral<"box">;
|
|
697
|
+
y: z.ZodString;
|
|
698
|
+
x: z.ZodOptional<z.ZodString>;
|
|
699
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
700
|
+
colour: z.ZodOptional<z.ZodString>;
|
|
701
|
+
colour_type: z.ZodOptional<z.ZodEnum<{
|
|
702
|
+
categorical: "categorical";
|
|
703
|
+
continuous: "continuous";
|
|
704
|
+
}>>;
|
|
705
|
+
x_label: z.ZodOptional<z.ZodString>;
|
|
706
|
+
y_label: z.ZodOptional<z.ZodString>;
|
|
707
|
+
y_scale: z.ZodDefault<z.ZodEnum<{
|
|
708
|
+
linear: "linear";
|
|
709
|
+
log: "log";
|
|
710
|
+
}>>;
|
|
711
|
+
x_year_format: z.ZodOptional<z.ZodEnum<{
|
|
712
|
+
YY: "YY";
|
|
713
|
+
YYYY: "YYYY";
|
|
714
|
+
}>>;
|
|
715
|
+
title: z.ZodOptional<z.ZodString>;
|
|
716
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
717
|
+
type: z.ZodLiteral<"histogram">;
|
|
718
|
+
x: z.ZodString;
|
|
719
|
+
bins: z.ZodOptional<z.ZodNumber>;
|
|
720
|
+
is_normalised: z.ZodDefault<z.ZodBoolean>;
|
|
721
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
722
|
+
colour: z.ZodOptional<z.ZodString>;
|
|
723
|
+
colour_type: z.ZodOptional<z.ZodEnum<{
|
|
724
|
+
categorical: "categorical";
|
|
725
|
+
continuous: "continuous";
|
|
726
|
+
}>>;
|
|
727
|
+
x_label: z.ZodOptional<z.ZodString>;
|
|
728
|
+
y_label: z.ZodOptional<z.ZodString>;
|
|
729
|
+
x_scale: z.ZodDefault<z.ZodEnum<{
|
|
730
|
+
linear: "linear";
|
|
731
|
+
log: "log";
|
|
732
|
+
}>>;
|
|
733
|
+
y_scale: z.ZodDefault<z.ZodEnum<{
|
|
734
|
+
linear: "linear";
|
|
735
|
+
log: "log";
|
|
736
|
+
}>>;
|
|
737
|
+
x_year_format: z.ZodOptional<z.ZodEnum<{
|
|
738
|
+
YY: "YY";
|
|
739
|
+
YYYY: "YYYY";
|
|
740
|
+
}>>;
|
|
741
|
+
title: z.ZodOptional<z.ZodString>;
|
|
742
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
743
|
+
type: z.ZodLiteral<"density">;
|
|
744
|
+
x: z.ZodString;
|
|
745
|
+
bandwidth: z.ZodOptional<z.ZodNumber>;
|
|
746
|
+
show_area: z.ZodDefault<z.ZodBoolean>;
|
|
747
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
748
|
+
colour_scale: z.ZodOptional<z.ZodEnum<{
|
|
749
|
+
linear: "linear";
|
|
750
|
+
log: "log";
|
|
751
|
+
quantile: "quantile";
|
|
752
|
+
}>>;
|
|
753
|
+
x_label: z.ZodOptional<z.ZodString>;
|
|
754
|
+
y_label: z.ZodOptional<z.ZodString>;
|
|
755
|
+
title: z.ZodOptional<z.ZodString>;
|
|
756
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
757
|
+
type: z.ZodLiteral<"heatmap">;
|
|
758
|
+
x: z.ZodString;
|
|
759
|
+
y: z.ZodString;
|
|
760
|
+
value: z.ZodString;
|
|
761
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
762
|
+
title: z.ZodOptional<z.ZodString>;
|
|
763
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
764
|
+
type: z.ZodLiteral<"pie">;
|
|
765
|
+
label: z.ZodString;
|
|
766
|
+
value: z.ZodString;
|
|
767
|
+
hole: z.ZodDefault<z.ZodNumber>;
|
|
768
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
769
|
+
title: z.ZodOptional<z.ZodString>;
|
|
770
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
771
|
+
type: z.ZodLiteral<"map">;
|
|
772
|
+
projection: z.ZodDefault<z.ZodEnum<{
|
|
773
|
+
flat: "flat";
|
|
774
|
+
globe: "globe";
|
|
775
|
+
}>>;
|
|
776
|
+
centre: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
777
|
+
zoom: z.ZodOptional<z.ZodNumber>;
|
|
778
|
+
layers: z.ZodArray<z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
779
|
+
colour: z.ZodOptional<z.ZodString>;
|
|
780
|
+
colour_type: z.ZodOptional<z.ZodEnum<{
|
|
781
|
+
categorical: "categorical";
|
|
782
|
+
continuous: "continuous";
|
|
783
|
+
}>>;
|
|
784
|
+
colour_scale: z.ZodOptional<z.ZodEnum<{
|
|
785
|
+
linear: "linear";
|
|
786
|
+
log: "log";
|
|
787
|
+
quantile: "quantile";
|
|
788
|
+
}>>;
|
|
789
|
+
type: z.ZodLiteral<"points">;
|
|
790
|
+
longitude: z.ZodString;
|
|
791
|
+
latitude: z.ZodString;
|
|
792
|
+
label: z.ZodOptional<z.ZodString>;
|
|
793
|
+
size: z.ZodOptional<z.ZodString>;
|
|
794
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
795
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
796
|
+
type: z.ZodLiteral<"density">;
|
|
797
|
+
longitude: z.ZodString;
|
|
798
|
+
latitude: z.ZodString;
|
|
799
|
+
weight: z.ZodOptional<z.ZodString>;
|
|
800
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
801
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
802
|
+
colour_scale: z.ZodOptional<z.ZodEnum<{
|
|
803
|
+
linear: "linear";
|
|
804
|
+
log: "log";
|
|
805
|
+
quantile: "quantile";
|
|
806
|
+
}>>;
|
|
807
|
+
type: z.ZodLiteral<"regions">;
|
|
808
|
+
boundaries: z.ZodOptional<z.ZodEnum<{
|
|
809
|
+
canada_provinces: "canada_provinces";
|
|
810
|
+
eu_countries: "eu_countries";
|
|
811
|
+
us_states: "us_states";
|
|
812
|
+
world_countries: "world_countries";
|
|
813
|
+
}>>;
|
|
814
|
+
geojson: z.ZodOptional<z.ZodUnknown>;
|
|
815
|
+
geojson_url: z.ZodOptional<z.ZodURL>;
|
|
816
|
+
feature_property: z.ZodOptional<z.ZodString>;
|
|
817
|
+
key: z.ZodString;
|
|
818
|
+
value: z.ZodOptional<z.ZodString>;
|
|
819
|
+
colour_type: z.ZodOptional<z.ZodEnum<{
|
|
820
|
+
categorical: "categorical";
|
|
821
|
+
continuous: "continuous";
|
|
822
|
+
}>>;
|
|
823
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
824
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
825
|
+
colour: z.ZodOptional<z.ZodString>;
|
|
826
|
+
colour_type: z.ZodOptional<z.ZodEnum<{
|
|
827
|
+
categorical: "categorical";
|
|
828
|
+
continuous: "continuous";
|
|
829
|
+
}>>;
|
|
830
|
+
colour_scale: z.ZodOptional<z.ZodEnum<{
|
|
831
|
+
linear: "linear";
|
|
832
|
+
log: "log";
|
|
833
|
+
quantile: "quantile";
|
|
834
|
+
}>>;
|
|
835
|
+
type: z.ZodLiteral<"lines">;
|
|
836
|
+
from_longitude: z.ZodString;
|
|
837
|
+
from_latitude: z.ZodString;
|
|
838
|
+
to_longitude: z.ZodString;
|
|
839
|
+
to_latitude: z.ZodString;
|
|
840
|
+
label: z.ZodOptional<z.ZodString>;
|
|
841
|
+
width: z.ZodOptional<z.ZodString>;
|
|
842
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>>;
|
|
843
|
+
}, z.core.$strict>], "type">>;
|
|
844
|
+
}, z.core.$strict>], "type">>;
|
|
845
|
+
grid: z.ZodOptional<z.ZodObject<{
|
|
846
|
+
rows: z.ZodNumber;
|
|
847
|
+
columns: z.ZodNumber;
|
|
848
|
+
}, z.core.$strict>>;
|
|
849
|
+
title: z.ZodOptional<z.ZodString>;
|
|
850
|
+
caption: z.ZodOptional<z.ZodString>;
|
|
851
|
+
renderer: z.ZodOptional<z.ZodEnum<{
|
|
852
|
+
echarts: "echarts";
|
|
853
|
+
plotly: "plotly";
|
|
854
|
+
}>>;
|
|
855
|
+
is_x_axis_shared: z.ZodDefault<z.ZodBoolean>;
|
|
856
|
+
is_y_axis_shared: z.ZodDefault<z.ZodBoolean>;
|
|
857
|
+
}, z.core.$strict>;
|
|
858
|
+
/** A figure through the schema, every default filled in: what the model draws. */
|
|
859
|
+
export type PlotFigure = z.output<typeof PLOT_FIGURE_SCHEMA>;
|
|
860
|
+
/** A figure as a caller writes it, defaults left out. */
|
|
861
|
+
export type PlotFigureInput = z.input<typeof PLOT_FIGURE_SCHEMA>;
|