@cfasim-ui/charts 0.3.2 → 0.3.4
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/ChoroplethMap/ChoroplethMap.d.ts +7 -0
- package/dist/LineChart/LineChart.d.ts +32 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +547 -289
- package/dist/tooltip-position.d.ts +13 -0
- package/package.json +2 -2
|
@@ -56,6 +56,12 @@ type __VLS_Props = {
|
|
|
56
56
|
name: string;
|
|
57
57
|
value?: number | string;
|
|
58
58
|
}) => string;
|
|
59
|
+
/**
|
|
60
|
+
* Boundary for tooltip flip/clamp. `"none"` always places to the right of
|
|
61
|
+
* the pointer with no clamping. `"chart"` (default) uses the map
|
|
62
|
+
* container's bounding box. `"window"` uses the viewport.
|
|
63
|
+
*/
|
|
64
|
+
tooltipClamp?: "none" | "chart" | "window";
|
|
59
65
|
};
|
|
60
66
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
61
67
|
stateClick: (state: {
|
|
@@ -82,6 +88,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
82
88
|
}>, {
|
|
83
89
|
legend: boolean;
|
|
84
90
|
menu: boolean | string;
|
|
91
|
+
tooltipClamp: "none" | "chart" | "window";
|
|
85
92
|
geoType: GeoType;
|
|
86
93
|
noDataColor: string;
|
|
87
94
|
strokeColor: string;
|
|
@@ -11,6 +11,8 @@ export interface Series {
|
|
|
11
11
|
dotRadius?: number;
|
|
12
12
|
dotFill?: string;
|
|
13
13
|
dotStroke?: string;
|
|
14
|
+
/** Label shown in the inline legend */
|
|
15
|
+
legend?: string;
|
|
14
16
|
}
|
|
15
17
|
export interface Area {
|
|
16
18
|
upper: number[];
|
|
@@ -18,10 +20,33 @@ export interface Area {
|
|
|
18
20
|
color?: string;
|
|
19
21
|
opacity?: number;
|
|
20
22
|
}
|
|
23
|
+
export interface AreaSection {
|
|
24
|
+
/** Index into the series array. When omitted, fills the full chart height with no line. */
|
|
25
|
+
seriesIndex?: number;
|
|
26
|
+
/** Start x-index (inclusive) */
|
|
27
|
+
startIndex: number;
|
|
28
|
+
/** End x-index (inclusive) */
|
|
29
|
+
endIndex: number;
|
|
30
|
+
/** Fill color; defaults to referenced series color */
|
|
31
|
+
color?: string;
|
|
32
|
+
/** Fill opacity; defaults to 0.15 */
|
|
33
|
+
opacity?: number;
|
|
34
|
+
/** Primary label text (e.g. "Day 36–63") */
|
|
35
|
+
label?: string;
|
|
36
|
+
/** Secondary description text (e.g. "40.0M vaccines administered") */
|
|
37
|
+
description?: string;
|
|
38
|
+
/** Stroke width for the highlighted line segment (default: 2) */
|
|
39
|
+
strokeWidth?: number;
|
|
40
|
+
/** Dashed stroke pattern */
|
|
41
|
+
dashed?: boolean;
|
|
42
|
+
/** Label placement: "below" (default) renders below chart, "inline" renders in legend row, false hides label */
|
|
43
|
+
legend?: "inline" | "below" | false;
|
|
44
|
+
}
|
|
21
45
|
type __VLS_Props = {
|
|
22
46
|
data?: number[];
|
|
23
47
|
series?: Series[];
|
|
24
48
|
areas?: Area[];
|
|
49
|
+
areaSections?: AreaSection[];
|
|
25
50
|
width?: number;
|
|
26
51
|
height?: number;
|
|
27
52
|
lineOpacity?: number;
|
|
@@ -39,6 +64,12 @@ type __VLS_Props = {
|
|
|
39
64
|
tooltipData?: unknown[];
|
|
40
65
|
/** Tooltip activation mode. Default: 'hover' */
|
|
41
66
|
tooltipTrigger?: "hover" | "click";
|
|
67
|
+
/**
|
|
68
|
+
* Boundary for tooltip flip/clamp. `"none"` always places to the right of
|
|
69
|
+
* the pointer with no clamping. `"chart"` (default) uses the chart
|
|
70
|
+
* container's bounding box. `"window"` uses the viewport.
|
|
71
|
+
*/
|
|
72
|
+
tooltipClamp?: "none" | "chart" | "window";
|
|
42
73
|
/**
|
|
43
74
|
* Custom CSV content for the Download CSV menu item. Can be a raw CSV
|
|
44
75
|
* string or a function returning one. When omitted, CSV is generated
|
|
@@ -98,6 +129,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
98
129
|
}>, {
|
|
99
130
|
menu: boolean | string;
|
|
100
131
|
lineOpacity: number;
|
|
132
|
+
tooltipClamp: "none" | "chart" | "window";
|
|
101
133
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
102
134
|
containerRef: HTMLDivElement;
|
|
103
135
|
svgRef: SVGSVGElement;
|
package/dist/index.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.chart-menu-trigger-area[data-v-fe2f6904]{z-index:1;position:absolute;top:0;right:0}.chart-menu-button[data-v-fe2f6904]{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-fe2f6904]{opacity:1}.chart-menu-button[data-v-fe2f6904]: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
|
+
.chart-menu-trigger-area[data-v-fe2f6904]{z-index:1;position:absolute;top:0;right:0}.chart-menu-button[data-v-fe2f6904]{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-fe2f6904]{opacity:1}.chart-menu-button[data-v-fe2f6904]: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-d1434a63]{width:100%;position:relative}.line-chart-wrapper[data-v-d1434a63]:hover .chart-menu-button{opacity:1}.line-chart-tooltip-label[data-v-d1434a63]{margin-bottom:.25em;font-weight:600}.line-chart-tooltip-row[data-v-d1434a63]{align-items:center;gap:.375em;display:flex}.line-chart-download-link[data-v-d1434a63]{text-align:right;font-size:var(--font-size-sm);margin-top:.25em;display:block}.line-chart-tooltip-swatch[data-v-d1434a63]{border-radius:50%;flex-shrink:0;width:.625em;height:.625em;display:inline-block}.choropleth-wrapper[data-v-25a20d5b]{width:100%;position:relative}.choropleth-wrapper.pannable svg[data-v-25a20d5b]{cursor:grab}.choropleth-wrapper.pannable svg[data-v-25a20d5b]:active{cursor:grabbing}.choropleth-wrapper[data-v-25a20d5b]:hover .chart-menu-button{opacity:1}.state-path[data-v-25a20d5b]{cursor:pointer}.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-505e2187]{display:inline-block;position:relative}.TableOuter.has-menu[data-v-505e2187]{margin-top:32px}.TableOuter[data-v-505e2187] .chart-menu-trigger-area{top:-32px;right:0}.TableOuter[data-v-505e2187]:hover .chart-menu-button{opacity:1}.TableWrapper[data-v-505e2187]{font-size:var(--font-size-sm);overflow-x:auto}.Table[data-v-505e2187]{border-collapse:collapse;font-variant-numeric:tabular-nums;border:1px solid var(--color-border);margin:0;display:table}.Table tr[data-v-505e2187],.Table th[data-v-505e2187],.Table td[data-v-505e2187]{background:0 0;border:none}.Table th[data-v-505e2187],.Table td[data-v-505e2187]{white-space:nowrap;padding:.75em 1.25em}.Table th[data-v-505e2187]{border-bottom:1px solid var(--color-border-header);font-weight:600;position:sticky;top:0}.Table tbody td[data-v-505e2187]{border-bottom:1px solid var(--color-border)}.Table tbody tr:last-child td[data-v-505e2187]{border-bottom:none}.data-table-download-link[data-v-505e2187]{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,4 +1,4 @@
|
|
|
1
|
-
export { default as LineChart, type Series, type Area, } from './LineChart/LineChart';
|
|
1
|
+
export { default as LineChart, type Series, type Area, type AreaSection, } from './LineChart/LineChart';
|
|
2
2
|
export { default as ChoroplethMap, type GeoType, type StateData, type ChoroplethColorScale, type ThresholdStop, type CategoricalStop, } from './ChoroplethMap/ChoroplethMap';
|
|
3
3
|
export { default as ChartTooltip } from './ChartTooltip/ChartTooltip';
|
|
4
4
|
export { default as DataTable, type TableData, type TableRecord, type ColumnAlign, type ColumnConfig, type ColumnWidth, } from './DataTable/DataTable';
|