@cfasim-ui/charts 0.4.14 → 0.4.16
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/BarChart/BarChart.d.ts +54 -5
- package/dist/DataTable/DataTable.d.ts +18 -2
- package/dist/LineChart/LineChart.d.ts +11 -15
- package/dist/_shared/chartProps.d.ts +42 -0
- package/dist/_shared/index.d.ts +1 -1
- package/dist/_shared/useChartFoundation.d.ts +3 -0
- package/dist/_shared/useChartMenu.d.ts +4 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +856 -668
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NumberFormat } from '@cfasim-ui/shared';
|
|
2
|
-
import { ChartData, DateFormat, ChartCommonProps, ChartHoverPayload, ChartTooltipBaseProps } from '../_shared/index.js';
|
|
2
|
+
import { ChartData, DateFormat, ChartCommonProps, ChartHoverPayload, ChartTooltipBaseProps, BlendMode, LineMarkStyle } from '../_shared/index.js';
|
|
3
3
|
export type BarChartData = ChartData;
|
|
4
4
|
export interface BarSeries {
|
|
5
5
|
/** Bar values; one entry per category. `y` is accepted as an alias. */
|
|
@@ -7,6 +7,12 @@ export interface BarSeries {
|
|
|
7
7
|
data?: BarChartData;
|
|
8
8
|
color?: string;
|
|
9
9
|
opacity?: number;
|
|
10
|
+
/**
|
|
11
|
+
* CSS `mix-blend-mode` applied to each bar in this series. Lets
|
|
12
|
+
* overlapping bars (e.g. `layout="overlay"`) combine their colors
|
|
13
|
+
* instead of one obscuring the other.
|
|
14
|
+
*/
|
|
15
|
+
blendMode?: BlendMode;
|
|
10
16
|
/** Label shown in the inline legend. */
|
|
11
17
|
legend?: string;
|
|
12
18
|
/**
|
|
@@ -20,6 +26,37 @@ export interface BarSeries {
|
|
|
20
26
|
*/
|
|
21
27
|
showInTooltip?: boolean;
|
|
22
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* A line overlay drawn on top of the bars — e.g. a KDE over a histogram,
|
|
31
|
+
* a rolling mean, or any other summary curve. Each line scales to its
|
|
32
|
+
* own value extent (independent of the bars), so a probability-density
|
|
33
|
+
* curve in `[0, 0.02]` and a count histogram in `[0, 500]` can coexist.
|
|
34
|
+
*
|
|
35
|
+
* Sample the curve densely on the input side — `summaryLines` connects
|
|
36
|
+
* points with straight segments (matching matplotlib / seaborn `kde=True`).
|
|
37
|
+
*
|
|
38
|
+
* Shares visual styling (`color`, `strokeWidth`, `dashed`, `opacity`,
|
|
39
|
+
* `blendMode`, `dots`, `dotRadius`, `legend`, `showInLegend`) with
|
|
40
|
+
* `LineChart`'s `Series` via `LineMarkStyle`.
|
|
41
|
+
*/
|
|
42
|
+
export interface BarSummaryLine extends LineMarkStyle {
|
|
43
|
+
/** Y values along the line. */
|
|
44
|
+
data: BarChartData;
|
|
45
|
+
/**
|
|
46
|
+
* X positions in category-index space (0 = first category center,
|
|
47
|
+
* `categories.length - 1` = last). Fractional values land between
|
|
48
|
+
* category centers. When omitted, points plot at successive category
|
|
49
|
+
* centers — one point per `data` entry.
|
|
50
|
+
*/
|
|
51
|
+
x?: BarChartData;
|
|
52
|
+
/**
|
|
53
|
+
* Override the line's value-axis floor. When unset, defaults to the
|
|
54
|
+
* line's own min (clamped to 0 when all data is non-negative).
|
|
55
|
+
*/
|
|
56
|
+
valueMin?: number;
|
|
57
|
+
/** Override the line's value-axis ceiling. Defaults to the line's own max. */
|
|
58
|
+
valueMax?: number;
|
|
59
|
+
}
|
|
23
60
|
interface BarChartProps extends ChartCommonProps {
|
|
24
61
|
/** Single-series values. Equivalent to `y`. */
|
|
25
62
|
data?: BarChartData;
|
|
@@ -27,6 +64,12 @@ interface BarChartProps extends ChartCommonProps {
|
|
|
27
64
|
y?: BarChartData;
|
|
28
65
|
/** Multi-series mode. Each series has its own values. */
|
|
29
66
|
series?: BarSeries[];
|
|
67
|
+
/**
|
|
68
|
+
* Line overlays drawn on top of the bars (e.g. a KDE, a rolling mean,
|
|
69
|
+
* or any summary curve). Each line scales to its own value extent —
|
|
70
|
+
* unrelated to the bar value axis. See `BarSummaryLine`.
|
|
71
|
+
*/
|
|
72
|
+
summaryLines?: BarSummaryLine[];
|
|
30
73
|
/**
|
|
31
74
|
* Category labels for the categorical axis. Length should match the
|
|
32
75
|
* longest series. When omitted, indices (0, 1, 2, ...) are used.
|
|
@@ -37,8 +80,14 @@ interface BarChartProps extends ChartCommonProps {
|
|
|
37
80
|
categories?: readonly (string | Date)[];
|
|
38
81
|
/** "vertical" (default, aka column) draws upright bars; "horizontal" draws sideways. */
|
|
39
82
|
orientation?: "vertical" | "horizontal";
|
|
40
|
-
/**
|
|
41
|
-
|
|
83
|
+
/**
|
|
84
|
+
* "grouped" (default) places series side-by-side; "stacked" stacks
|
|
85
|
+
* them; "overlay" draws each series at full group width from the
|
|
86
|
+
* shared baseline, painting later series on top of earlier ones.
|
|
87
|
+
* In overlay mode set `opacity` per series, or order series so the
|
|
88
|
+
* tallest renders first, so bars behind remain visible.
|
|
89
|
+
*/
|
|
90
|
+
layout?: "grouped" | "stacked" | "overlay";
|
|
42
91
|
/** Force the value axis to start at this value or lower (default 0). */
|
|
43
92
|
valueMin?: number;
|
|
44
93
|
/**
|
|
@@ -111,9 +160,9 @@ declare const __VLS_component: import('vue').DefineComponent<BarChartProps, {},
|
|
|
111
160
|
}>, {
|
|
112
161
|
menu: boolean | string;
|
|
113
162
|
tooltipClamp: "none" | "chart" | "window";
|
|
114
|
-
orientation: "vertical" | "horizontal";
|
|
115
|
-
layout: "grouped" | "stacked";
|
|
116
163
|
valueMin: number;
|
|
164
|
+
orientation: "vertical" | "horizontal";
|
|
165
|
+
layout: "grouped" | "stacked" | "overlay";
|
|
117
166
|
valueScaleType: "linear" | "log";
|
|
118
167
|
barPadding: number;
|
|
119
168
|
groupGap: number;
|
|
@@ -34,15 +34,31 @@ type __VLS_Props = {
|
|
|
34
34
|
/** Filename (without extension) for downloaded CSV files. */
|
|
35
35
|
filename?: string;
|
|
36
36
|
/**
|
|
37
|
-
* Label for the Download item in the table's top-right menu
|
|
38
|
-
* Defaults to
|
|
37
|
+
* Label for the Download item in the table's top-right menu, and for
|
|
38
|
+
* the button rendered when `downloadButton` is true. Defaults to
|
|
39
|
+
* "Download".
|
|
39
40
|
*/
|
|
40
41
|
downloadMenuLink?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Render a visible "Download" button beneath the table instead of
|
|
44
|
+
* exposing the action only via the top-right menu. When enabled, the
|
|
45
|
+
* menu's Download item is suppressed to avoid duplicate controls.
|
|
46
|
+
*/
|
|
47
|
+
downloadButton?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Render a plain text link beneath the table for downloading CSV.
|
|
50
|
+
* Pass `true` for the default "Download data (CSV)" label, or a
|
|
51
|
+
* string to customize. When set, the menu's Download item is
|
|
52
|
+
* suppressed. Mutually exclusive with `downloadButton`; if both are
|
|
53
|
+
* set, `downloadButton` wins.
|
|
54
|
+
*/
|
|
55
|
+
downloadLink?: boolean | string;
|
|
41
56
|
/** Stretch the table to fill its container's width. */
|
|
42
57
|
fullWidth?: boolean;
|
|
43
58
|
};
|
|
44
59
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
45
60
|
menu: boolean | string;
|
|
61
|
+
downloadButton: boolean;
|
|
46
62
|
downloadMenuLink: string;
|
|
47
63
|
fullWidth: boolean;
|
|
48
64
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NumberFormat } from '@cfasim-ui/shared';
|
|
2
|
-
import { ChartData, LabelStyle, DateFormat, DateTimezone, ChartCommonProps, ChartHoverPayload, ChartTooltipBaseProps } from '../_shared/index.js';
|
|
2
|
+
import { ChartData, LabelStyle, DateFormat, DateTimezone, ChartCommonProps, ChartHoverPayload, ChartTooltipBaseProps, LineMarkStyle } from '../_shared/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* Numeric input accepted by the chart. `number[]` and any standard numeric
|
|
5
5
|
* typed array are supported, so the output of
|
|
@@ -13,7 +13,13 @@ export type LineChartData = ChartData;
|
|
|
13
13
|
* element parses. See the `timezone` prop and `dateAxis` module.
|
|
14
14
|
*/
|
|
15
15
|
export type LineChartXInput = LineChartData | readonly (string | Date)[];
|
|
16
|
-
|
|
16
|
+
/**
|
|
17
|
+
* A single line/dot series. Inherits visual styling
|
|
18
|
+
* (`color`, `strokeWidth`, `dashed`, `opacity`, `blendMode`, `dots`,
|
|
19
|
+
* `dotRadius`, `legend`, `showInLegend`) from `LineMarkStyle`, shared
|
|
20
|
+
* with `BarChart`'s `BarSummaryLine`.
|
|
21
|
+
*/
|
|
22
|
+
export interface Series extends LineMarkStyle {
|
|
17
23
|
/**
|
|
18
24
|
* Y-values. One of `y` or `data` must be supplied; `y` wins if both
|
|
19
25
|
* are set.
|
|
@@ -28,12 +34,11 @@ export interface Series {
|
|
|
28
34
|
* date strings or `Date` objects to enable date-axis mode.
|
|
29
35
|
*/
|
|
30
36
|
x?: LineChartXInput;
|
|
31
|
-
|
|
32
|
-
dashed?: boolean;
|
|
33
|
-
strokeWidth?: number;
|
|
34
|
-
opacity?: number;
|
|
37
|
+
/** Overrides `opacity` for the line stroke only. */
|
|
35
38
|
lineOpacity?: number;
|
|
39
|
+
/** Overrides `opacity` for the dots only. */
|
|
36
40
|
dotOpacity?: number;
|
|
41
|
+
/** Draw the line. Default true. */
|
|
37
42
|
line?: boolean;
|
|
38
43
|
/**
|
|
39
44
|
* Draw a page-colored stroke behind the line so it stays visually
|
|
@@ -41,17 +46,8 @@ export interface Series {
|
|
|
41
46
|
* effect when `line` is `false`.
|
|
42
47
|
*/
|
|
43
48
|
outline?: boolean;
|
|
44
|
-
dots?: boolean;
|
|
45
|
-
dotRadius?: number;
|
|
46
49
|
dotFill?: string;
|
|
47
50
|
dotStroke?: string;
|
|
48
|
-
/** Label shown in the inline legend */
|
|
49
|
-
legend?: string;
|
|
50
|
-
/**
|
|
51
|
-
* Whether this series appears in the inline legend. Defaults to true.
|
|
52
|
-
* Has no effect when `legend` is unset (no legend entry to begin with).
|
|
53
|
-
*/
|
|
54
|
-
showInLegend?: boolean;
|
|
55
51
|
/**
|
|
56
52
|
* Whether this series contributes a value to the tooltip and shows a
|
|
57
53
|
* hover dot. Defaults to true. The series line/dots are still drawn.
|
|
@@ -26,6 +26,41 @@ export interface LabelStyle {
|
|
|
26
26
|
color?: string;
|
|
27
27
|
fontWeight?: number | string;
|
|
28
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* CSS `mix-blend-mode` values usable on chart series. Drives how a
|
|
31
|
+
* series' pixels combine with what's painted behind them. Useful for
|
|
32
|
+
* overlapping series (e.g. `"multiply"` darkens light fills where bars
|
|
33
|
+
* overlap; `"screen"` lightens dark fills).
|
|
34
|
+
*/
|
|
35
|
+
export type BlendMode = "normal" | "multiply" | "screen" | "overlay" | "darken" | "lighten" | "color-dodge" | "color-burn" | "hard-light" | "soft-light" | "difference" | "exclusion" | "hue" | "saturation" | "color" | "luminosity";
|
|
36
|
+
/**
|
|
37
|
+
* Visual styling shared by anything drawn as "a stroked line with
|
|
38
|
+
* optional dots" — used by `LineChart`'s `Series` and `BarChart`'s
|
|
39
|
+
* `BarSummaryLine`. Chart-specific data (y/x arrays, scaling overrides,
|
|
40
|
+
* tooltip/outline behavior) lives on the extending type.
|
|
41
|
+
*/
|
|
42
|
+
export interface LineMarkStyle {
|
|
43
|
+
color?: string;
|
|
44
|
+
strokeWidth?: number;
|
|
45
|
+
dashed?: boolean;
|
|
46
|
+
opacity?: number;
|
|
47
|
+
/**
|
|
48
|
+
* CSS `mix-blend-mode` applied to the line and dots. Lets overlapping
|
|
49
|
+
* marks combine their colors instead of one obscuring the other.
|
|
50
|
+
*/
|
|
51
|
+
blendMode?: BlendMode;
|
|
52
|
+
/** Draw a dot at each sample point. Default false. */
|
|
53
|
+
dots?: boolean;
|
|
54
|
+
/** Radius of each dot in pixels. */
|
|
55
|
+
dotRadius?: number;
|
|
56
|
+
/** Label shown in the inline legend. */
|
|
57
|
+
legend?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Whether this mark appears in the inline legend. Defaults to true.
|
|
60
|
+
* Has no effect when `legend` is unset.
|
|
61
|
+
*/
|
|
62
|
+
showInLegend?: boolean;
|
|
63
|
+
}
|
|
29
64
|
/**
|
|
30
65
|
* Props common to every cartesian chart component. Anything specific to
|
|
31
66
|
* the chart type (series shape, layout, value-axis details) lives on the
|
|
@@ -79,6 +114,13 @@ export interface ChartCommonProps {
|
|
|
79
114
|
* for the default label or a string to customize.
|
|
80
115
|
*/
|
|
81
116
|
downloadLink?: boolean | string;
|
|
117
|
+
/**
|
|
118
|
+
* Show a `<button>` below the chart to download CSV. Pass `true` for
|
|
119
|
+
* the default label or a string to customize. When set, the CSV menu
|
|
120
|
+
* item is suppressed. Mutually exclusive with `downloadLink`; if both
|
|
121
|
+
* are set, `downloadButton` wins.
|
|
122
|
+
*/
|
|
123
|
+
downloadButton?: boolean | string;
|
|
82
124
|
/** Annotations rendered as the top layer of the chart. */
|
|
83
125
|
annotations?: readonly ChartAnnotation[];
|
|
84
126
|
/**
|
package/dist/_shared/index.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ export { seriesToCsv, categoricalToCsv, type CsvSeries } from './seriesCsv.js';
|
|
|
10
10
|
export { default as ChartAnnotations } from './ChartAnnotations';
|
|
11
11
|
export type { ChartAnnotation } from './annotations.js';
|
|
12
12
|
export { useChartFoundation, makeTooltipValueFormatter, type ChartFoundationOptions, } from './useChartFoundation.js';
|
|
13
|
-
export type { ChartCommonProps, ChartHoverPayload, ChartTooltipValue, ChartTooltipBaseProps, TitleStyle, LabelStyle, } from './chartProps.js';
|
|
13
|
+
export type { ChartCommonProps, ChartHoverPayload, ChartTooltipValue, ChartTooltipBaseProps, TitleStyle, LabelStyle, BlendMode, LineMarkStyle, } from './chartProps.js';
|
|
14
14
|
export { parseDate, isDateLike, isAllDates, pickDateTicks, formatDate, DATE_FORMAT_PRESETS, type DateFormat, type DateFormatPreset, type DateTickUnit, type DateTimezone, } from './dateAxis.js';
|
|
@@ -15,6 +15,7 @@ export interface ChartFoundationOptions {
|
|
|
15
15
|
tooltipClamp: () => TooltipClamp | undefined;
|
|
16
16
|
filename: () => string | undefined;
|
|
17
17
|
downloadLink: () => boolean | string | undefined;
|
|
18
|
+
downloadButton: () => boolean | string | undefined;
|
|
18
19
|
chartPadding: () => ChartPadding | undefined;
|
|
19
20
|
/**
|
|
20
21
|
* Labels for the inline legend in render order. Empty array = no
|
|
@@ -90,6 +91,8 @@ export declare function useChartFoundation(opts: ChartFoundationOptions): {
|
|
|
90
91
|
menuItems: import('vue').ComputedRef<import('../ChartMenu/ChartMenu').ChartMenuItem[]>;
|
|
91
92
|
downloadLinkText: import('vue').ComputedRef<string | null>;
|
|
92
93
|
csvHref: import('vue').ComputedRef<string | null>;
|
|
94
|
+
downloadButtonText: import('vue').ComputedRef<string | null>;
|
|
95
|
+
triggerCsvDownload: () => void;
|
|
93
96
|
menuFilename: () => string;
|
|
94
97
|
isFullscreen: import('vue').Ref<boolean, boolean>;
|
|
95
98
|
measuredHeight: import('vue').Ref<number, number>;
|
|
@@ -8,6 +8,8 @@ export interface ChartMenuOptions {
|
|
|
8
8
|
getCsv: () => string;
|
|
9
9
|
/** Whether a separate download link is rendered (and the CSV menu item should be hidden). */
|
|
10
10
|
downloadLink: () => boolean | string | undefined;
|
|
11
|
+
/** Whether a separate download button is rendered (and the CSV menu item should be hidden). */
|
|
12
|
+
downloadButton?: () => boolean | string | undefined;
|
|
11
13
|
/**
|
|
12
14
|
* When true, prepends an Expand/Collapse menu item that toggles the
|
|
13
15
|
* chart into a full-window view. The consumer is responsible for
|
|
@@ -25,6 +27,8 @@ export declare function useChartMenu(opts: ChartMenuOptions): {
|
|
|
25
27
|
items: import('vue').ComputedRef<ChartMenuItem[]>;
|
|
26
28
|
downloadLinkText: import('vue').ComputedRef<string | null>;
|
|
27
29
|
csvHref: import('vue').ComputedRef<string | null>;
|
|
30
|
+
downloadButtonText: import('vue').ComputedRef<string | null>;
|
|
31
|
+
triggerCsvDownload: () => void;
|
|
28
32
|
resolvedFilename: () => string;
|
|
29
33
|
isFullscreen: Ref<boolean, boolean>;
|
|
30
34
|
};
|
package/dist/index.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.line-chart-wrapper:hover .chart-menu-button,.bar-chart-wrapper:hover .chart-menu-button,.choropleth-wrapper:hover .chart-menu-button,.line-chart-wrapper:focus-within .chart-menu-button,.bar-chart-wrapper:focus-within .chart-menu-button,.choropleth-wrapper:focus-within .chart-menu-button,.line-chart-wrapper.is-fullscreen .chart-menu-button,.bar-chart-wrapper.is-fullscreen .chart-menu-button,.choropleth-wrapper.is-fullscreen .chart-menu-button{opacity:1}.line-chart-wrapper.is-fullscreen,.bar-chart-wrapper.is-fullscreen,.choropleth-wrapper.is-fullscreen{z-index:var(--cfasim-z-fullscreen,1000);background:var(--color-bg-0,#fff);color:var(--color-text,inherit);box-sizing:border-box;flex-direction:column;justify-content:center;padding:2em;display:flex;position:fixed;inset:0}.choropleth-wrapper.is-fullscreen svg{flex:auto;width:100%;height:100%;min-height:0}.chart-sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.chart-menu-trigger-area[data-v-c74e2889]{z-index:1;position:absolute;top:0;right:0}.chart-menu-button[data-v-c74e2889]{border:1px solid var(--color-border);background:var(--color-bg-0,#fff);width:28px;height:28px;color:var(--color-text-secondary);cursor:pointer;opacity:0;border-radius:.25em;justify-content:center;align-items:center;transition:opacity .15s;display:flex}.chart-menu-button[data-state=open][data-v-c74e2889]{opacity:1}.chart-menu-button[data-v-c74e2889]:hover{background:var(--color-bg-1,#0000000d);color:var(--color-text)}.chart-menu-content{z-index:100;background:var(--color-bg-0);border:1px solid var(--color-border);border-radius:.25em;min-width:140px;padding:.25em;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}.chart-menu-item{font-size:var(--font-size-sm);cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap;border-radius:.25em;outline:none;align-items:center;padding:.375em .5em;display:flex}.chart-menu-item[data-highlighted]{background:var(--color-primary);color:#fff}.line-chart-wrapper[data-v-
|
|
1
|
+
.line-chart-wrapper:hover .chart-menu-button,.bar-chart-wrapper:hover .chart-menu-button,.choropleth-wrapper:hover .chart-menu-button,.line-chart-wrapper:focus-within .chart-menu-button,.bar-chart-wrapper:focus-within .chart-menu-button,.choropleth-wrapper:focus-within .chart-menu-button,.line-chart-wrapper.is-fullscreen .chart-menu-button,.bar-chart-wrapper.is-fullscreen .chart-menu-button,.choropleth-wrapper.is-fullscreen .chart-menu-button{opacity:1}.line-chart-wrapper.is-fullscreen,.bar-chart-wrapper.is-fullscreen,.choropleth-wrapper.is-fullscreen{z-index:var(--cfasim-z-fullscreen,1000);background:var(--color-bg-0,#fff);color:var(--color-text,inherit);box-sizing:border-box;flex-direction:column;justify-content:center;padding:2em;display:flex;position:fixed;inset:0}.choropleth-wrapper.is-fullscreen svg{flex:auto;width:100%;height:100%;min-height:0}.chart-sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.chart-menu-trigger-area[data-v-c74e2889]{z-index:1;position:absolute;top:0;right:0}.chart-menu-button[data-v-c74e2889]{border:1px solid var(--color-border);background:var(--color-bg-0,#fff);width:28px;height:28px;color:var(--color-text-secondary);cursor:pointer;opacity:0;border-radius:.25em;justify-content:center;align-items:center;transition:opacity .15s;display:flex}.chart-menu-button[data-state=open][data-v-c74e2889]{opacity:1}.chart-menu-button[data-v-c74e2889]:hover{background:var(--color-bg-1,#0000000d);color:var(--color-text)}.chart-menu-content{z-index:100;background:var(--color-bg-0);border:1px solid var(--color-border);border-radius:.25em;min-width:140px;padding:.25em;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}.chart-menu-item{font-size:var(--font-size-sm);cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap;border-radius:.25em;outline:none;align-items:center;padding:.375em .5em;display:flex}.chart-menu-item[data-highlighted]{background:var(--color-primary);color:#fff}.line-chart-wrapper[data-v-0d24242d]{width:100%;position:relative}.line-chart-tooltip-label[data-v-0d24242d]{margin-bottom:.25em;font-weight:600}.line-chart-tooltip-row[data-v-0d24242d]{align-items:center;gap:.375em;display:flex}.line-chart-download-link[data-v-0d24242d]{text-align:right;font-size:var(--font-size-sm);margin-top:.25em;display:block}.line-chart-tooltip-swatch[data-v-0d24242d]{border-radius:50%;flex-shrink:0;width:.625em;height:.625em;display:inline-block}.line-chart-download-button{border:1px solid var(--color-border);background:var(--color-bg-0,#fff);color:var(--color-text);font-size:var(--font-size-sm);cursor:pointer;border-radius:.25em;align-items:center;margin-top:.5em;padding:.5em 1em;display:inline-flex}.line-chart-download-button:hover{background:var(--color-bg-1,#0000000d)}.line-chart-download-button:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}.bar-chart-wrapper[data-v-bce03a52]{width:100%;position:relative}.bar-chart-tooltip-label[data-v-bce03a52]{margin-bottom:.25em;font-weight:600}.bar-chart-tooltip-row[data-v-bce03a52]{align-items:center;gap:.375em;display:flex}.bar-chart-download-link[data-v-bce03a52]{text-align:right;font-size:var(--font-size-sm);margin-top:.25em;display:block}.bar-chart-tooltip-swatch[data-v-bce03a52]{border-radius:50%;flex-shrink:0;width:.625em;height:.625em;display:inline-block}.bar-chart-download-button{border:1px solid var(--color-border);background:var(--color-bg-0,#fff);color:var(--color-text);font-size:var(--font-size-sm);cursor:pointer;border-radius:.25em;align-items:center;margin-top:.5em;padding:.5em 1em;display:inline-flex}.bar-chart-download-button:hover{background:var(--color-bg-1,#0000000d)}.bar-chart-download-button:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}.choropleth-wrapper[data-v-b11a80ed]{--choropleth-legend-bg:var(--color-bg-0,#fff);width:100%;position:relative}.choropleth-wrapper svg[data-v-b11a80ed]{width:100%;height:auto;display:block}.choropleth-wrapper.pannable svg[data-v-b11a80ed]{cursor:grab}.choropleth-wrapper.pannable svg[data-v-b11a80ed]:active{cursor:grabbing}.state-path[data-v-b11a80ed]{cursor:pointer}.choropleth-reset[data-v-b11a80ed]{font:inherit;color:var(--color-text-secondary,#555);background:var(--color-bg-0,#fff);border:1px solid var(--color-border,#e5e7eb);cursor:pointer;border-radius:4px;padding:4px 10px;font-size:12px;position:absolute;bottom:8px;left:8px;box-shadow:0 1px 2px #0000000d}.choropleth-reset[data-v-b11a80ed]:hover{background:var(--color-bg-1,#f8f9fa);color:var(--color-text,#212529)}.choropleth-header[data-v-b11a80ed]{background:var(--choropleth-legend-bg);color:currentColor;border-radius:4px;flex-direction:column;align-items:center;gap:10px;width:fit-content;margin:0 auto;padding:8px 14px;display:flex}.choropleth-title[data-v-b11a80ed]{white-space:pre-line;font-size:14px;font-weight:600;line-height:1.2}.choropleth-legend[data-v-b11a80ed]{align-items:center;gap:14px;font-size:13px;line-height:1.2;display:flex}.choropleth-legend-title[data-v-b11a80ed]{font-weight:600}.choropleth-legend-item[data-v-b11a80ed]{align-items:center;gap:6px;display:inline-flex}.choropleth-legend-swatch[data-v-b11a80ed]{border-radius:3px;width:12px;height:12px;display:inline-block}.choropleth-legend-continuous[data-v-b11a80ed]{flex-direction:column;width:160px;display:flex}.choropleth-legend-gradient[data-v-b11a80ed]{border-radius:2px;height:12px}.choropleth-legend-ticks[data-v-b11a80ed]{opacity:.7;height:14px;margin-top:4px;font-size:11px;position:relative}.choropleth-legend-ticks>span[data-v-b11a80ed]{position:absolute;transform:translate(-50%)}.chart-tooltip-anchor[data-v-44377f70]{pointer-events:none;width:1px;height:1px;position:absolute}.chart-tooltip-content{z-index:100;background:var(--color-bg-0,#fff);border:1px solid var(--color-border,#e5e7eb);font-size:var(--font-size-sm,.875rem);pointer-events:none;border-radius:.375em;padding:.5em .75em;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}.TableOuter[data-v-20a55780]{display:inline-block;position:relative}.TableOuter.full-width[data-v-20a55780]{display:block}.TableWrapper[data-v-20a55780]{font-size:var(--font-size-sm);overflow-x:auto}.Table[data-v-20a55780]{border-collapse:collapse;font-variant-numeric:tabular-nums;border:1px solid var(--color-border);table-layout:fixed;margin:0;display:table}.Table.full-width[data-v-20a55780]{width:100%}.Table tr[data-v-20a55780],.Table th[data-v-20a55780],.Table td[data-v-20a55780]{background:0 0;border:none}.Table th[data-v-20a55780],.Table td[data-v-20a55780]{white-space:nowrap;text-align:left;padding:.75em 1.25em}.Table th[data-v-20a55780]{border-bottom:1px solid var(--color-border-header);font-weight:600;position:sticky;top:0}.Table tbody td[data-v-20a55780]{border-bottom:1px solid var(--color-border)}.Table tbody tr:last-child td[data-v-20a55780]{border-bottom:none}.TableOuter[data-v-20a55780] .chart-menu-trigger-area{top:4px;right:4px}.TableOuter[data-v-20a55780] .chart-menu-button{opacity:1}.TableOuter.has-menu .Table thead th[data-v-20a55780]:last-child{padding-right:2.5em}.data-table-download-button{border:1px solid var(--color-border);background:var(--color-bg-0,#fff);color:var(--color-text);font-size:var(--font-size-sm);cursor:pointer;border-radius:.25em;align-items:center;margin-top:.75em;padding:.5em 1em;display:inline-flex}.data-table-download-button:hover{background:var(--color-bg-1,#0000000d)}.data-table-download-button:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}.data-table-download-link{text-align:right;font-size:var(--font-size-sm);margin-top:.25em;display:block}
|
|
2
2
|
/*$vite$:1*/
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { default as LineChart, type LineChartData, type Series, type Area, type AreaSection, } from './LineChart/LineChart';
|
|
2
|
-
export { default as BarChart, type BarChartData, type BarSeries, } from './BarChart/BarChart';
|
|
2
|
+
export { default as BarChart, type BarChartData, type BarSeries, type BarSummaryLine, } from './BarChart/BarChart';
|
|
3
3
|
export { default as ChoroplethMap, type GeoType, type StateData, type ChoroplethColorScale, type ThresholdStop, type CategoricalStop, type FocusItem, type FocusValue, type FocusStyle, } from './ChoroplethMap/ChoroplethMap';
|
|
4
4
|
export { default as ChartTooltip } from './ChartTooltip/ChartTooltip';
|
|
5
5
|
export { default as DataTable, type TableData, type TableRecord, type ColumnAlign, type ColumnConfig, type ColumnWidth, } from './DataTable/DataTable';
|
|
6
6
|
export type { ChartAnnotation } from './_shared/annotations.js';
|
|
7
|
+
export type { BlendMode, LineMarkStyle } from './_shared/chartProps.js';
|