@malloydata/render 0.0.405 → 0.0.406
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/module/component/vega/measure-series-label-scale.d.ts +12 -0
- package/dist/module/index.mjs +23736 -23744
- package/dist/module/index.umd.js +392 -392
- package/dist/module/plugins/bar-chart/bar-chart-plugin.d.ts +3 -2
- package/dist/module/plugins/bar-chart/generate-bar_chart-vega-spec.d.ts +6 -1
- package/dist/module/plugins/line-chart/generate-line_chart-vega-spec.d.ts +6 -1
- package/dist/module/plugins/line-chart/line-chart-plugin.d.ts +3 -2
- package/dist/module/plugins/scatter-chart/generate-scatter_chart-spec.d.ts +3 -0
- package/dist/module/plugins/synthetic-series-field.d.ts +11 -0
- package/package.json +5 -5
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { RenderPluginFactory, CoreVizPluginInstance } from '../../api/plugin-types';
|
|
2
|
-
import {
|
|
2
|
+
import { NestField } from '../../data_tree';
|
|
3
3
|
import { BarChartSettings } from './get-bar_chart-settings';
|
|
4
4
|
import { ChartDisplayConfig } from '../../component/chart/resolve-chart-display';
|
|
5
|
+
import { SyntheticSeriesField } from '../synthetic-series-field';
|
|
5
6
|
export interface BarChartPluginInstance extends CoreVizPluginInstance<BarChartPluginMetadata> {
|
|
6
7
|
getTopNSeries?: (maxSeries: number) => (string | number | boolean)[];
|
|
7
8
|
field: NestField;
|
|
8
9
|
chartDisplay: ChartDisplayConfig;
|
|
9
|
-
syntheticSeriesField?:
|
|
10
|
+
syntheticSeriesField?: SyntheticSeriesField;
|
|
10
11
|
hasMultipleSeriesFields?: boolean;
|
|
11
12
|
}
|
|
12
13
|
interface BarChartPluginMetadata {
|
|
@@ -2,4 +2,9 @@ import { VegaChartProps } from '../../component/types';
|
|
|
2
2
|
import { Config } from 'vega';
|
|
3
3
|
import { RenderMetadata } from '../../component/render-result-metadata';
|
|
4
4
|
import { BarChartPluginInstance } from './bar-chart-plugin';
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* The slice of the bar chart plugin instance the spec generator reads,
|
|
7
|
+
* narrowed so tests can construct a real, fully typed value.
|
|
8
|
+
*/
|
|
9
|
+
export type BarChartSpecInputs = Pick<BarChartPluginInstance, 'getMetadata' | 'field' | 'chartDisplay' | 'getTopNSeries' | 'syntheticSeriesField' | 'hasMultipleSeriesFields'>;
|
|
10
|
+
export declare function generateBarChartVegaSpecV2(metadata: RenderMetadata, plugin: BarChartSpecInputs, vegaConfig?: Config): VegaChartProps;
|
|
@@ -15,4 +15,9 @@ export interface LineChartSettings {
|
|
|
15
15
|
zeroBaseline: boolean;
|
|
16
16
|
interactive: boolean;
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
/**
|
|
19
|
+
* The slice of the line chart plugin instance the spec generator reads,
|
|
20
|
+
* narrowed so tests can construct a real, fully typed value.
|
|
21
|
+
*/
|
|
22
|
+
export type LineChartSpecInputs = Pick<LineChartPluginInstance, 'getMetadata' | 'field' | 'chartDisplay' | 'getTopNSeries' | 'syntheticSeriesField'>;
|
|
23
|
+
export declare function generateLineChartVegaSpecV2(metadata: RenderMetadata, plugin: LineChartSpecInputs, vegaConfig?: Config): VegaChartProps;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { RenderPluginFactory, CoreVizPluginInstance } from '../../api/plugin-types';
|
|
2
|
-
import {
|
|
2
|
+
import { NestField } from '../../data_tree';
|
|
3
3
|
import { LineChartSettings } from './get-line_chart-settings';
|
|
4
4
|
import { ChartDisplayConfig } from '../../component/chart/resolve-chart-display';
|
|
5
|
+
import { SyntheticSeriesField } from '../synthetic-series-field';
|
|
5
6
|
interface LineChartPluginMetadata {
|
|
6
7
|
type: 'line';
|
|
7
8
|
field: NestField;
|
|
@@ -17,7 +18,7 @@ interface LineChartPluginInstance extends CoreVizPluginInstance<LineChartPluginM
|
|
|
17
18
|
chartDisplay: ChartDisplayConfig;
|
|
18
19
|
seriesStats: Map<string, SeriesStats>;
|
|
19
20
|
getTopNSeries: (maxSeries: number) => (string | number | boolean)[];
|
|
20
|
-
syntheticSeriesField?:
|
|
21
|
+
syntheticSeriesField?: SyntheticSeriesField;
|
|
21
22
|
}
|
|
22
23
|
export declare const LineChartPluginFactory: RenderPluginFactory<LineChartPluginInstance>;
|
|
23
24
|
export type { LineChartPluginInstance };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The slice of `Field` the chart spec generators read off a series field,
|
|
3
|
+
* so the bar and line plugins' synthetic series fields stay honestly typed.
|
|
4
|
+
*/
|
|
5
|
+
export interface SyntheticSeriesField {
|
|
6
|
+
name: string;
|
|
7
|
+
getLabel: () => string;
|
|
8
|
+
valueSet: ReadonlySet<string | number | boolean>;
|
|
9
|
+
referenceId: string;
|
|
10
|
+
maxString?: string;
|
|
11
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@malloydata/render",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.406",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/module/index.umd.js",
|
|
6
6
|
"types": "dist/module/index.d.ts",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"generate-flow": "ts-node ../../scripts/gen-flow.ts"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@malloydata/malloy-interfaces": "0.0.
|
|
33
|
-
"@malloydata/malloy-tag": "0.0.
|
|
32
|
+
"@malloydata/malloy-interfaces": "0.0.406",
|
|
33
|
+
"@malloydata/malloy-tag": "0.0.406",
|
|
34
34
|
"@tanstack/solid-virtual": "^3.10.4",
|
|
35
35
|
"lodash": "^4.18.1",
|
|
36
36
|
"luxon": "^3.5.0",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"vega-lite": "^5.2.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@malloydata/db-duckdb": "0.0.
|
|
46
|
-
"@malloydata/malloy": "0.0.
|
|
45
|
+
"@malloydata/db-duckdb": "0.0.406",
|
|
46
|
+
"@malloydata/malloy": "0.0.406",
|
|
47
47
|
"@storybook/addon-essentials": "^8.6.15",
|
|
48
48
|
"@storybook/addon-interactions": "^8.6.15",
|
|
49
49
|
"@storybook/addon-links": "^8.6.15",
|