plotagents 0.0.0-stage → 0.5.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 (60) hide show
  1. package/AGENTS.md +78 -0
  2. package/LICENSE +21 -0
  3. package/README.md +205 -2
  4. package/bin/plotagents.js +49 -0
  5. package/dist/plotagents-geo.js +79 -0
  6. package/dist/plotagents.js +7954 -0
  7. package/docs/api.md +154 -0
  8. package/docs/charts.md +218 -0
  9. package/docs/getting-started.md +138 -0
  10. package/docs/rendering.md +47 -0
  11. package/docs/themes.md +86 -0
  12. package/index.d.ts +213 -0
  13. package/package.json +74 -4
  14. package/schema.json +895 -0
  15. package/src/axes.js +144 -0
  16. package/src/charts/bar.js +339 -0
  17. package/src/charts/categorical.js +471 -0
  18. package/src/charts/chord.js +218 -0
  19. package/src/charts/choropleth.js +559 -0
  20. package/src/charts/dist.js +513 -0
  21. package/src/charts/donut.js +232 -0
  22. package/src/charts/flowchart.js +407 -0
  23. package/src/charts/heatmap.js +76 -0
  24. package/src/charts/kpi.js +97 -0
  25. package/src/charts/line.js +419 -0
  26. package/src/charts/network.js +344 -0
  27. package/src/charts/pyramid.js +177 -0
  28. package/src/charts/radar.js +152 -0
  29. package/src/charts/regplot.js +364 -0
  30. package/src/charts/sankey.js +133 -0
  31. package/src/charts/scatter.js +136 -0
  32. package/src/charts/sunburst.js +135 -0
  33. package/src/charts/treemap.js +194 -0
  34. package/src/context.js +10 -0
  35. package/src/dashed.js +90 -0
  36. package/src/data.js +137 -0
  37. package/src/facet.js +84 -0
  38. package/src/format.js +171 -0
  39. package/src/frame.js +157 -0
  40. package/src/geo/chile.js +7 -0
  41. package/src/geo/data/chile-regiones.js +12 -0
  42. package/src/geo/data/usa-estados.js +12 -0
  43. package/src/geo/data/world.js +12 -0
  44. package/src/geo/projection.js +152 -0
  45. package/src/geo/registry.js +31 -0
  46. package/src/geo/usa.js +8 -0
  47. package/src/geo/world.js +7 -0
  48. package/src/hierarchy.js +139 -0
  49. package/src/index.js +271 -0
  50. package/src/infer.js +49 -0
  51. package/src/interact.js +362 -0
  52. package/src/lint.js +137 -0
  53. package/src/palette.js +59 -0
  54. package/src/runtime.js +304 -0
  55. package/src/scale.js +171 -0
  56. package/src/schema.js +181 -0
  57. package/src/stats.js +246 -0
  58. package/src/svg.js +85 -0
  59. package/src/text.js +61 -0
  60. package/src/theme.js +224 -0
package/schema.json ADDED
@@ -0,0 +1,895 @@
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.",
6
+ "type": "object",
7
+ "required": [
8
+ "data"
9
+ ],
10
+ "properties": {
11
+ "type": {
12
+ "type": "string",
13
+ "enum": [
14
+ "auto",
15
+ "bar",
16
+ "column",
17
+ "count",
18
+ "line",
19
+ "area",
20
+ "scatter",
21
+ "bubble",
22
+ "treemap",
23
+ "sunburst",
24
+ "donut",
25
+ "pie",
26
+ "heatmap",
27
+ "sankey",
28
+ "kpi",
29
+ "hist",
30
+ "kde",
31
+ "ecdf",
32
+ "regplot",
33
+ "residplot",
34
+ "jointplot",
35
+ "box",
36
+ "violin",
37
+ "strip",
38
+ "swarm",
39
+ "point",
40
+ "radar",
41
+ "network",
42
+ "chord",
43
+ "pyramid",
44
+ "flowchart",
45
+ "choropleth",
46
+ "symbolmap",
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
+ "graph",
71
+ "force",
72
+ "red",
73
+ "chord-diagram",
74
+ "cuerdas",
75
+ "populationpyramid",
76
+ "population",
77
+ "piramide",
78
+ "pirámide",
79
+ "flow",
80
+ "diagram",
81
+ "process",
82
+ "diagrama",
83
+ "map",
84
+ "mapa",
85
+ "choroplethmap",
86
+ "symbol",
87
+ "bubblemap",
88
+ "mapa-simbolos",
89
+ "tree",
90
+ "stat",
91
+ "stats",
92
+ "number",
93
+ "heat"
94
+ ],
95
+ "description": "Compare: bar, count. Time: line, area. 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. seaborn names are accepted (barplot, countplot, histplot, kdeplot, boxplot, violinplot, lmplot…). \"auto\" (default) picks from the data."
96
+ },
97
+ "data": {
98
+ "description": "Array of rows, e.g. [{ \"region\": \"Biobío\", \"sales\": 1240 }]. For kpi it can be omitted in favor of `items`.",
99
+ "anyOf": [
100
+ {
101
+ "type": "array",
102
+ "items": {
103
+ "type": "object"
104
+ }
105
+ },
106
+ {
107
+ "type": "object"
108
+ }
109
+ ]
110
+ },
111
+ "title": {
112
+ "type": "string",
113
+ "description": "The finding as a full sentence, ideally with the key number, e.g. \"Biobío accounts for 32% of sales\"."
114
+ },
115
+ "subtitle": {
116
+ "type": "string",
117
+ "description": "How to read the chart: measure, unit and period, e.g. \"Sales by region, CLP millions, 2025\"."
118
+ },
119
+ "source": {
120
+ "type": "string",
121
+ "description": "Data source, shown at the bottom right."
122
+ },
123
+ "locale": {
124
+ "type": "string",
125
+ "enum": [
126
+ "es",
127
+ "en"
128
+ ],
129
+ "description": "Language and number format. Default \"es\" (1.234,5); use \"en\" for 1,234.5."
130
+ },
131
+ "x": {
132
+ "type": "string",
133
+ "description": "x-axis or category field (bar, line, area, scatter, heatmap, box, violin…)."
134
+ },
135
+ "y": {
136
+ "anyOf": [
137
+ {
138
+ "type": "string"
139
+ },
140
+ {
141
+ "type": "array",
142
+ "items": {
143
+ "type": "string"
144
+ }
145
+ }
146
+ ],
147
+ "description": "Value field. For line/bar a list of fields (wide table) turns each one into a series."
148
+ },
149
+ "series": {
150
+ "type": "string",
151
+ "description": "Field that splits the data into colored series. Alias: hue."
152
+ },
153
+ "hue": {
154
+ "type": "string",
155
+ "description": "Alias of series (seaborn naming)."
156
+ },
157
+ "value": {
158
+ "type": "string",
159
+ "description": "Value field for treemap, sunburst, donut, heatmap, sankey and radar."
160
+ },
161
+ "label": {
162
+ "type": "string",
163
+ "description": "Name field (treemap, donut, point labels in scatter/regplot)."
164
+ },
165
+ "group": {
166
+ "type": "string",
167
+ "description": "Level-1 group field for a two-level treemap (shortcut for path)."
168
+ },
169
+ "path": {
170
+ "type": "array",
171
+ "items": {
172
+ "type": "string"
173
+ },
174
+ "description": "Hierarchy for treemap/sunburst, any depth: [level1, level2, …]."
175
+ },
176
+ "size": {
177
+ "type": "string",
178
+ "description": "Bubble size field (area-proportional)."
179
+ },
180
+ "from": {
181
+ "type": "string",
182
+ "description": "Sankey source field."
183
+ },
184
+ "to": {
185
+ "type": "string",
186
+ "description": "Sankey target field."
187
+ },
188
+ "axis": {
189
+ "type": "string",
190
+ "description": "radar: field with the axis names (long format)."
191
+ },
192
+ "axes": {
193
+ "type": "array",
194
+ "items": {
195
+ "type": "string"
196
+ },
197
+ "description": "radar: fields to use as axes (wide format, one row per series)."
198
+ },
199
+ "items": {
200
+ "type": "array",
201
+ "description": "kpi: the indicators to show.",
202
+ "items": {
203
+ "type": "object",
204
+ "required": [
205
+ "label",
206
+ "value"
207
+ ],
208
+ "properties": {
209
+ "label": {
210
+ "type": "string"
211
+ },
212
+ "value": {
213
+ "type": "number"
214
+ },
215
+ "delta": {
216
+ "type": "number",
217
+ "description": "Relative change as a fraction (0.12 = +12%)."
218
+ },
219
+ "previous": {
220
+ "type": "number",
221
+ "description": "Previous value; when given, the change is computed."
222
+ },
223
+ "period": {
224
+ "type": "string",
225
+ "description": "What it is compared against, e.g. \"vs 2025\"."
226
+ },
227
+ "good": {
228
+ "type": "string",
229
+ "enum": [
230
+ "up",
231
+ "down"
232
+ ],
233
+ "description": "Whether going up is good (up) or bad (down, e.g. costs)."
234
+ },
235
+ "trend": {
236
+ "type": "array",
237
+ "items": {
238
+ "type": "number"
239
+ },
240
+ "description": "Short series for the sparkline."
241
+ },
242
+ "target": {
243
+ "type": "number",
244
+ "description": "Target: draws a progress meter."
245
+ },
246
+ "format": {
247
+ "type": "string"
248
+ }
249
+ }
250
+ }
251
+ },
252
+ "geo": {
253
+ "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 a GeoJSON FeatureCollection.",
254
+ "anyOf": [
255
+ {
256
+ "type": "string"
257
+ },
258
+ {
259
+ "type": "object"
260
+ }
261
+ ]
262
+ },
263
+ "key": {
264
+ "type": "string",
265
+ "description": "choropleth/symbolmap: data field with the region, state or country name/code to match (US: \"TX\", \"Texas\", \"06\")."
266
+ },
267
+ "projection": {
268
+ "type": "string",
269
+ "enum": [
270
+ "mercator",
271
+ "equalEarth",
272
+ "albersUsa"
273
+ ],
274
+ "description": "choropleth/symbolmap: map projection (picked automatically)."
275
+ },
276
+ "values": {
277
+ "type": "boolean",
278
+ "description": "choropleth with state codes (usa): false shows only the codes, without values."
279
+ },
280
+ "featureKey": {
281
+ "type": "string",
282
+ "description": "choropleth: feature property to match against (default tries code, id, ISO-3, name and aliases)."
283
+ },
284
+ "midpoint": {
285
+ "type": "number",
286
+ "description": "choropleth/heatmap: diverging color scale around this value (e.g. 0 for changes)."
287
+ },
288
+ "classes": {
289
+ "type": "integer",
290
+ "description": "choropleth: number of color classes (default 5)."
291
+ },
292
+ "nodes": {
293
+ "type": "array",
294
+ "items": {
295
+ "type": "object"
296
+ },
297
+ "description": "network: node rows (id, group, size). flowchart: steps (id, label, type: start|end|process|decision|data|note, lane)."
298
+ },
299
+ "edges": {
300
+ "type": "array",
301
+ "items": {
302
+ "type": "object"
303
+ },
304
+ "description": "flowchart: connections (from, to, label). Same as `data`."
305
+ },
306
+ "layout": {
307
+ "type": "string",
308
+ "enum": [
309
+ "force",
310
+ "circle"
311
+ ],
312
+ "description": "network layout."
313
+ },
314
+ "matrix": {
315
+ "type": "array",
316
+ "items": {
317
+ "type": "array",
318
+ "items": {
319
+ "type": "number"
320
+ }
321
+ },
322
+ "description": "chord: square flow matrix (with `names`)."
323
+ },
324
+ "names": {
325
+ "type": "array",
326
+ "items": {
327
+ "type": "string"
328
+ },
329
+ "description": "chord: group names for `matrix`."
330
+ },
331
+ "directed": {
332
+ "type": "boolean",
333
+ "description": "chord: treat flows as directed (default false)."
334
+ },
335
+ "direction": {
336
+ "type": "string",
337
+ "enum": [
338
+ "TB",
339
+ "LR"
340
+ ],
341
+ "description": "flowchart: top-to-bottom or left-to-right (automatic by default)."
342
+ },
343
+ "age": {
344
+ "type": "string",
345
+ "description": "pyramid: age-group field."
346
+ },
347
+ "sex": {
348
+ "type": "string",
349
+ "description": "pyramid: field with exactly two sides (e.g. sex)."
350
+ },
351
+ "percent": {
352
+ "type": "boolean",
353
+ "description": "pyramid: show shares of the total population."
354
+ },
355
+ "facet": {
356
+ "type": "string",
357
+ "description": "One panel per value of this field (small multiples, seaborn col). Shared scales and colors."
358
+ },
359
+ "columns": {
360
+ "type": "integer",
361
+ "description": "facet: panels per row (seaborn col_wrap). Reduced automatically on narrow screens."
362
+ },
363
+ "sharey": {
364
+ "type": "boolean",
365
+ "description": "facet: same y scale in every panel (default true)."
366
+ },
367
+ "time": {
368
+ "type": "string",
369
+ "description": "Time field (d3plus-style): shows one period at a time (the latest by default) and, in the browser, a slider with play. Not used by line/area, which get a range slider."
370
+ },
371
+ "timeValue": {
372
+ "description": "Period to show when `time` is set."
373
+ },
374
+ "slider": {
375
+ "type": "boolean",
376
+ "description": "Browser: false removes the time slider (the chart shows `timeValue` or the latest period)."
377
+ },
378
+ "play": {
379
+ "type": "boolean",
380
+ "description": "Browser: false keeps the time slider but hides the play button."
381
+ },
382
+ "compare": {
383
+ "description": "With `time`: period to compute changes against: \"previous\" (default), \"first\", a specific period, or false.",
384
+ "anyOf": [
385
+ {
386
+ "type": "string"
387
+ },
388
+ {
389
+ "type": "number"
390
+ },
391
+ {
392
+ "type": "boolean"
393
+ }
394
+ ]
395
+ },
396
+ "colorBy": {
397
+ "type": "string",
398
+ "enum": [
399
+ "group",
400
+ "change",
401
+ "label"
402
+ ],
403
+ "description": "treemap: \"change\" colors tiles by % change vs the comparison period (diverging, growth cool / decline warm); \"label\" colors a single-level treemap by item."
404
+ },
405
+ "shade": {
406
+ "type": "boolean",
407
+ "description": "treemap/sunburst: subtle lightness steps inside each category (default false: one solid color per category)."
408
+ },
409
+ "xRange": {
410
+ "type": "array",
411
+ "description": "line/area: visible x range [from, to] (what the range slider sets)."
412
+ },
413
+ "focus": {
414
+ "description": "treemap/sunburst: path to drill into, e.g. [\"Mining\"]. network: a node id to center and highlight with its neighbors. In the browser, clicking does it.",
415
+ "anyOf": [
416
+ {
417
+ "type": "string"
418
+ },
419
+ {
420
+ "type": "array",
421
+ "items": {
422
+ "type": "string"
423
+ }
424
+ }
425
+ ]
426
+ },
427
+ "depth": {
428
+ "type": "integer",
429
+ "description": "treemap/sunburst: how many levels to show."
430
+ },
431
+ "xScale": {
432
+ "type": "string",
433
+ "enum": [
434
+ "linear",
435
+ "log"
436
+ ]
437
+ },
438
+ "yScale": {
439
+ "type": "string",
440
+ "enum": [
441
+ "linear",
442
+ "log"
443
+ ]
444
+ },
445
+ "xDomain": {
446
+ "type": "array",
447
+ "items": {
448
+ "type": "number"
449
+ },
450
+ "description": "Fixed x domain [min, max]."
451
+ },
452
+ "yDomain": {
453
+ "type": "array",
454
+ "items": {
455
+ "type": "number"
456
+ },
457
+ "description": "Fixed value-axis domain [min, max]."
458
+ },
459
+ "zero": {
460
+ "type": "boolean",
461
+ "description": "line: force (or prevent) a y axis starting at zero."
462
+ },
463
+ "xLabel": {
464
+ "type": "string",
465
+ "description": "x-axis title."
466
+ },
467
+ "yLabel": {
468
+ "type": "string",
469
+ "description": "y-axis title (drawn horizontally above the axis)."
470
+ },
471
+ "format": {
472
+ "description": "Value format: \"number\" | \"compact\" | \"percent\" | \"currency\" | \"integer\", or { type, prefix, suffix, decimals, currency }.",
473
+ "anyOf": [
474
+ {
475
+ "type": "string",
476
+ "enum": [
477
+ "number",
478
+ "compact",
479
+ "percent",
480
+ "currency",
481
+ "integer"
482
+ ]
483
+ },
484
+ {
485
+ "type": "object",
486
+ "properties": {
487
+ "type": {
488
+ "type": "string"
489
+ },
490
+ "prefix": {
491
+ "type": "string"
492
+ },
493
+ "suffix": {
494
+ "type": "string"
495
+ },
496
+ "decimals": {
497
+ "type": "integer"
498
+ },
499
+ "currency": {
500
+ "type": "string"
501
+ }
502
+ }
503
+ }
504
+ ]
505
+ },
506
+ "highlight": {
507
+ "description": "Emphasize one or more categories/series and mute the rest.",
508
+ "anyOf": [
509
+ {
510
+ "type": "string"
511
+ },
512
+ {
513
+ "type": "array",
514
+ "items": {
515
+ "type": "string"
516
+ }
517
+ }
518
+ ]
519
+ },
520
+ "dashed": {
521
+ "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.",
522
+ "anyOf": [
523
+ {
524
+ "type": "string"
525
+ },
526
+ {
527
+ "type": "boolean"
528
+ },
529
+ {
530
+ "type": "array",
531
+ "items": {
532
+ "type": "string"
533
+ }
534
+ },
535
+ {
536
+ "type": "object",
537
+ "properties": {
538
+ "field": {
539
+ "type": "string"
540
+ },
541
+ "equals": {}
542
+ }
543
+ }
544
+ ]
545
+ },
546
+ "dashedFrom": {
547
+ "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.",
548
+ "anyOf": [
549
+ {
550
+ "type": "string"
551
+ },
552
+ {
553
+ "type": "number"
554
+ }
555
+ ]
556
+ },
557
+ "dashedLabel": {
558
+ "description": "What the dashed shapes mean (\"Projection\", \"Preliminary\"): legend entry, band label and tooltip line. false hides the band label.",
559
+ "anyOf": [
560
+ {
561
+ "type": "string"
562
+ },
563
+ {
564
+ "type": "boolean"
565
+ }
566
+ ]
567
+ },
568
+ "labels": {
569
+ "description": "Value labels: true, false or \"auto\". In scatter/regplot: a number of points or a list of names to label.",
570
+ "anyOf": [
571
+ {
572
+ "type": "boolean"
573
+ },
574
+ {
575
+ "type": "string"
576
+ },
577
+ {
578
+ "type": "number"
579
+ },
580
+ {
581
+ "type": "array",
582
+ "items": {
583
+ "type": "string"
584
+ }
585
+ }
586
+ ]
587
+ },
588
+ "refLines": {
589
+ "type": "array",
590
+ "description": "Reference lines (targets, averages).",
591
+ "items": {
592
+ "type": "object",
593
+ "properties": {
594
+ "y": {
595
+ "type": "number"
596
+ },
597
+ "x": {
598
+ "type": "number"
599
+ },
600
+ "value": {
601
+ "type": "number"
602
+ },
603
+ "label": {
604
+ "type": "string"
605
+ }
606
+ }
607
+ }
608
+ },
609
+ "annotations": {
610
+ "type": "array",
611
+ "description": "line/area: events on the x axis.",
612
+ "items": {
613
+ "type": "object",
614
+ "properties": {
615
+ "x": {},
616
+ "label": {
617
+ "type": "string"
618
+ }
619
+ }
620
+ }
621
+ },
622
+ "stack": {
623
+ "description": "bar/area: true stacks; \"percent\" stacks to 100%.",
624
+ "anyOf": [
625
+ {
626
+ "type": "boolean"
627
+ },
628
+ {
629
+ "type": "string",
630
+ "enum": [
631
+ "percent"
632
+ ]
633
+ }
634
+ ]
635
+ },
636
+ "horizontal": {
637
+ "type": "boolean",
638
+ "description": "Force horizontal orientation (otherwise chosen from label length and count)."
639
+ },
640
+ "sort": {
641
+ "type": "string",
642
+ "enum": [
643
+ "desc",
644
+ "asc",
645
+ "none",
646
+ "alpha"
647
+ ],
648
+ "description": "bar: category order (desc by default unless the categories are time)."
649
+ },
650
+ "top": {
651
+ "type": "integer",
652
+ "description": "bar: keep the N largest and fold the rest into \"Other\"."
653
+ },
654
+ "index": {
655
+ "type": "boolean",
656
+ "description": "line: rebase each series to 100 at its first value (compare growth without a dual axis)."
657
+ },
658
+ "curve": {
659
+ "type": "string",
660
+ "enum": [
661
+ "linear",
662
+ "smooth",
663
+ "step"
664
+ ]
665
+ },
666
+ "aggregate": {
667
+ "type": "string",
668
+ "enum": [
669
+ "sum",
670
+ "mean",
671
+ "max",
672
+ "min",
673
+ "count",
674
+ "last",
675
+ "first"
676
+ ],
677
+ "description": "How to combine repeated rows. Default sum."
678
+ },
679
+ "ci": {
680
+ "description": "line/bar/regplot: confidence interval (true = 95, or a number). In line/bar it switches the estimator to the mean.",
681
+ "anyOf": [
682
+ {
683
+ "type": "boolean"
684
+ },
685
+ {
686
+ "type": "number"
687
+ }
688
+ ]
689
+ },
690
+ "errorbar": {
691
+ "type": "string",
692
+ "enum": [
693
+ "ci",
694
+ "sd",
695
+ "se",
696
+ "pi",
697
+ "none"
698
+ ],
699
+ "description": "Error bar or band type."
700
+ },
701
+ "estimator": {
702
+ "type": "string",
703
+ "enum": [
704
+ "mean",
705
+ "median",
706
+ "sum",
707
+ "count"
708
+ ],
709
+ "description": "How to summarize several observations per category."
710
+ },
711
+ "bins": {
712
+ "type": "integer",
713
+ "description": "hist: number of bins."
714
+ },
715
+ "binWidth": {
716
+ "type": "number",
717
+ "description": "hist: bin width."
718
+ },
719
+ "stat": {
720
+ "type": "string",
721
+ "enum": [
722
+ "count",
723
+ "percent",
724
+ "density",
725
+ "probability"
726
+ ],
727
+ "description": "hist: what the y axis measures."
728
+ },
729
+ "kde": {
730
+ "type": "boolean",
731
+ "description": "hist: overlay a density curve."
732
+ },
733
+ "multiple": {
734
+ "type": "string",
735
+ "enum": [
736
+ "layer",
737
+ "stack",
738
+ "dodge",
739
+ "fill"
740
+ ],
741
+ "description": "hist/kde with hue: how groups are combined."
742
+ },
743
+ "fill": {
744
+ "type": "boolean",
745
+ "description": "kde: fill the area. line: false removes the gradient under a single line."
746
+ },
747
+ "order": {
748
+ "description": "regplot: polynomial degree (number). box/violin/strip/swarm/point: category order (list).",
749
+ "anyOf": [
750
+ {
751
+ "type": "integer"
752
+ },
753
+ {
754
+ "type": "array",
755
+ "items": {
756
+ "type": "string"
757
+ }
758
+ }
759
+ ]
760
+ },
761
+ "lowess": {
762
+ "type": "boolean",
763
+ "description": "regplot: local regression instead of a straight line."
764
+ },
765
+ "logx": {
766
+ "type": "boolean",
767
+ "description": "regplot: fit y ~ log(x) with a log x axis."
768
+ },
769
+ "trend": {
770
+ "type": "boolean",
771
+ "description": "scatter: add a least-squares line and R²."
772
+ },
773
+ "annotate": {
774
+ "type": "boolean",
775
+ "description": "regplot: show R² and n."
776
+ },
777
+ "kind": {
778
+ "type": "string",
779
+ "enum": [
780
+ "scatter",
781
+ "reg"
782
+ ],
783
+ "description": "jointplot: center plot."
784
+ },
785
+ "marginal": {
786
+ "type": "string",
787
+ "enum": [
788
+ "hist",
789
+ "kde"
790
+ ],
791
+ "description": "jointplot: marginal plots."
792
+ },
793
+ "inner": {
794
+ "type": "string",
795
+ "enum": [
796
+ "box",
797
+ "quartiles",
798
+ "points",
799
+ "none"
800
+ ],
801
+ "description": "violin: what goes inside."
802
+ },
803
+ "split": {
804
+ "type": "boolean",
805
+ "description": "violin: with two hue levels, one half each."
806
+ },
807
+ "points": {
808
+ "type": "boolean",
809
+ "description": "box: overlay the observations. line: markers on every point."
810
+ },
811
+ "normalize": {
812
+ "type": "boolean",
813
+ "description": "radar: scale each axis 0–1 by its own maximum."
814
+ },
815
+ "half": {
816
+ "type": "boolean",
817
+ "description": "donut: semicircle."
818
+ },
819
+ "colors": {
820
+ "type": "object",
821
+ "additionalProperties": {
822
+ "type": "string"
823
+ },
824
+ "description": "Pin colors to entities: { \"Biobío\": \"#3A47B8\" }."
825
+ },
826
+ "palette": {
827
+ "description": "Palette shortcut: a name (\"cdia\", \"okabe-ito\", \"tableau10\", \"udec\") or a list of colors in fixed order.",
828
+ "anyOf": [
829
+ {
830
+ "type": "string"
831
+ },
832
+ {
833
+ "type": "array",
834
+ "items": {
835
+ "type": "string"
836
+ }
837
+ }
838
+ ]
839
+ },
840
+ "ramp": {
841
+ "description": "Sequential ramp: a name (\"indigo\", \"magenta\", \"teal\", \"amber\") or a list of colors from light to dark.",
842
+ "anyOf": [
843
+ {
844
+ "type": "string"
845
+ },
846
+ {
847
+ "type": "array",
848
+ "items": {
849
+ "type": "string"
850
+ }
851
+ }
852
+ ]
853
+ },
854
+ "theme": {
855
+ "description": "Theme: \"papel\" (light, default), \"noche\" (dark), or a JSON object deep-merged over `extends`. Keys: surface, ink, lede, muted, grid, axis, tint, dim, other, categorical (list or palette 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}.",
856
+ "anyOf": [
857
+ {
858
+ "type": "string",
859
+ "enum": [
860
+ "papel",
861
+ "noche",
862
+ "light",
863
+ "dark"
864
+ ]
865
+ },
866
+ {
867
+ "type": "object"
868
+ }
869
+ ]
870
+ },
871
+ "font": {
872
+ "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.",
873
+ "anyOf": [
874
+ {
875
+ "type": "string"
876
+ },
877
+ {
878
+ "type": "object"
879
+ }
880
+ ]
881
+ },
882
+ "textScale": {
883
+ "type": "number",
884
+ "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."
885
+ },
886
+ "width": {
887
+ "type": "number",
888
+ "description": "Width in px (default 720; render() uses the container width)."
889
+ },
890
+ "height": {
891
+ "type": "number",
892
+ "description": "Height in px. Automatic for horizontal bars, heatmaps, KPI tiles, and narrow treemaps, sunbursts and radars."
893
+ }
894
+ }
895
+ }