@opendata-ai/openchart-engine 6.11.0 → 6.13.0
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 +7 -0
- package/dist/index.js +944 -629
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/__test-fixtures__/specs.ts +3 -0
- package/src/__tests__/axes.test.ts +12 -30
- package/src/__tests__/compile-chart.test.ts +4 -4
- package/src/__tests__/dimensions.test.ts +2 -2
- package/src/__tests__/encoding-sugar.test.ts +389 -0
- package/src/annotations/collisions.ts +268 -0
- package/src/annotations/compute.ts +9 -912
- package/src/annotations/constants.ts +32 -0
- package/src/annotations/geometry.ts +167 -0
- package/src/annotations/position.ts +95 -0
- package/src/annotations/resolve-range.ts +98 -0
- package/src/annotations/resolve-refline.ts +148 -0
- package/src/annotations/resolve-text.ts +134 -0
- package/src/charts/__tests__/post-process.test.ts +258 -0
- package/src/charts/bar/__tests__/labels.test.ts +31 -0
- package/src/charts/bar/compute.ts +27 -6
- package/src/charts/bar/labels.ts +7 -1
- package/src/charts/column/__tests__/compute.test.ts +99 -0
- package/src/charts/column/compute.ts +27 -6
- package/src/charts/line/area.ts +19 -2
- package/src/charts/post-process.ts +215 -0
- package/src/compile.ts +113 -169
- package/src/compiler/__tests__/normalize.test.ts +110 -0
- package/src/compiler/normalize.ts +22 -3
- package/src/compiler/types.ts +4 -0
- package/src/graphs/compile-graph.ts +8 -0
- package/src/graphs/types.ts +2 -0
- package/src/layout/axes.ts +10 -13
- package/src/layout/dimensions.ts +6 -3
- package/src/layout/scales.ts +106 -29
- package/src/legend/compute.ts +3 -1
- package/src/sankey/compile-sankey.ts +12 -2
- package/src/sankey/types.ts +1 -0
- package/src/tables/compile-table.ts +5 -0
- package/src/tooltips/__tests__/compute.test.ts +188 -0
- package/src/tooltips/compute.ts +25 -11
- package/src/transforms/__tests__/aggregate.test.ts +159 -0
- package/src/transforms/__tests__/fold.test.ts +79 -0
- package/src/transforms/aggregate.ts +130 -0
- package/src/transforms/fold.ts +49 -0
- package/src/transforms/index.ts +8 -0
package/dist/index.d.ts
CHANGED
|
@@ -101,6 +101,8 @@ interface GraphCompilation {
|
|
|
101
101
|
};
|
|
102
102
|
/** Force simulation configuration. */
|
|
103
103
|
simulationConfig: SimulationConfig;
|
|
104
|
+
/** Whether to show the brand watermark. */
|
|
105
|
+
watermark: boolean;
|
|
104
106
|
}
|
|
105
107
|
|
|
106
108
|
/**
|
|
@@ -212,6 +214,8 @@ interface NormalizedChartSpec {
|
|
|
212
214
|
responsive: boolean;
|
|
213
215
|
theme: ThemeConfig;
|
|
214
216
|
darkMode: DarkMode;
|
|
217
|
+
/** Whether the tryOpenData.ai watermark is enabled. */
|
|
218
|
+
watermark: boolean;
|
|
215
219
|
/** Series names to hide from rendering. */
|
|
216
220
|
hiddenSeries: string[];
|
|
217
221
|
/** Per-series visual style overrides. */
|
|
@@ -226,6 +230,7 @@ interface NormalizedTableSpec {
|
|
|
226
230
|
chrome: NormalizedChrome;
|
|
227
231
|
theme: ThemeConfig;
|
|
228
232
|
darkMode: DarkMode;
|
|
233
|
+
watermark: boolean;
|
|
229
234
|
search: boolean;
|
|
230
235
|
pagination: boolean | {
|
|
231
236
|
pageSize: number;
|
|
@@ -247,6 +252,7 @@ interface NormalizedGraphSpec {
|
|
|
247
252
|
annotations: Annotation[];
|
|
248
253
|
theme: ThemeConfig;
|
|
249
254
|
darkMode: DarkMode;
|
|
255
|
+
watermark: boolean;
|
|
250
256
|
}
|
|
251
257
|
/** Discriminated union of all normalized spec types. */
|
|
252
258
|
type NormalizedSpec = NormalizedChartSpec | NormalizedTableSpec | NormalizedGraphSpec | NormalizedSankeySpec;
|
|
@@ -303,6 +309,7 @@ interface NormalizedSankeySpec {
|
|
|
303
309
|
legend?: LegendConfig;
|
|
304
310
|
theme: ThemeConfig;
|
|
305
311
|
darkMode: DarkMode;
|
|
312
|
+
watermark: boolean;
|
|
306
313
|
animation?: AnimationSpec;
|
|
307
314
|
valueFormat?: string;
|
|
308
315
|
linkOpacity?: number;
|