plotagents 0.0.0-stage → 0.7.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.
Files changed (67) hide show
  1. package/AGENTS.md +98 -0
  2. package/LICENSE +21 -0
  3. package/README.md +217 -2
  4. package/bin/plotagents.js +73 -0
  5. package/dist/plotagents-geo.js +79 -0
  6. package/dist/plotagents.js +11611 -0
  7. package/docs/api.md +172 -0
  8. package/docs/charts.md +352 -0
  9. package/docs/colorscales.md +46 -0
  10. package/docs/dashboards.md +79 -0
  11. package/docs/getting-started.md +142 -0
  12. package/docs/rendering.md +47 -0
  13. package/docs/themes.md +116 -0
  14. package/index.d.ts +384 -0
  15. package/package.json +80 -4
  16. package/schema.json +1874 -0
  17. package/src/axes.js +152 -0
  18. package/src/charts/bar.js +350 -0
  19. package/src/charts/categorical.js +495 -0
  20. package/src/charts/chord.js +218 -0
  21. package/src/charts/choropleth.js +807 -0
  22. package/src/charts/dist.js +530 -0
  23. package/src/charts/donut.js +232 -0
  24. package/src/charts/flowchart.js +407 -0
  25. package/src/charts/gantt.js +460 -0
  26. package/src/charts/heatmap.js +76 -0
  27. package/src/charts/kpi.js +100 -0
  28. package/src/charts/line.js +551 -0
  29. package/src/charts/network.js +707 -0
  30. package/src/charts/pointmap.js +599 -0
  31. package/src/charts/pyramid.js +177 -0
  32. package/src/charts/radar.js +158 -0
  33. package/src/charts/regplot.js +370 -0
  34. package/src/charts/sankey.js +169 -0
  35. package/src/charts/scatter.js +214 -0
  36. package/src/charts/sunburst.js +136 -0
  37. package/src/charts/treemap.js +197 -0
  38. package/src/charts/wordcloud.js +163 -0
  39. package/src/colorscales.js +182 -0
  40. package/src/context.js +10 -0
  41. package/src/dashboard.js +438 -0
  42. package/src/dashed.js +90 -0
  43. package/src/data.js +137 -0
  44. package/src/facet.js +84 -0
  45. package/src/format.js +203 -0
  46. package/src/frame.js +226 -0
  47. package/src/geo/chile.js +7 -0
  48. package/src/geo/data/chile-regiones.js +12 -0
  49. package/src/geo/data/usa-estados.js +12 -0
  50. package/src/geo/data/world.js +12 -0
  51. package/src/geo/projection.js +217 -0
  52. package/src/geo/registry.js +110 -0
  53. package/src/geo/usa.js +8 -0
  54. package/src/geo/world.js +7 -0
  55. package/src/hierarchy.js +139 -0
  56. package/src/index.js +336 -0
  57. package/src/infer.js +58 -0
  58. package/src/interact.js +483 -0
  59. package/src/lint.js +417 -0
  60. package/src/palette.js +59 -0
  61. package/src/runtime.js +416 -0
  62. package/src/scale.js +241 -0
  63. package/src/schema.js +337 -0
  64. package/src/stats.js +303 -0
  65. package/src/svg.js +85 -0
  66. package/src/text.js +61 -0
  67. package/src/theme.js +311 -0
package/schema.json ADDED
@@ -0,0 +1,1874 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://unpkg.com/plotagents/schema.json",
4
+ "title": "plotagents spec",
5
+ "description": "Declarative chart spec. Data as rows (tidy) plus the field name for each role. Everything else has well-designed defaults. `data` is required except for kpi (`items`), flowchart (`nodes` + `edges`), chord (`matrix`) and wordcloud with raw `text`.",
6
+ "type": "object",
7
+ "properties": {
8
+ "type": {
9
+ "type": "string",
10
+ "enum": [
11
+ "auto",
12
+ "bar",
13
+ "column",
14
+ "count",
15
+ "line",
16
+ "area",
17
+ "scatter",
18
+ "bubble",
19
+ "treemap",
20
+ "sunburst",
21
+ "donut",
22
+ "pie",
23
+ "heatmap",
24
+ "sankey",
25
+ "kpi",
26
+ "hist",
27
+ "kde",
28
+ "ecdf",
29
+ "regplot",
30
+ "residplot",
31
+ "jointplot",
32
+ "box",
33
+ "violin",
34
+ "strip",
35
+ "swarm",
36
+ "point",
37
+ "radar",
38
+ "network",
39
+ "chord",
40
+ "pyramid",
41
+ "flowchart",
42
+ "gantt",
43
+ "wordcloud",
44
+ "choropleth",
45
+ "symbolmap",
46
+ "pointmap",
47
+ "barplot",
48
+ "countplot",
49
+ "columns",
50
+ "lineplot",
51
+ "areaplot",
52
+ "scatterplot",
53
+ "histplot",
54
+ "histogram",
55
+ "kdeplot",
56
+ "density",
57
+ "ecdfplot",
58
+ "lmplot",
59
+ "reg",
60
+ "regression",
61
+ "joint",
62
+ "boxplot",
63
+ "violinplot",
64
+ "stripplot",
65
+ "swarmplot",
66
+ "beeswarm",
67
+ "pointplot",
68
+ "spider",
69
+ "doughnut",
70
+ "dotmap",
71
+ "dot-map",
72
+ "tilemap",
73
+ "basemap",
74
+ "mapa-puntos",
75
+ "mapa-de-puntos",
76
+ "latlon",
77
+ "graph",
78
+ "force",
79
+ "red",
80
+ "chord-diagram",
81
+ "cuerdas",
82
+ "populationpyramid",
83
+ "population",
84
+ "piramide",
85
+ "pirámide",
86
+ "flow",
87
+ "diagram",
88
+ "process",
89
+ "diagrama",
90
+ "map",
91
+ "mapa",
92
+ "choroplethmap",
93
+ "symbol",
94
+ "bubblemap",
95
+ "mapa-simbolos",
96
+ "words",
97
+ "word-cloud",
98
+ "wordclouds",
99
+ "tagcloud",
100
+ "tag-cloud",
101
+ "nube",
102
+ "nube-de-palabras",
103
+ "cloud",
104
+ "timeline",
105
+ "roadmap",
106
+ "schedule",
107
+ "cronograma",
108
+ "carta-gantt",
109
+ "ganttchart",
110
+ "gantt-chart",
111
+ "planning",
112
+ "tree",
113
+ "stat",
114
+ "stats",
115
+ "number",
116
+ "heat"
117
+ ],
118
+ "description": "Compare: bar, count. Time: line, area. Schedules: gantt. Relationships: scatter, bubble, regplot, residplot, jointplot, radar. Distributions (seaborn): hist, kde, ecdf, box, violin, strip, swarm, point. Part-to-whole: treemap, sunburst, donut, pie. Other: heatmap, sankey, kpi, network, chord, pyramid, flowchart, wordcloud. Maps: choropleth, symbolmap, pointmap (lat/lon dots over a tile basemap). seaborn names are accepted (barplot, countplot, histplot, kdeplot, boxplot, violinplot, lmplot…). \"auto\" (default) picks from the data."
119
+ },
120
+ "data": {
121
+ "description": "Array of rows, e.g. [{ \"region\": \"Biobío\", \"sales\": 1240 }]. For kpi it can be omitted in favor of `items`.",
122
+ "anyOf": [
123
+ {
124
+ "type": "array",
125
+ "items": {
126
+ "type": "object"
127
+ }
128
+ },
129
+ {
130
+ "type": "object"
131
+ }
132
+ ]
133
+ },
134
+ "title": {
135
+ "type": "string",
136
+ "description": "The finding as a full sentence, ideally with the key number, e.g. \"Biobío accounts for 32% of sales\"."
137
+ },
138
+ "subtitle": {
139
+ "type": "string",
140
+ "description": "How to read the chart: measure, unit and period, e.g. \"Sales by region, CLP millions, 2025\"."
141
+ },
142
+ "source": {
143
+ "type": "string",
144
+ "description": "Data source, shown at the bottom right."
145
+ },
146
+ "locale": {
147
+ "type": "string",
148
+ "enum": [
149
+ "es",
150
+ "en"
151
+ ],
152
+ "description": "Language and number format. Default \"es\" (1.234,5); use \"en\" for 1,234.5."
153
+ },
154
+ "x": {
155
+ "type": "string",
156
+ "description": "x-axis or category field (bar, line, area, scatter, heatmap, box, violin…)."
157
+ },
158
+ "y": {
159
+ "anyOf": [
160
+ {
161
+ "type": "string"
162
+ },
163
+ {
164
+ "type": "array",
165
+ "items": {
166
+ "type": "string"
167
+ }
168
+ }
169
+ ],
170
+ "description": "Value field. For line/bar a list of fields (wide table) turns each one into a series."
171
+ },
172
+ "series": {
173
+ "type": "string",
174
+ "description": "Field that splits the data into colored series. Alias: hue."
175
+ },
176
+ "color": {
177
+ "type": "string",
178
+ "description": "Alias of series when it names a field (a \"#hex\" value is a fixed color instead)."
179
+ },
180
+ "hue": {
181
+ "type": "string",
182
+ "description": "Alias of series (seaborn naming)."
183
+ },
184
+ "value": {
185
+ "type": "string",
186
+ "description": "Value field for treemap, sunburst, donut, heatmap, sankey and radar."
187
+ },
188
+ "label": {
189
+ "type": "string",
190
+ "description": "Name field (treemap, donut, point labels in scatter/regplot)."
191
+ },
192
+ "group": {
193
+ "type": "string",
194
+ "description": "Level-1 group field for a two-level treemap (shortcut for path). gantt: phase/workstream field (one colored section per phase)."
195
+ },
196
+ "path": {
197
+ "type": "array",
198
+ "items": {
199
+ "type": "string"
200
+ },
201
+ "description": "Hierarchy for treemap/sunburst, any depth: [level1, level2, …]."
202
+ },
203
+ "size": {
204
+ "type": "string",
205
+ "description": "Bubble size field (area-proportional)."
206
+ },
207
+ "from": {
208
+ "type": "string",
209
+ "description": "Sankey source field."
210
+ },
211
+ "to": {
212
+ "type": "string",
213
+ "description": "Sankey target field."
214
+ },
215
+ "axis": {
216
+ "type": "string",
217
+ "description": "radar: field with the axis names (long format)."
218
+ },
219
+ "axes": {
220
+ "type": "array",
221
+ "items": {
222
+ "type": "string"
223
+ },
224
+ "description": "radar: fields to use as axes (wide format, one row per series)."
225
+ },
226
+ "items": {
227
+ "type": "array",
228
+ "description": "kpi: the indicators to show.",
229
+ "items": {
230
+ "type": "object",
231
+ "required": [
232
+ "label",
233
+ "value"
234
+ ],
235
+ "properties": {
236
+ "label": {
237
+ "type": "string"
238
+ },
239
+ "value": {
240
+ "type": "number"
241
+ },
242
+ "delta": {
243
+ "type": "number",
244
+ "description": "Relative change as a fraction (0.12 = +12%)."
245
+ },
246
+ "previous": {
247
+ "type": "number",
248
+ "description": "Previous value; when given, the change is computed."
249
+ },
250
+ "period": {
251
+ "type": "string",
252
+ "description": "What it is compared against, e.g. \"vs 2025\"."
253
+ },
254
+ "good": {
255
+ "type": "string",
256
+ "enum": [
257
+ "up",
258
+ "down"
259
+ ],
260
+ "description": "Whether going up is good (up) or bad (down, e.g. costs)."
261
+ },
262
+ "trend": {
263
+ "type": "array",
264
+ "items": {
265
+ "type": "number"
266
+ },
267
+ "description": "Short series for the sparkline."
268
+ },
269
+ "target": {
270
+ "type": "number",
271
+ "description": "Target: draws a progress meter."
272
+ },
273
+ "format": {
274
+ "type": "string"
275
+ }
276
+ }
277
+ }
278
+ },
279
+ "text": {
280
+ "description": "wordcloud: field with the words, OR the raw text to count (a string or a list of strings, e.g. open survey answers). Raw text drops Spanish/English stopwords.",
281
+ "anyOf": [
282
+ {
283
+ "type": "string"
284
+ },
285
+ {
286
+ "type": "array",
287
+ "items": {
288
+ "type": "string"
289
+ }
290
+ }
291
+ ]
292
+ },
293
+ "textField": {
294
+ "type": "string",
295
+ "description": "wordcloud: field holding free text in each row; words are counted across rows."
296
+ },
297
+ "stopwords": {
298
+ "type": "array",
299
+ "items": {
300
+ "type": "string"
301
+ },
302
+ "description": "wordcloud: extra words to ignore when counting raw text."
303
+ },
304
+ "minFont": {
305
+ "type": "number",
306
+ "description": "wordcloud: smallest font size (default 11)."
307
+ },
308
+ "maxFont": {
309
+ "type": "number",
310
+ "description": "wordcloud: largest font size (default from the panel size)."
311
+ },
312
+ "task": {
313
+ "type": "string",
314
+ "description": "gantt: task name field (one row per task)."
315
+ },
316
+ "start": {
317
+ "type": "string",
318
+ "description": "gantt: start date field (\"2026-03-02\", \"2026-03\") or a number (e.g. week)."
319
+ },
320
+ "end": {
321
+ "type": "string",
322
+ "description": "gantt: end date field. Day dates are inclusive. Missing end, or end equal to start, makes a milestone."
323
+ },
324
+ "duration": {
325
+ "type": "string",
326
+ "description": "gantt: duration field (days, or units of a numeric axis) instead of `end`."
327
+ },
328
+ "progress": {
329
+ "type": "string",
330
+ "description": "gantt: completion field, 0–1 or 0–100. The filled part of each bar is the progress."
331
+ },
332
+ "dependsOn": {
333
+ "type": "string",
334
+ "description": "gantt: field with the name(s) of the predecessor task(s) (\"A\" or \"A, B\"): draws arrows."
335
+ },
336
+ "milestone": {
337
+ "type": "string",
338
+ "description": "gantt: boolean field that marks milestones (drawn as diamonds)."
339
+ },
340
+ "today": {
341
+ "description": "gantt: date of the \"today\" line (\"2026-03-12\"), or true for the current date.",
342
+ "anyOf": [
343
+ {
344
+ "type": "string"
345
+ },
346
+ {
347
+ "type": "boolean"
348
+ },
349
+ {
350
+ "type": "number"
351
+ }
352
+ ]
353
+ },
354
+ "groupHeaders": {
355
+ "description": "gantt: false draws phases as a color legend instead of section headers.",
356
+ "anyOf": [
357
+ {
358
+ "type": "boolean"
359
+ },
360
+ {
361
+ "type": "string",
362
+ "enum": [
363
+ "compact"
364
+ ]
365
+ }
366
+ ]
367
+ },
368
+ "rowHeight": {
369
+ "type": "number",
370
+ "description": "gantt: row height in px."
371
+ },
372
+ "collapsed": {
373
+ "description": "gantt: phases (values of `group`) drawn collapsed into one summary row; true collapses all. In the browser a click on a phase header toggles it.",
374
+ "anyOf": [
375
+ {
376
+ "type": "boolean"
377
+ },
378
+ {
379
+ "type": "string"
380
+ },
381
+ {
382
+ "type": "array",
383
+ "items": {
384
+ "type": "string"
385
+ }
386
+ }
387
+ ]
388
+ },
389
+ "collapsible": {
390
+ "type": "boolean",
391
+ "description": "gantt: false disables click-to-collapse of phases in the browser."
392
+ },
393
+ "critical": {
394
+ "type": "boolean",
395
+ "description": "gantt: highlight the critical path, the zero-slack chain along `dependsOn`."
396
+ },
397
+ "criticalColor": {
398
+ "type": "string",
399
+ "description": "gantt: color of the critical path."
400
+ },
401
+ "weekends": {
402
+ "type": "boolean",
403
+ "description": "gantt: shade weekends on day plans of up to 120 days (default true)."
404
+ },
405
+ "todayColor": {
406
+ "type": "string",
407
+ "description": "gantt: color of the \"today\" line."
408
+ },
409
+ "sort": {
410
+ "type": "string",
411
+ "enum": [
412
+ "desc",
413
+ "asc",
414
+ "none",
415
+ "alpha",
416
+ "start"
417
+ ],
418
+ "description": "bar: category order (desc by default unless the categories are time). gantt: \"start\" orders tasks by start date. donut/chord: \"none\" keeps the data order."
419
+ },
420
+ "geo": {
421
+ "description": "choropleth/symbolmap: \"chile\" (16 regions, default), \"usa\" (50 states + DC, Albers with Alaska/Hawaii insets; Puerto Rico when it has data), \"world\" (countries), a name registered with registerGeo(), or YOUR OWN geometry: a GeoJSON FeatureCollection, Feature, list of Features or bare geometry, or a TopoJSON Topology. Polygons are filled, LineStrings stroked and Points drawn as dots. In the browser, render() also accepts a URL to a .geojson/.topojson file.",
422
+ "anyOf": [
423
+ {
424
+ "type": "string"
425
+ },
426
+ {
427
+ "type": "object"
428
+ },
429
+ {
430
+ "type": "array",
431
+ "items": {
432
+ "type": "object"
433
+ }
434
+ }
435
+ ]
436
+ },
437
+ "geoObject": {
438
+ "type": "string",
439
+ "description": "TopoJSON: name of the object inside `objects` to draw (default: the first one)."
440
+ },
441
+ "key": {
442
+ "type": "string",
443
+ "description": "choropleth/symbolmap: data field with the region, state or country name/code to match (US: \"TX\", \"Texas\", \"06\")."
444
+ },
445
+ "projection": {
446
+ "description": "Map projection (picked automatically): \"mercator\", \"equalEarth\", \"albersUsa\", \"equirectangular\", \"conic\" (or { type: \"conic\", parallels: [-30, -45], rotate: 72 }), \"identity\" (coordinates already in pixels, y down) or \"planar\" (projected coordinates such as UTM metres, y up; chosen automatically when coordinates are outside lon/lat range).",
447
+ "anyOf": [
448
+ {
449
+ "type": "string",
450
+ "enum": [
451
+ "mercator",
452
+ "equalEarth",
453
+ "albersUsa",
454
+ "equirectangular",
455
+ "conic",
456
+ "identity",
457
+ "planar"
458
+ ]
459
+ },
460
+ {
461
+ "type": "object",
462
+ "properties": {
463
+ "type": {
464
+ "type": "string"
465
+ },
466
+ "parallels": {
467
+ "type": "array",
468
+ "items": {
469
+ "type": "number"
470
+ }
471
+ },
472
+ "rotate": {
473
+ "type": "number"
474
+ },
475
+ "center": {
476
+ "type": "array",
477
+ "items": {
478
+ "type": "number"
479
+ }
480
+ }
481
+ }
482
+ }
483
+ ]
484
+ },
485
+ "values": {
486
+ "type": "boolean",
487
+ "description": "choropleth with state codes (usa): false shows only the codes, without values."
488
+ },
489
+ "featureKey": {
490
+ "type": "string",
491
+ "description": "choropleth: feature property to match `key` against. Default tries code, id, ISO-3, name and aliases, then any property whose values match the data (e.g. \"CUT_REG\", \"GEOID\")."
492
+ },
493
+ "nameKey": {
494
+ "type": "string",
495
+ "description": "choropleth: feature property with the display name (default: name, NOMBRE, NAME_1, ADMIN…)."
496
+ },
497
+ "fitTo": {
498
+ "description": "Map framing: zoom to some regions (names or codes), a bounding box [lonMin, latMin, lonMax, latMax], or \"markers\". The rest of the map stays as context, clipped.",
499
+ "anyOf": [
500
+ {
501
+ "type": "string"
502
+ },
503
+ {
504
+ "type": "array",
505
+ "items": {
506
+ "anyOf": [
507
+ {
508
+ "type": "string"
509
+ },
510
+ {
511
+ "type": "number"
512
+ }
513
+ ]
514
+ }
515
+ }
516
+ ]
517
+ },
518
+ "markers": {
519
+ "description": "Map: points on top, from [{ lon, lat, label, value?, color? }] or { data, lon, lat, label, size, color, legend, maxRadius, labels }. With a size field, circles are area-proportional.",
520
+ "anyOf": [
521
+ {
522
+ "type": "array",
523
+ "items": {
524
+ "type": "object"
525
+ }
526
+ },
527
+ {
528
+ "type": "object"
529
+ }
530
+ ]
531
+ },
532
+ "layers": {
533
+ "type": "array",
534
+ "description": "Map: extra GeoJSON drawn over (or `below: true` under) the regions: rivers, roads, routes, borders, points. Each { geo, label?, stroke?, width?, fill?, dash?, opacity?, below? }; a `label` adds a legend key.",
535
+ "items": {
536
+ "type": "object"
537
+ }
538
+ },
539
+ "borderColor": {
540
+ "type": "string",
541
+ "description": "Map: color of the borders between regions."
542
+ },
543
+ "borderWidth": {
544
+ "type": "number",
545
+ "description": "Map: width of the borders between regions."
546
+ },
547
+ "pointRadius": {
548
+ "type": "number",
549
+ "description": "Map: radius of Point features in your own GeoJSON (default 5)."
550
+ },
551
+ "missing": {
552
+ "type": "string",
553
+ "enum": [
554
+ "hatch",
555
+ "plain"
556
+ ],
557
+ "description": "choropleth: how regions without data look: hatched (default) or \"plain\" (flat tint)."
558
+ },
559
+ "thresholds": {
560
+ "type": "array",
561
+ "items": {
562
+ "type": "number"
563
+ },
564
+ "description": "choropleth: class breaks (same as a list in `scale`)."
565
+ },
566
+ "lat": {
567
+ "type": "string",
568
+ "description": "pointmap: latitude field (auto-detected: lat, latitude, latitud)."
569
+ },
570
+ "lon": {
571
+ "type": "string",
572
+ "description": "pointmap: longitude field (auto-detected: lon, lng, longitude, longitud)."
573
+ },
574
+ "tiles": {
575
+ "description": "pointmap: basemap. \"osm\" (default), \"esri-gray\", \"esri-dark\", \"carto-light\", \"carto-dark\", \"mapbox-light\", \"mapbox-dark\" (needs `tilesKey`), your own { url, attribution, subdomains, maxZoom, retina } with {z}/{x}/{y}, or false for none (vector world outline).",
576
+ "anyOf": [
577
+ {
578
+ "type": "string",
579
+ "enum": [
580
+ "osm",
581
+ "esri-gray",
582
+ "esri-dark",
583
+ "carto-light",
584
+ "carto-dark",
585
+ "mapbox-light",
586
+ "mapbox-dark"
587
+ ]
588
+ },
589
+ {
590
+ "type": "boolean",
591
+ "enum": [
592
+ false
593
+ ]
594
+ },
595
+ {
596
+ "type": "object",
597
+ "properties": {
598
+ "url": {
599
+ "type": "string"
600
+ },
601
+ "attribution": {
602
+ "type": "string"
603
+ },
604
+ "subdomains": {
605
+ "type": "string"
606
+ },
607
+ "maxZoom": {
608
+ "type": "number"
609
+ },
610
+ "retina": {
611
+ "type": "boolean"
612
+ }
613
+ },
614
+ "required": [
615
+ "url"
616
+ ]
617
+ }
618
+ ]
619
+ },
620
+ "tilesKey": {
621
+ "type": "string",
622
+ "description": "pointmap: API key or PUBLIC token for the tile provider (Mapbox \"pk.…\"; a secret \"sk.\" token is rejected because it would be visible in the SVG)."
623
+ },
624
+ "tileStyle": {
625
+ "type": "string",
626
+ "enum": [
627
+ "muted",
628
+ "original"
629
+ ],
630
+ "description": "pointmap: \"muted\" (default) desaturates the basemap so the data stands out; \"original\" keeps its colors."
631
+ },
632
+ "tileOpacity": {
633
+ "type": "number",
634
+ "minimum": 0,
635
+ "maximum": 1,
636
+ "description": "pointmap: basemap opacity."
637
+ },
638
+ "zoom": {
639
+ "type": "number",
640
+ "description": "pointmap: tile zoom level (automatic from the points by default)."
641
+ },
642
+ "center": {
643
+ "type": "array",
644
+ "items": {
645
+ "type": "number"
646
+ },
647
+ "minItems": 2,
648
+ "maxItems": 2,
649
+ "description": "pointmap: map center [lon, lat] (default: fitted to the points)."
650
+ },
651
+ "tall": {
652
+ "type": "boolean",
653
+ "description": "Map: false prevents the tall layout (map on the left, ranked label column on the right) for elongated territories."
654
+ },
655
+ "midpoint": {
656
+ "type": "number",
657
+ "description": "choropleth/heatmap: diverging color scale around this value (e.g. 0 for changes)."
658
+ },
659
+ "classes": {
660
+ "type": "integer",
661
+ "description": "choropleth: number of color classes (default 5)."
662
+ },
663
+ "scale": {
664
+ "description": "choropleth: \"quantile\" (default), \"equal\", \"continuous\", \"categorical\" (text values get one color each; automatic when `value` holds text) or a list of thresholds.",
665
+ "anyOf": [
666
+ {
667
+ "type": "string",
668
+ "enum": [
669
+ "quantile",
670
+ "equal",
671
+ "continuous",
672
+ "categorical"
673
+ ]
674
+ },
675
+ {
676
+ "type": "array",
677
+ "items": {
678
+ "type": "number"
679
+ }
680
+ }
681
+ ]
682
+ },
683
+ "nodes": {
684
+ "type": "array",
685
+ "items": {
686
+ "type": "object"
687
+ },
688
+ "description": "network: node rows (id, group, size). flowchart: steps (id, label, type: start|end|process|decision|data|note, lane)."
689
+ },
690
+ "edges": {
691
+ "type": "array",
692
+ "items": {
693
+ "type": "object"
694
+ },
695
+ "description": "flowchart: connections (from, to, label). Same as `data`."
696
+ },
697
+ "layout": {
698
+ "type": "string",
699
+ "enum": [
700
+ "force",
701
+ "circular",
702
+ "radial",
703
+ "concentric",
704
+ "clusters",
705
+ "tree",
706
+ "grid",
707
+ "circle"
708
+ ],
709
+ "description": "network layout: \"force\" (default) deterministic force-directed; \"circular\" around a circle by group with names rotated outward (\"circle\" = circular); \"radial\" tree rings from `focus` or the most connected node; \"concentric\" rings by weight; \"clusters\" one cluster per group; \"tree\" the radial tree laid flat; \"grid\" ordered by group."
710
+ },
711
+ "curveness": {
712
+ "type": "number",
713
+ "minimum": 0,
714
+ "description": "network: edge bend as a share of its length (default 0.3; 0 = straight)."
715
+ },
716
+ "maxRadius": {
717
+ "type": "number",
718
+ "description": "network/symbolmap/pointmap/bubble: largest node or circle radius in px."
719
+ },
720
+ "iterations": {
721
+ "type": "integer",
722
+ "description": "network: force-layout iterations (automatic by size)."
723
+ },
724
+ "nodeId": {
725
+ "type": "string",
726
+ "description": "network: id field in `nodes` (default id/name)."
727
+ },
728
+ "nodeLabel": {
729
+ "type": "string",
730
+ "description": "network: label field in `nodes` (default label, else the id)."
731
+ },
732
+ "labelOrientation": {
733
+ "type": "string",
734
+ "enum": [
735
+ "horizontal",
736
+ "radial"
737
+ ],
738
+ "description": "chord: label orientation (radial by default above 10 groups)."
739
+ },
740
+ "ribbonColor": {
741
+ "type": "string",
742
+ "enum": [
743
+ "source",
744
+ "smaller",
745
+ "larger"
746
+ ],
747
+ "description": "chord: ribbon color: \"source\" (default when directed), \"smaller\" group (default) or \"larger\" flow."
748
+ },
749
+ "matrix": {
750
+ "type": "array",
751
+ "items": {
752
+ "type": "array",
753
+ "items": {
754
+ "type": "number"
755
+ }
756
+ },
757
+ "description": "chord: square flow matrix (with `names`)."
758
+ },
759
+ "names": {
760
+ "type": "array",
761
+ "items": {
762
+ "type": "string"
763
+ },
764
+ "description": "chord: group names for `matrix`."
765
+ },
766
+ "directed": {
767
+ "type": "boolean",
768
+ "description": "chord: treat flows as directed (default false)."
769
+ },
770
+ "direction": {
771
+ "type": "string",
772
+ "enum": [
773
+ "TB",
774
+ "LR"
775
+ ],
776
+ "description": "flowchart: top-to-bottom or left-to-right (automatic by default)."
777
+ },
778
+ "age": {
779
+ "type": "string",
780
+ "description": "pyramid: age-group field."
781
+ },
782
+ "sex": {
783
+ "type": "string",
784
+ "description": "pyramid: field with exactly two sides (e.g. sex)."
785
+ },
786
+ "percent": {
787
+ "type": "boolean",
788
+ "description": "pyramid: show shares of the total population."
789
+ },
790
+ "facet": {
791
+ "type": "string",
792
+ "description": "One panel per value of this field (small multiples, seaborn col). Shared scales and colors."
793
+ },
794
+ "col": {
795
+ "type": "string",
796
+ "description": "Alias of facet (seaborn naming)."
797
+ },
798
+ "facetOrder": {
799
+ "type": "array",
800
+ "items": {
801
+ "type": "string"
802
+ },
803
+ "description": "facet: panel order (values of the facet field; the rest follow)."
804
+ },
805
+ "columns": {
806
+ "type": "integer",
807
+ "description": "facet: panels per row (seaborn col_wrap). Reduced automatically on narrow screens. kpi: tiles per row."
808
+ },
809
+ "sharex": {
810
+ "type": "boolean",
811
+ "description": "facet: same x scale in every panel (default true)."
812
+ },
813
+ "panelHeight": {
814
+ "type": "number",
815
+ "description": "facet: height of each panel in px."
816
+ },
817
+ "sharey": {
818
+ "type": "boolean",
819
+ "description": "facet: same y scale in every panel (default true)."
820
+ },
821
+ "time": {
822
+ "type": "string",
823
+ "description": "Time field (d3plus-style): shows one period at a time (the latest by default, or `timeValue`). Add `slider: true` only when the person asks to move through periods."
824
+ },
825
+ "timeValue": {
826
+ "description": "Period to show when `time` is set."
827
+ },
828
+ "slider": {
829
+ "description": "Browser time controls, OFF by default; set them only when the person asks. true: period buttons when there are few periods (≤ 8), a minimal slider otherwise; line/area get a range slider. \"buttons\" or \"slider\" force one.",
830
+ "anyOf": [
831
+ {
832
+ "type": "boolean"
833
+ },
834
+ {
835
+ "type": "string",
836
+ "enum": [
837
+ "buttons",
838
+ "slider"
839
+ ]
840
+ }
841
+ ]
842
+ },
843
+ "play": {
844
+ "type": "boolean",
845
+ "description": "Browser: false keeps the time controls but hides the play button."
846
+ },
847
+ "playInterval": {
848
+ "type": "number",
849
+ "description": "Browser: milliseconds per period while playing."
850
+ },
851
+ "legend": {
852
+ "description": "Legend: true/false, or its position \"top\" (default), \"bottom\", \"left\", \"right\" (left/right fall back to bottom under 520px wide), or { position }.",
853
+ "anyOf": [
854
+ {
855
+ "type": "boolean"
856
+ },
857
+ {
858
+ "type": "string",
859
+ "enum": [
860
+ "top",
861
+ "bottom",
862
+ "left",
863
+ "right"
864
+ ]
865
+ },
866
+ {
867
+ "type": "object",
868
+ "properties": {
869
+ "position": {
870
+ "type": "string",
871
+ "enum": [
872
+ "top",
873
+ "bottom",
874
+ "left",
875
+ "right"
876
+ ]
877
+ }
878
+ }
879
+ }
880
+ ]
881
+ },
882
+ "legendTitle": {
883
+ "type": "string",
884
+ "description": "Title of a color-ramp or size legend (heatmap, maps)."
885
+ },
886
+ "exclude": {
887
+ "description": "Drop legend entries (series, first hierarchy level, group or donut slice) and recompute axes and shares with the rest. Colors stay fixed; excluded entries remain in the legend, faded, so a click re-adds them. In the browser shift+click on a legend key toggles it.",
888
+ "anyOf": [
889
+ {
890
+ "type": "string"
891
+ },
892
+ {
893
+ "type": "array",
894
+ "items": {
895
+ "type": "string"
896
+ }
897
+ }
898
+ ]
899
+ },
900
+ "compare": {
901
+ "description": "With `time`: period to compute changes against: \"previous\" (default), \"first\", a specific period, or false.",
902
+ "anyOf": [
903
+ {
904
+ "type": "string"
905
+ },
906
+ {
907
+ "type": "number"
908
+ },
909
+ {
910
+ "type": "boolean"
911
+ }
912
+ ]
913
+ },
914
+ "colorBy": {
915
+ "type": "string",
916
+ "enum": [
917
+ "group",
918
+ "change",
919
+ "label"
920
+ ],
921
+ "description": "treemap: \"change\" colors tiles by % change vs the comparison period (diverging, growth cool / decline warm); \"label\" colors a single-level treemap by item."
922
+ },
923
+ "shade": {
924
+ "type": "boolean",
925
+ "description": "treemap/sunburst: subtle lightness steps inside each category (default false: one solid color per category)."
926
+ },
927
+ "xRange": {
928
+ "type": "array",
929
+ "description": "line/area: visible x range [from, to] (what the range slider sets with `slider: true`)."
930
+ },
931
+ "showValues": {
932
+ "type": "boolean",
933
+ "description": "treemap: show each tile value next to its label."
934
+ },
935
+ "hole": {
936
+ "type": "number",
937
+ "minimum": 0,
938
+ "maximum": 0.9,
939
+ "description": "sunburst: size of the center hole as a fraction of the radius (default 0.3)."
940
+ },
941
+ "focus": {
942
+ "description": "treemap/sunburst: path to drill into, e.g. [\"Mining\"] (in the browser a click on a tile or legend key zooms to it). network: a node id to center and highlight with its neighbors.",
943
+ "anyOf": [
944
+ {
945
+ "type": "string"
946
+ },
947
+ {
948
+ "type": "array",
949
+ "items": {
950
+ "type": "string"
951
+ }
952
+ }
953
+ ]
954
+ },
955
+ "depth": {
956
+ "type": "integer",
957
+ "description": "treemap/sunburst: how many levels to show."
958
+ },
959
+ "xScale": {
960
+ "type": "string",
961
+ "enum": [
962
+ "linear",
963
+ "log"
964
+ ]
965
+ },
966
+ "yScale": {
967
+ "type": "string",
968
+ "enum": [
969
+ "linear",
970
+ "log"
971
+ ]
972
+ },
973
+ "xDomain": {
974
+ "type": "array",
975
+ "items": {
976
+ "type": "number"
977
+ },
978
+ "description": "Fixed x domain [min, max]."
979
+ },
980
+ "yDomain": {
981
+ "type": "array",
982
+ "items": {
983
+ "type": "number"
984
+ },
985
+ "description": "Fixed value-axis domain [min, max]."
986
+ },
987
+ "valueDomain": {
988
+ "type": "array",
989
+ "items": {
990
+ "type": "number"
991
+ },
992
+ "minItems": 2,
993
+ "maxItems": 2,
994
+ "description": "box/violin/strip/swarm/point/radar: fixed value-axis domain [min, max] whatever the orientation."
995
+ },
996
+ "orient": {
997
+ "type": "string",
998
+ "enum": [
999
+ "v",
1000
+ "h"
1001
+ ],
1002
+ "description": "box/violin/strip/swarm/point: \"v\" vertical or \"h\" horizontal (same as `horizontal`)."
1003
+ },
1004
+ "zero": {
1005
+ "type": "boolean",
1006
+ "description": "line: force (or prevent) a y axis starting at zero."
1007
+ },
1008
+ "xLabel": {
1009
+ "type": "string",
1010
+ "description": "x-axis title."
1011
+ },
1012
+ "yLabel": {
1013
+ "type": "string",
1014
+ "description": "y-axis title (drawn horizontally above the axis)."
1015
+ },
1016
+ "format": {
1017
+ "description": "Value format: \"number\" | \"compact\" | \"percent\" | \"currency\" | \"integer\", or { type, prefix, suffix, decimals (0–20), currency }.",
1018
+ "anyOf": [
1019
+ {
1020
+ "type": "string",
1021
+ "enum": [
1022
+ "number",
1023
+ "compact",
1024
+ "percent",
1025
+ "currency",
1026
+ "integer"
1027
+ ]
1028
+ },
1029
+ {
1030
+ "type": "object",
1031
+ "properties": {
1032
+ "type": {
1033
+ "type": "string",
1034
+ "enum": [
1035
+ "number",
1036
+ "compact",
1037
+ "percent",
1038
+ "currency",
1039
+ "integer"
1040
+ ]
1041
+ },
1042
+ "prefix": {
1043
+ "type": "string"
1044
+ },
1045
+ "suffix": {
1046
+ "type": "string"
1047
+ },
1048
+ "decimals": {
1049
+ "type": "integer",
1050
+ "minimum": 0,
1051
+ "maximum": 20
1052
+ },
1053
+ "currency": {
1054
+ "type": "string"
1055
+ },
1056
+ "scale": {
1057
+ "type": "number"
1058
+ }
1059
+ }
1060
+ }
1061
+ ]
1062
+ },
1063
+ "xFormat": {
1064
+ "description": "Format of x values when x is a measure (scatter, regplot, hist).",
1065
+ "anyOf": [
1066
+ {
1067
+ "type": "string",
1068
+ "enum": [
1069
+ "number",
1070
+ "compact",
1071
+ "percent",
1072
+ "currency",
1073
+ "integer"
1074
+ ]
1075
+ },
1076
+ {
1077
+ "type": "object",
1078
+ "properties": {
1079
+ "type": {
1080
+ "type": "string",
1081
+ "enum": [
1082
+ "number",
1083
+ "compact",
1084
+ "percent",
1085
+ "currency",
1086
+ "integer"
1087
+ ]
1088
+ },
1089
+ "prefix": {
1090
+ "type": "string"
1091
+ },
1092
+ "suffix": {
1093
+ "type": "string"
1094
+ },
1095
+ "decimals": {
1096
+ "type": "integer",
1097
+ "minimum": 0,
1098
+ "maximum": 20
1099
+ },
1100
+ "currency": {
1101
+ "type": "string"
1102
+ },
1103
+ "scale": {
1104
+ "type": "number"
1105
+ }
1106
+ }
1107
+ }
1108
+ ]
1109
+ },
1110
+ "yFormat": {
1111
+ "description": "Format of y values (overrides `format` on the y axis).",
1112
+ "anyOf": [
1113
+ {
1114
+ "type": "string",
1115
+ "enum": [
1116
+ "number",
1117
+ "compact",
1118
+ "percent",
1119
+ "currency",
1120
+ "integer"
1121
+ ]
1122
+ },
1123
+ {
1124
+ "type": "object",
1125
+ "properties": {
1126
+ "type": {
1127
+ "type": "string",
1128
+ "enum": [
1129
+ "number",
1130
+ "compact",
1131
+ "percent",
1132
+ "currency",
1133
+ "integer"
1134
+ ]
1135
+ },
1136
+ "prefix": {
1137
+ "type": "string"
1138
+ },
1139
+ "suffix": {
1140
+ "type": "string"
1141
+ },
1142
+ "decimals": {
1143
+ "type": "integer",
1144
+ "minimum": 0,
1145
+ "maximum": 20
1146
+ },
1147
+ "currency": {
1148
+ "type": "string"
1149
+ },
1150
+ "scale": {
1151
+ "type": "number"
1152
+ }
1153
+ }
1154
+ }
1155
+ ]
1156
+ },
1157
+ "highlight": {
1158
+ "description": "Emphasize one or more categories/series and mute the rest.",
1159
+ "anyOf": [
1160
+ {
1161
+ "type": "string"
1162
+ },
1163
+ {
1164
+ "type": "array",
1165
+ "items": {
1166
+ "type": "string"
1167
+ }
1168
+ }
1169
+ ]
1170
+ },
1171
+ "dashed": {
1172
+ "description": "Draw some shapes dashed (hatched fill + dashed outline; dashed stroke for lines) to mark estimates, projections or provisional figures. A category/series/region name or a list of them, a data field whose truthy rows are dashed, { field, equals }, or true for all.",
1173
+ "anyOf": [
1174
+ {
1175
+ "type": "string"
1176
+ },
1177
+ {
1178
+ "type": "boolean"
1179
+ },
1180
+ {
1181
+ "type": "array",
1182
+ "items": {
1183
+ "type": "string"
1184
+ }
1185
+ },
1186
+ {
1187
+ "type": "object",
1188
+ "properties": {
1189
+ "field": {
1190
+ "type": "string"
1191
+ },
1192
+ "equals": {}
1193
+ }
1194
+ }
1195
+ ]
1196
+ },
1197
+ "dashedFrom": {
1198
+ "description": "line/area/bar on a time axis: x value from which marks are dashed (a projection). Lines turn dashed from the last firm point, over a soft labeled band.",
1199
+ "anyOf": [
1200
+ {
1201
+ "type": "string"
1202
+ },
1203
+ {
1204
+ "type": "number"
1205
+ }
1206
+ ]
1207
+ },
1208
+ "dashedLabel": {
1209
+ "description": "What the dashed shapes mean (\"Projection\", \"Preliminary\"): legend entry, band label and tooltip line. false hides the band label.",
1210
+ "anyOf": [
1211
+ {
1212
+ "type": "string"
1213
+ },
1214
+ {
1215
+ "type": "boolean"
1216
+ }
1217
+ ]
1218
+ },
1219
+ "labels": {
1220
+ "description": "Value labels: true, false or \"auto\". In scatter/regplot: a number of points or a list of names to label. network: true labels every node.",
1221
+ "anyOf": [
1222
+ {
1223
+ "type": "boolean"
1224
+ },
1225
+ {
1226
+ "type": "string"
1227
+ },
1228
+ {
1229
+ "type": "number"
1230
+ },
1231
+ {
1232
+ "type": "array",
1233
+ "items": {
1234
+ "type": "string"
1235
+ }
1236
+ }
1237
+ ]
1238
+ },
1239
+ "refLines": {
1240
+ "type": "array",
1241
+ "description": "Reference lines (targets, averages).",
1242
+ "items": {
1243
+ "type": "object",
1244
+ "properties": {
1245
+ "y": {
1246
+ "type": "number"
1247
+ },
1248
+ "x": {
1249
+ "type": "number"
1250
+ },
1251
+ "value": {
1252
+ "type": "number"
1253
+ },
1254
+ "label": {
1255
+ "type": "string"
1256
+ }
1257
+ }
1258
+ }
1259
+ },
1260
+ "annotations": {
1261
+ "type": "array",
1262
+ "description": "line/area: events on the x axis.",
1263
+ "items": {
1264
+ "type": "object",
1265
+ "properties": {
1266
+ "x": {},
1267
+ "label": {
1268
+ "type": "string"
1269
+ }
1270
+ }
1271
+ }
1272
+ },
1273
+ "stack": {
1274
+ "description": "bar/area: true stacks; \"percent\" stacks to 100%.",
1275
+ "anyOf": [
1276
+ {
1277
+ "type": "boolean"
1278
+ },
1279
+ {
1280
+ "type": "string",
1281
+ "enum": [
1282
+ "percent"
1283
+ ]
1284
+ }
1285
+ ]
1286
+ },
1287
+ "horizontal": {
1288
+ "type": "boolean",
1289
+ "description": "Force horizontal orientation (otherwise chosen from label length and count)."
1290
+ },
1291
+ "top": {
1292
+ "type": "integer",
1293
+ "description": "bar: keep the N largest and fold the rest into \"Other\"."
1294
+ },
1295
+ "endLabels": {
1296
+ "type": "boolean",
1297
+ "description": "line/regplot: false removes the series names at the end of each line (a legend is drawn instead)."
1298
+ },
1299
+ "labelsFor": {
1300
+ "type": "object",
1301
+ "additionalProperties": {
1302
+ "type": "string"
1303
+ },
1304
+ "description": "Wide table (y as a list): display names per column, e.g. { \"rev\": \"Revenue\" }."
1305
+ },
1306
+ "index": {
1307
+ "type": "boolean",
1308
+ "description": "line: rebase each series to 100 at its first value (compare growth without a dual axis)."
1309
+ },
1310
+ "curve": {
1311
+ "type": "string",
1312
+ "enum": [
1313
+ "linear",
1314
+ "smooth",
1315
+ "step"
1316
+ ]
1317
+ },
1318
+ "aggregate": {
1319
+ "type": "string",
1320
+ "enum": [
1321
+ "sum",
1322
+ "mean",
1323
+ "max",
1324
+ "min",
1325
+ "count",
1326
+ "last",
1327
+ "first"
1328
+ ],
1329
+ "description": "How to combine repeated rows. Default sum."
1330
+ },
1331
+ "ci": {
1332
+ "description": "line/bar/regplot: confidence interval (true = 95, or a number). In line/bar it switches the estimator to the mean.",
1333
+ "anyOf": [
1334
+ {
1335
+ "type": "boolean"
1336
+ },
1337
+ {
1338
+ "type": "number"
1339
+ }
1340
+ ]
1341
+ },
1342
+ "errorbar": {
1343
+ "type": "string",
1344
+ "enum": [
1345
+ "ci",
1346
+ "sd",
1347
+ "se",
1348
+ "pi",
1349
+ "none"
1350
+ ],
1351
+ "description": "Error bar or band type."
1352
+ },
1353
+ "estimator": {
1354
+ "type": "string",
1355
+ "enum": [
1356
+ "mean",
1357
+ "median",
1358
+ "sum",
1359
+ "count"
1360
+ ],
1361
+ "description": "How to summarize several observations per category."
1362
+ },
1363
+ "bins": {
1364
+ "type": "integer",
1365
+ "description": "hist: number of bins."
1366
+ },
1367
+ "binWidth": {
1368
+ "type": "number",
1369
+ "description": "hist: bin width."
1370
+ },
1371
+ "stat": {
1372
+ "type": "string",
1373
+ "enum": [
1374
+ "count",
1375
+ "percent",
1376
+ "density",
1377
+ "probability"
1378
+ ],
1379
+ "description": "hist: what the y axis measures."
1380
+ },
1381
+ "kde": {
1382
+ "type": "boolean",
1383
+ "description": "hist: overlay a density curve."
1384
+ },
1385
+ "multiple": {
1386
+ "type": "string",
1387
+ "enum": [
1388
+ "layer",
1389
+ "stack",
1390
+ "dodge",
1391
+ "fill"
1392
+ ],
1393
+ "description": "hist/kde with hue: how groups are combined."
1394
+ },
1395
+ "fill": {
1396
+ "type": "boolean",
1397
+ "description": "kde: fill the area. line: false removes the gradient under a single line."
1398
+ },
1399
+ "order": {
1400
+ "description": "regplot: polynomial degree (number). box/violin/strip/swarm/point: category order (list).",
1401
+ "anyOf": [
1402
+ {
1403
+ "type": "integer"
1404
+ },
1405
+ {
1406
+ "type": "array",
1407
+ "items": {
1408
+ "type": "string"
1409
+ }
1410
+ }
1411
+ ]
1412
+ },
1413
+ "lowess": {
1414
+ "type": "boolean",
1415
+ "description": "regplot: local regression instead of a straight line."
1416
+ },
1417
+ "logx": {
1418
+ "type": "boolean",
1419
+ "description": "regplot: fit y ~ log(x) with a log x axis."
1420
+ },
1421
+ "trend": {
1422
+ "type": "boolean",
1423
+ "description": "scatter: add a least-squares line and R²."
1424
+ },
1425
+ "annotate": {
1426
+ "type": "boolean",
1427
+ "description": "regplot: show R² and n."
1428
+ },
1429
+ "kind": {
1430
+ "type": "string",
1431
+ "enum": [
1432
+ "scatter",
1433
+ "reg"
1434
+ ],
1435
+ "description": "jointplot: center plot."
1436
+ },
1437
+ "marginal": {
1438
+ "type": "string",
1439
+ "enum": [
1440
+ "hist",
1441
+ "kde"
1442
+ ],
1443
+ "description": "jointplot: marginal plots."
1444
+ },
1445
+ "inner": {
1446
+ "type": "string",
1447
+ "enum": [
1448
+ "box",
1449
+ "quartiles",
1450
+ "points",
1451
+ "stick",
1452
+ "none"
1453
+ ],
1454
+ "description": "violin: what goes inside."
1455
+ },
1456
+ "bandwidth": {
1457
+ "type": "number",
1458
+ "description": "violin: KDE bandwidth (default Scott's rule)."
1459
+ },
1460
+ "bwAdjust": {
1461
+ "type": "number",
1462
+ "description": "kde/violin/hist kde: multiply the bandwidth (seaborn bw_adjust)."
1463
+ },
1464
+ "cut": {
1465
+ "type": "number",
1466
+ "description": "kde/violin: how far the density extends past the data, in bandwidths."
1467
+ },
1468
+ "jitter": {
1469
+ "description": "strip: spread of the points across the category (fraction of the band, default 0.6; 0 or false = none).",
1470
+ "anyOf": [
1471
+ {
1472
+ "type": "number"
1473
+ },
1474
+ {
1475
+ "type": "boolean"
1476
+ }
1477
+ ]
1478
+ },
1479
+ "dodge": {
1480
+ "type": "boolean",
1481
+ "description": "strip/swarm/point with hue: place groups side by side."
1482
+ },
1483
+ "hueOrder": {
1484
+ "type": "array",
1485
+ "items": {
1486
+ "type": "string"
1487
+ },
1488
+ "description": "Order of the hue groups."
1489
+ },
1490
+ "showMeans": {
1491
+ "type": "boolean",
1492
+ "description": "box/strip: mark the mean."
1493
+ },
1494
+ "cumulative": {
1495
+ "type": "boolean",
1496
+ "description": "hist/kde: cumulative distribution."
1497
+ },
1498
+ "rug": {
1499
+ "type": "boolean",
1500
+ "description": "kde: tick marks for each observation."
1501
+ },
1502
+ "complementary": {
1503
+ "type": "boolean",
1504
+ "description": "ecdf: show 1 − F(x) (share above each value)."
1505
+ },
1506
+ "radius": {
1507
+ "type": "number",
1508
+ "description": "Point radius in px (scatter, regplot, strip, swarm)."
1509
+ },
1510
+ "split": {
1511
+ "type": "boolean",
1512
+ "description": "violin: with two hue levels, one half each."
1513
+ },
1514
+ "points": {
1515
+ "type": "boolean",
1516
+ "description": "box: overlay the observations. line: markers on every point."
1517
+ },
1518
+ "normalize": {
1519
+ "type": "boolean",
1520
+ "description": "radar: scale each axis 0–1 by its own maximum."
1521
+ },
1522
+ "half": {
1523
+ "type": "boolean",
1524
+ "description": "donut: semicircle."
1525
+ },
1526
+ "thickness": {
1527
+ "type": "number",
1528
+ "minimum": 0,
1529
+ "maximum": 1,
1530
+ "description": "donut: ring thickness as a fraction of the radius (1 = pie)."
1531
+ },
1532
+ "maxSlices": {
1533
+ "type": "integer",
1534
+ "minimum": 2,
1535
+ "description": "donut/pie: slices before the rest fold into \"Other\" (default 6)."
1536
+ },
1537
+ "centerValue": {
1538
+ "type": "string",
1539
+ "description": "donut/sunburst: text in the center (default: the total)."
1540
+ },
1541
+ "centerLabel": {
1542
+ "type": "string",
1543
+ "description": "donut/sunburst: caption under the center value."
1544
+ },
1545
+ "cellHeight": {
1546
+ "type": "number",
1547
+ "description": "heatmap: maximum cell height in px."
1548
+ },
1549
+ "diverging": {
1550
+ "type": "boolean",
1551
+ "description": "heatmap/choropleth: diverging color scale around 0 (or `midpoint`)."
1552
+ },
1553
+ "colors": {
1554
+ "type": "object",
1555
+ "additionalProperties": {
1556
+ "type": "string"
1557
+ },
1558
+ "description": "Pin colors to entities: { \"Biobío\": \"#3A47B8\" }."
1559
+ },
1560
+ "palette": {
1561
+ "description": "Categorical colors: a name (\"cdia\", \"okabe-ito\", \"tableau10\", \"udec\"), a matplotlib qualitative palette (\"tab10\", \"tab20\", \"Set1\", \"Set2\", \"Set3\", \"Pastel1\", \"Pastel2\", \"Paired\", \"Accent\", \"Dark2\"), any colormap name (sampled, e.g. \"viridis\"), or a list of colors in fixed order.",
1562
+ "anyOf": [
1563
+ {
1564
+ "type": "string"
1565
+ },
1566
+ {
1567
+ "type": "array",
1568
+ "items": {
1569
+ "type": "string"
1570
+ }
1571
+ }
1572
+ ]
1573
+ },
1574
+ "ramp": {
1575
+ "description": "Sequential ramp: a name (\"indigo\", \"magenta\", \"teal\", \"amber\"), any colormap name, or a list of colors from light to dark.",
1576
+ "anyOf": [
1577
+ {
1578
+ "type": "string"
1579
+ },
1580
+ {
1581
+ "type": "array",
1582
+ "items": {
1583
+ "type": "string"
1584
+ }
1585
+ }
1586
+ ]
1587
+ },
1588
+ "colorScale": {
1589
+ "description": "Continuous color scale (heatmap, choropleth, treemap change, pointmap values): any matplotlib colormap name, case-insensitive, `_r` reverses (\"viridis\", \"plasma\", \"inferno\", \"magma\", \"cividis\", \"Blues\", \"Greens\", \"YlOrRd\", \"RdBu\", \"coolwarm\", \"Spectral\", \"turbo\", \"twilight\"…); diverging names imply a diverging scale. Or a list of hex colors, or { name | colors, reverse, mid }. Aliases: cmap, colormap. Qualitative palettes (tab10…) go in `palette`; avoid rainbow maps (jet, hsv).",
1590
+ "anyOf": [
1591
+ {
1592
+ "type": "string"
1593
+ },
1594
+ {
1595
+ "type": "array",
1596
+ "items": {
1597
+ "type": "string"
1598
+ },
1599
+ "minItems": 2
1600
+ },
1601
+ {
1602
+ "type": "object",
1603
+ "properties": {
1604
+ "name": {
1605
+ "type": "string"
1606
+ },
1607
+ "colors": {
1608
+ "type": "array",
1609
+ "items": {
1610
+ "type": "string"
1611
+ }
1612
+ },
1613
+ "reverse": {
1614
+ "type": "boolean"
1615
+ },
1616
+ "mid": {
1617
+ "type": "number",
1618
+ "description": "Center of a diverging scale."
1619
+ }
1620
+ }
1621
+ }
1622
+ ]
1623
+ },
1624
+ "cmap": {
1625
+ "description": "Alias of colorScale (matplotlib naming).",
1626
+ "anyOf": [
1627
+ {
1628
+ "type": "string"
1629
+ },
1630
+ {
1631
+ "type": "array",
1632
+ "items": {
1633
+ "type": "string"
1634
+ },
1635
+ "minItems": 2
1636
+ },
1637
+ {
1638
+ "type": "object",
1639
+ "properties": {
1640
+ "name": {
1641
+ "type": "string"
1642
+ },
1643
+ "colors": {
1644
+ "type": "array",
1645
+ "items": {
1646
+ "type": "string"
1647
+ }
1648
+ },
1649
+ "reverse": {
1650
+ "type": "boolean"
1651
+ },
1652
+ "mid": {
1653
+ "type": "number",
1654
+ "description": "Center of a diverging scale."
1655
+ }
1656
+ }
1657
+ }
1658
+ ]
1659
+ },
1660
+ "colormap": {
1661
+ "description": "Alias of colorScale.",
1662
+ "anyOf": [
1663
+ {
1664
+ "type": "string"
1665
+ },
1666
+ {
1667
+ "type": "array",
1668
+ "items": {
1669
+ "type": "string"
1670
+ },
1671
+ "minItems": 2
1672
+ },
1673
+ {
1674
+ "type": "object",
1675
+ "properties": {
1676
+ "name": {
1677
+ "type": "string"
1678
+ },
1679
+ "colors": {
1680
+ "type": "array",
1681
+ "items": {
1682
+ "type": "string"
1683
+ }
1684
+ },
1685
+ "reverse": {
1686
+ "type": "boolean"
1687
+ },
1688
+ "mid": {
1689
+ "type": "number",
1690
+ "description": "Center of a diverging scale."
1691
+ }
1692
+ }
1693
+ }
1694
+ ]
1695
+ },
1696
+ "theme": {
1697
+ "description": "Theme: \"papel\" (light, default), \"noche\" (dark), a name registered with registerTheme(), or a JSON object deep-merged over `extends`. Simple tokens: background (alias of surface), text (alias of ink), accent (first series color), grid (a color or { color, dash, width }), axis, tooltip { bg, ink }, radius / barRadius (corner radius), font. Full keys: surface, ink, lede, muted, tint, dim, other, categorical (list, palette or colormap name), sequential, diverging, status {good, warning, critical}, font {family, mono, import}, type {title, subtitle, label, axis, legend, source, titleWeight}, marks {barRadius, barMax, lineWidth, pointRadius, gap, ring, areaOpacity, bandOpacity, dotOpacity}, axes {inside, grid}, layout {padding}. configure({ theme }) applies it to every chart.",
1698
+ "anyOf": [
1699
+ {
1700
+ "type": "string",
1701
+ "description": "\"papel\", \"noche\", \"light\", \"dark\" or a registered theme name."
1702
+ },
1703
+ {
1704
+ "type": "object",
1705
+ "properties": {
1706
+ "extends": {
1707
+ "type": "string"
1708
+ },
1709
+ "mode": {
1710
+ "type": "string",
1711
+ "enum": [
1712
+ "light",
1713
+ "dark"
1714
+ ]
1715
+ },
1716
+ "background": {
1717
+ "type": "string"
1718
+ },
1719
+ "surface": {
1720
+ "type": "string"
1721
+ },
1722
+ "text": {
1723
+ "type": "string"
1724
+ },
1725
+ "ink": {
1726
+ "type": "string"
1727
+ },
1728
+ "lede": {
1729
+ "type": "string"
1730
+ },
1731
+ "muted": {
1732
+ "type": "string"
1733
+ },
1734
+ "accent": {
1735
+ "type": "string"
1736
+ },
1737
+ "grid": {
1738
+ "anyOf": [
1739
+ {
1740
+ "type": "string"
1741
+ },
1742
+ {
1743
+ "type": "object",
1744
+ "properties": {
1745
+ "color": {
1746
+ "type": "string"
1747
+ },
1748
+ "dash": {
1749
+ "type": "string"
1750
+ },
1751
+ "width": {
1752
+ "type": "number"
1753
+ }
1754
+ }
1755
+ }
1756
+ ]
1757
+ },
1758
+ "axis": {
1759
+ "type": "string"
1760
+ },
1761
+ "tooltip": {
1762
+ "type": "object",
1763
+ "properties": {
1764
+ "bg": {
1765
+ "type": "string"
1766
+ },
1767
+ "ink": {
1768
+ "type": "string"
1769
+ }
1770
+ }
1771
+ },
1772
+ "radius": {
1773
+ "type": "number"
1774
+ },
1775
+ "barRadius": {
1776
+ "type": "number"
1777
+ },
1778
+ "categorical": {
1779
+ "anyOf": [
1780
+ {
1781
+ "type": "string"
1782
+ },
1783
+ {
1784
+ "type": "array",
1785
+ "items": {
1786
+ "type": "string"
1787
+ }
1788
+ }
1789
+ ]
1790
+ },
1791
+ "sequential": {
1792
+ "anyOf": [
1793
+ {
1794
+ "type": "string"
1795
+ },
1796
+ {
1797
+ "type": "array",
1798
+ "items": {
1799
+ "type": "string"
1800
+ }
1801
+ }
1802
+ ]
1803
+ },
1804
+ "diverging": {
1805
+ "anyOf": [
1806
+ {
1807
+ "type": "string"
1808
+ },
1809
+ {
1810
+ "type": "array",
1811
+ "items": {
1812
+ "type": "string"
1813
+ }
1814
+ }
1815
+ ]
1816
+ },
1817
+ "font": {
1818
+ "anyOf": [
1819
+ {
1820
+ "type": "string"
1821
+ },
1822
+ {
1823
+ "type": "object"
1824
+ }
1825
+ ]
1826
+ },
1827
+ "status": {
1828
+ "type": "object"
1829
+ },
1830
+ "type": {
1831
+ "type": "object"
1832
+ },
1833
+ "marks": {
1834
+ "type": "object"
1835
+ },
1836
+ "axes": {
1837
+ "type": "object"
1838
+ },
1839
+ "layout": {
1840
+ "type": "object"
1841
+ }
1842
+ }
1843
+ }
1844
+ ]
1845
+ },
1846
+ "font": {
1847
+ "description": "Typeface for the whole chart: a Google Fonts name (\"Poppins\"), a CSS stack (\"'Inter', sans-serif\") or { family, import }. configure({ font }) sets it for every chart.",
1848
+ "anyOf": [
1849
+ {
1850
+ "type": "string"
1851
+ },
1852
+ {
1853
+ "type": "object"
1854
+ }
1855
+ ]
1856
+ },
1857
+ "textScale": {
1858
+ "type": "number",
1859
+ "description": "Multiplies every text size (1.5, 2…); the layout is recomputed so nothing overlaps. Aliases: fontScale, labelScale. configure({ textScale }) sets it for every chart."
1860
+ },
1861
+ "width": {
1862
+ "type": "number",
1863
+ "description": "Width in px (default 720; render() uses the container width)."
1864
+ },
1865
+ "height": {
1866
+ "type": "number",
1867
+ "description": "Height in px. Automatic for horizontal bars, heatmaps, KPI tiles, and narrow treemaps, sunbursts and radars."
1868
+ },
1869
+ "padding": {
1870
+ "type": "number",
1871
+ "description": "Outer padding in px (default from the width)."
1872
+ }
1873
+ }
1874
+ }