Skip to content

Commit 95b73e0

Browse files
committed
docs: document defaults
1 parent d6ce354 commit 95b73e0

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/lib/types.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,10 @@ export type PlotDefaults = {
438438
*/
439439
numberFormat: Intl.NumberFormatOptions;
440440
markerDotRadius: number;
441+
/**
442+
* fallback color to be used for null/NA
443+
*/
444+
unknown: string;
441445
css: (d: string) => string | undefined;
442446
};
443447

src/routes/features/defaults/+page.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ If you're using SveltePlot in a SvelteKit project, you can even set the defaults
2929
| _inset_ | Plot inset | px | `0` |
3030
| _colorScheme_ | Default scheme for color scale | string | `'turbo'` |
3131
| _categoricalColorScheme_ | Default scheme for [categorical color scales](/features/color-scales#Categorical-colors) | string | `'observable10'` |
32+
| _unknown_ | Fallback color to be used when mapping NAs to colors s | string | `'#cccccc'` |
3233
| _tickSize_ | Axis tick line length | px | `6` |
3334
| _tickPadding_ | Distance between tick line and label | px | `3` |
3435
| _tickFontSize_ | Tick label font size | px | `11` |
@@ -39,6 +40,7 @@ If you're using SveltePlot in a SvelteKit project, you can even set the defaults
3940
| _graticuleStep_ | Default step size in graticules | degrees | `10` |
4041
| _locale_ | Default locale used in axis ticks etc. | string | `'en-US'` |
4142
| _numberFormat_ | Default [number format options](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options) in axis ticks | object | |
43+
| _css_ | For passing an `@emotion/css` instance to your plots | | |
4244

4345
<style>
4446
* :global(td) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy