@actioneer/ads 0.5.3 → 0.5.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/components/chart.d.ts +14 -0
- package/components/chart.js +745 -612
- package/components/index.d.ts +1 -0
- package/components/index.js +373 -366
- package/components/viz-charts.d.ts +62 -0
- package/components/viz-charts.js +408 -0
- package/lib/viz-format.d.ts +25 -0
- package/lib/viz-format.js +40 -0
- package/llms.txt +15 -0
- package/manifest.json +149 -8
- package/package.json +1 -1
- package/styles.css +20 -15
- package/theme.css +20 -15
package/components/chart.d.ts
CHANGED
|
@@ -78,6 +78,7 @@ interface BaseChartProps {
|
|
|
78
78
|
annotations?: ChartAnnotation[];
|
|
79
79
|
/** Plot height in px (the frame is fluid-width). */
|
|
80
80
|
height?: number;
|
|
81
|
+
/** Interior gridlines. OFF by default — the two axis lines carry the frame. */
|
|
81
82
|
grid?: boolean;
|
|
82
83
|
/** Defaults to on when there is more than one series. */
|
|
83
84
|
legend?: boolean;
|
|
@@ -99,17 +100,27 @@ export interface LineChartProps extends BaseChartProps {
|
|
|
99
100
|
curve?: "linear" | "natural" | "step";
|
|
100
101
|
/** Series keys that render dashed — projections, not observations. */
|
|
101
102
|
forecastKeys?: string[];
|
|
103
|
+
/**
|
|
104
|
+
* Print each observation's value above its dot. On by default for a SINGLE
|
|
105
|
+
* series (the reader shouldn't have to hover to read a number that fits);
|
|
106
|
+
* off once there are several, where the labels would collide.
|
|
107
|
+
*/
|
|
108
|
+
showValues?: boolean;
|
|
102
109
|
}
|
|
103
110
|
export interface AreaChartProps extends BaseChartProps {
|
|
104
111
|
curve?: "linear" | "natural" | "step";
|
|
105
112
|
stacked?: boolean;
|
|
106
113
|
/** Series keys that render dashed — projections, not observations. */
|
|
107
114
|
forecastKeys?: string[];
|
|
115
|
+
/** Print each observation's value above its dot — see {@link LineChartProps.showValues}. */
|
|
116
|
+
showValues?: boolean;
|
|
108
117
|
}
|
|
109
118
|
export interface BarChartProps extends BaseChartProps {
|
|
110
119
|
stacked?: boolean;
|
|
111
120
|
/** Visual bar direction: vertical columns (default) or horizontal bars. */
|
|
112
121
|
layout?: "vertical" | "horizontal";
|
|
122
|
+
/** Print each bar's value past its end. On by default for a single series. */
|
|
123
|
+
showValues?: boolean;
|
|
113
124
|
}
|
|
114
125
|
export interface ComboChartProps extends BaseChartProps {
|
|
115
126
|
/** Series keys drawn as lines; the rest draw as bars. */
|
|
@@ -183,6 +194,7 @@ export interface ScatterChartProps {
|
|
|
183
194
|
labelKey?: string;
|
|
184
195
|
annotations?: ChartAnnotation[];
|
|
185
196
|
height?: number;
|
|
197
|
+
/** Interior gridlines. OFF by default — the two axis lines carry the frame. */
|
|
186
198
|
grid?: boolean;
|
|
187
199
|
showYAxis?: boolean;
|
|
188
200
|
formatValue?: (value: number) => string;
|
|
@@ -212,6 +224,8 @@ export interface FunnelChartProps {
|
|
|
212
224
|
tooltip?: ChartTooltipRenderer | false;
|
|
213
225
|
className?: string;
|
|
214
226
|
}
|
|
227
|
+
/** Chart floor — every chart is at least this tall (ChartFrame clamps). */
|
|
228
|
+
export declare const MIN_HEIGHT = 300;
|
|
215
229
|
export declare const LineChart: React.ForwardRefExoticComponent<LineChartProps & React.RefAttributes<HTMLDivElement>>;
|
|
216
230
|
export declare const AreaChart: React.ForwardRefExoticComponent<AreaChartProps & React.RefAttributes<HTMLDivElement>>;
|
|
217
231
|
export declare const BarChart: React.ForwardRefExoticComponent<BarChartProps & React.RefAttributes<HTMLDivElement>>;
|