@opendata-ai/openchart-core 8.0.0-rc.17 → 8.0.0-rc.19
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/dist/index.d.ts +29 -1
- package/dist/index.js.map +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
- package/schema/chart.schema.json +167 -32
- package/schema/vizspec.schema.json +311 -64
package/dist/index.d.ts
CHANGED
|
@@ -432,6 +432,29 @@ declare function isGradientDef(value: unknown): value is GradientDef;
|
|
|
432
432
|
* overlays that need a flat color.
|
|
433
433
|
*/
|
|
434
434
|
declare function getRepresentativeColor(fill: string | GradientDef): string;
|
|
435
|
+
/**
|
|
436
|
+
* Configuration for the scatter regression trend line. Passed as the object
|
|
437
|
+
* form of `MarkDef.trendline`.
|
|
438
|
+
*/
|
|
439
|
+
interface TrendlineConfig {
|
|
440
|
+
/**
|
|
441
|
+
* Stacking order relative to the point marks. `'below'` (default) draws the
|
|
442
|
+
* line behind the dots; `'above'` draws it on top so it stays visible over a
|
|
443
|
+
* dense cloud.
|
|
444
|
+
*/
|
|
445
|
+
layer?: 'above' | 'below';
|
|
446
|
+
/**
|
|
447
|
+
* Stroke color. Defaults to the theme's high-contrast text color so the line
|
|
448
|
+
* reads on both light and dark grounds. Set an explicit CSS color to override.
|
|
449
|
+
*/
|
|
450
|
+
stroke?: string;
|
|
451
|
+
/**
|
|
452
|
+
* Stroke width in pixels. Defaults to 1.5. Over a dense cloud with `layer:
|
|
453
|
+
* 'above'`, a heavier line (e.g. 2.5) stays legible where the thin default
|
|
454
|
+
* disappears into the dots.
|
|
455
|
+
*/
|
|
456
|
+
strokeWidth?: number;
|
|
457
|
+
}
|
|
435
458
|
/**
|
|
436
459
|
* Mark definition object with visual properties.
|
|
437
460
|
*
|
|
@@ -501,8 +524,13 @@ interface MarkDef {
|
|
|
501
524
|
* suppress it when the chart already carries its own reference line (e.g. a
|
|
502
525
|
* manual x=y diagonal in a separate layer), which would otherwise produce
|
|
503
526
|
* two competing diagonals.
|
|
527
|
+
*
|
|
528
|
+
* Pass an object to control stacking order: the line renders `below` the
|
|
529
|
+
* points by default, but a dense scatter (thousands of overlapping dots)
|
|
530
|
+
* fully occludes a line drawn underneath, so `{ layer: 'above' }` lifts the
|
|
531
|
+
* reference line over the cloud.
|
|
504
532
|
*/
|
|
505
|
-
trendline?: boolean;
|
|
533
|
+
trendline?: boolean | TrendlineConfig;
|
|
506
534
|
/**
|
|
507
535
|
* Horizontal pixel offset from the data anchor. Only meaningful when `type`
|
|
508
536
|
* is `'text'`. Use it to lift a label clear of the mark it annotates instead
|