@rtemis/draw 0.1.0 → 0.2.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/README.md +10 -1
- package/dist/charts/a3/config.d.ts +23 -2
- package/dist/charts/a3/config.d.ts.map +1 -1
- package/dist/charts/a3/config.js +24 -3
- package/dist/charts/a3/config.js.map +1 -1
- package/dist/charts/a3/index.d.ts +2 -2
- package/dist/charts/a3/index.d.ts.map +1 -1
- package/dist/charts/a3/index.js +1 -1
- package/dist/charts/a3/index.js.map +1 -1
- package/dist/charts/bar/config.d.ts +59 -0
- package/dist/charts/bar/config.d.ts.map +1 -0
- package/dist/charts/bar/config.js +151 -0
- package/dist/charts/bar/config.js.map +1 -0
- package/dist/charts/bar/index.d.ts +3 -0
- package/dist/charts/bar/index.d.ts.map +1 -0
- package/dist/charts/bar/index.js +2 -0
- package/dist/charts/bar/index.js.map +1 -0
- package/dist/index.d.ts +13 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/rtemis-draw-builders.cjs +419 -5
- package/dist/shared/layout.d.ts +29 -0
- package/dist/shared/layout.d.ts.map +1 -0
- package/dist/shared/layout.js +59 -0
- package/dist/shared/layout.js.map +1 -0
- package/dist/shared/legend.d.ts +14 -0
- package/dist/shared/legend.d.ts.map +1 -0
- package/dist/shared/legend.js +2 -0
- package/dist/shared/legend.js.map +1 -0
- package/dist/shared/source.d.ts +32 -0
- package/dist/shared/source.d.ts.map +1 -0
- package/dist/shared/source.js +32 -0
- package/dist/shared/source.js.map +1 -0
- package/dist/theme/tokens.d.ts +76 -0
- package/dist/theme/tokens.d.ts.map +1 -0
- package/dist/theme/tokens.js +205 -0
- package/dist/theme/tokens.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,12 +27,21 @@ const option = builders.a3(a3Document, config)
|
|
|
27
27
|
| Type | Builder | Data | Config schema |
|
|
28
28
|
|---|---|---|---|
|
|
29
29
|
| `a3` | `buildA3Option(document, config, appearance)` | an A3 document (`@rtemis/a3` `A3Data`) | `https://schema.rtemis.org/chart/a3/v1/schema.json` |
|
|
30
|
+
| `bar` | `buildBarOption(data, config, appearance)` | tabular data, `{columns, levels}` | `https://schema.rtemis.org/chart/bar/v1/schema.json` |
|
|
31
|
+
|
|
32
|
+
Tabular data holds the columns the config binds, each an array or typed array, and optionally the level order of categorical columns. A bar chart draws one bar per row; with `group`, one bar per distinct category and group, in level order. When `group` or `aggregate` is set, the data must hold one row per category and group: the host combines rows as `aggregate` says (rtemislive in DuckDB, rtemis.draw in R) before building.
|
|
30
33
|
|
|
31
34
|
`appearance` holds what every chart type shares and the config does not: the light or dark theme, the font family, the title inset, the legend gap, and animation. Every member of `config` and `appearance` is optional.
|
|
32
35
|
|
|
36
|
+
`a3SurfaceHints(document, config, appearance)` returns the height that keeps the layout's row spacing, the plot body height, and the glyph sizes, for a renderer that sizes its surface before drawing.
|
|
37
|
+
|
|
38
|
+
## Themes
|
|
39
|
+
|
|
40
|
+
`themeOption(tokens)` projects a theme's tokens (fonts, text sizes, surface colors, the palette, sign colors, axis colors, and gridline colors) to the ECharts theme object a host registers with `echarts.registerTheme()` or `chart.setTheme()`. `lightThemeTokens()` and `darkThemeTokens()` give rtemis.draw's light and dark themes, whose projections equal the objects `theme_light()` and `theme_dark()` register. Builders write no path the theme owns.
|
|
41
|
+
|
|
33
42
|
## In rtemis.draw
|
|
34
43
|
|
|
35
|
-
rtemis.draw ships the builders as one script, `r/inst/htmlwidgets/lib/draw/rtemis-draw-builders.js`, which defines the global `RtemisDraw` in a browser and is a CommonJS module in Node.js. From the repository root:
|
|
44
|
+
rtemis.draw ships the builders as one script, `r/inst/htmlwidgets/lib/draw/rtemis-draw-builders.js`, which defines the global `RtemisDraw` in a browser and is a CommonJS module in Node.js. The `rtemis-draw` widget declares it as a dependency and builds the option of a `BuildRequest` with it; `save_drawing()` builds the same request in Node.js. From the repository root:
|
|
36
45
|
|
|
37
46
|
```sh
|
|
38
47
|
just ts-test # type check, Biome, Vitest
|
|
@@ -4,7 +4,7 @@ import type { A3EChartsOption, A3PtmPlacement } from "./types.ts";
|
|
|
4
4
|
* An instance of the `chart/a3/v1` schema, written by rtemis.draw's `A3Config`
|
|
5
5
|
* class. Every member is optional; an absent member takes the default below.
|
|
6
6
|
* `annotation_gap` and `position_label_gap` are members the R class gains
|
|
7
|
-
* with this package (spec: draw/shared-builders#
|
|
7
|
+
* with this package (spec: draw/shared-builders#config-contract).
|
|
8
8
|
*/
|
|
9
9
|
export interface A3ChartConfig {
|
|
10
10
|
readonly type?: "a3";
|
|
@@ -54,7 +54,7 @@ export declare const A3_CHART_CONFIG_MEMBERS: readonly ["type", "n_per_row", "po
|
|
|
54
54
|
/**
|
|
55
55
|
* Appearance shared by every chart type, and the light or dark theme. The
|
|
56
56
|
* defaults equal rtemislive's A3 defaults until the appearance contract is
|
|
57
|
-
* reconciled across chart types (spec: draw/shared-builders#inputs-that-are-not-the-chart-config).
|
|
57
|
+
* reconciled across chart types (spec: draw/shared-builders/notes#inputs-that-are-not-the-chart-config).
|
|
58
58
|
*/
|
|
59
59
|
export interface A3Appearance {
|
|
60
60
|
/** Select the dark theme. Default `false`. */
|
|
@@ -73,4 +73,25 @@ export interface A3Appearance {
|
|
|
73
73
|
* `chart/a3/v1` config.
|
|
74
74
|
*/
|
|
75
75
|
export declare function buildA3Option(document: A3Data, config?: A3ChartConfig, appearance?: A3Appearance): A3EChartsOption;
|
|
76
|
+
/** The sizes a renderer needs to fit an A3 option to its surface. */
|
|
77
|
+
export interface A3SurfaceHints {
|
|
78
|
+
/** Chart height in pixels that keeps the row spacing of the layout. */
|
|
79
|
+
readonly height: number;
|
|
80
|
+
/** Height in pixels of the plot body, from the first row to the last. */
|
|
81
|
+
readonly bodyHeight: number;
|
|
82
|
+
/** Residue marker size in pixels. */
|
|
83
|
+
readonly markerSize: number;
|
|
84
|
+
/** Residue label font size in pixels. */
|
|
85
|
+
readonly fontSize: number;
|
|
86
|
+
/** Gap between residues. */
|
|
87
|
+
readonly residueSpacing: number;
|
|
88
|
+
/** Gap in pixels between the plot and the legend rail. */
|
|
89
|
+
readonly legendGap: number;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* The height and glyph sizes of an A3 diagram, for a renderer that sizes its
|
|
93
|
+
* surface before drawing (rtemislive's chart container, rtemis.draw's widget
|
|
94
|
+
* and SVG export).
|
|
95
|
+
*/
|
|
96
|
+
export declare function a3SurfaceHints(document: A3Data, config?: A3ChartConfig, appearance?: A3Appearance): A3SurfaceHints;
|
|
76
97
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/charts/a3/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/charts/a3/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAIzC,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EAGf,MAAM,YAAY,CAAC;AAEpB;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC;IACrB,oCAAoC;IACpC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,6EAA6E;IAC7E,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,iFAAiF;IACjF,QAAQ,CAAC,aAAa,CAAC,EAAE,cAAc,CAAC;IACxC,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACxB,yCAAyC;IACzC,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,iDAAiD;IACjD,QAAQ,CAAC,WAA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U,CAAC,EAAE,MAAM,CAAC;IAC7B,6CAA6C;IAC7C,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,sEAAsE;IACtE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,4DAA4D;IAC5D,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,aAAkB,EAC1B,UAAU,GAAE,YAAiB,GAC5B,eAAe,CAGjB;AAED,qEAAqE;AACrE,MAAM,WAAW,cAAc;IAC7B,uEAAuE;IACvE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,yEAAyE;IACzE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,qCAAqC;IACrC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,yCAAyC;IACzC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,4BAA4B;IAC5B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,0DAA0D;IAC1D,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,aAAkB,EAC1B,UAAU,GAAE,YAAiB,GAC5B,cAAc,CAYhB"}
|
package/dist/charts/a3/config.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createA3EChartsOption } from "./echarts.js";
|
|
2
|
+
import { createA3LayoutModel, resolveA3VisualizationHeight } from "./layout.js";
|
|
2
3
|
import { DARK_A3_VISUALIZATION_THEME } from "./palette.js";
|
|
3
4
|
/** Every member of {@link A3ChartConfig}, checked against `chart/a3/v1`. */
|
|
4
5
|
export const A3_CHART_CONFIG_MEMBERS = Object.freeze([
|
|
@@ -31,6 +32,28 @@ void _everyMember;
|
|
|
31
32
|
* `chart/a3/v1` config.
|
|
32
33
|
*/
|
|
33
34
|
export function buildA3Option(document, config = {}, appearance = {}) {
|
|
35
|
+
const option = createA3EChartsOption(document, visualizationOptions(config, appearance));
|
|
36
|
+
return config.zoom === false ? option : Object.freeze({ ...option, dataZoom: A3_ZOOM });
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The height and glyph sizes of an A3 diagram, for a renderer that sizes its
|
|
40
|
+
* surface before drawing (rtemislive's chart container, rtemis.draw's widget
|
|
41
|
+
* and SVG export).
|
|
42
|
+
*/
|
|
43
|
+
export function a3SurfaceHints(document, config = {}, appearance = {}) {
|
|
44
|
+
const options = visualizationOptions(config, appearance);
|
|
45
|
+
const model = createA3LayoutModel(document, options);
|
|
46
|
+
const markerSize = options.markerSize ?? 28;
|
|
47
|
+
return Object.freeze({
|
|
48
|
+
height: resolveA3VisualizationHeight(document, options),
|
|
49
|
+
bodyHeight: markerSize * (2 * (model.bounds.maxY - model.bounds.minY) + 1),
|
|
50
|
+
markerSize,
|
|
51
|
+
fontSize: options.fontSize ?? 18,
|
|
52
|
+
residueSpacing: options.residueSpacing ?? 0.3,
|
|
53
|
+
legendGap: options.legendGap ?? 90,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function visualizationOptions(config, appearance) {
|
|
34
57
|
const dark = appearance.dark ?? false;
|
|
35
58
|
const base = dark ? DARK_A3_VISUALIZATION_THEME : {};
|
|
36
59
|
const theme = {
|
|
@@ -47,7 +70,7 @@ export function buildA3Option(document, config = {}, appearance = {}) {
|
|
|
47
70
|
...colorOverride("variantColor", config.variant_color),
|
|
48
71
|
...colorOverride("diseaseVariantColor", config.disease_variant_color),
|
|
49
72
|
};
|
|
50
|
-
|
|
73
|
+
return {
|
|
51
74
|
nPerRow: config.n_per_row ?? 21,
|
|
52
75
|
residueSpacing: config.residue_spacing ?? 0.3,
|
|
53
76
|
showMarkers: config.show_markers ?? true,
|
|
@@ -67,8 +90,6 @@ export function buildA3Option(document, config = {}, appearance = {}) {
|
|
|
67
90
|
...(config.title ? { title: config.title } : {}),
|
|
68
91
|
...(appearance.titleTop === undefined ? {} : { titleTop: appearance.titleTop }),
|
|
69
92
|
};
|
|
70
|
-
const option = createA3EChartsOption(document, options);
|
|
71
|
-
return config.zoom === false ? option : Object.freeze({ ...option, dataZoom: A3_ZOOM });
|
|
72
93
|
}
|
|
73
94
|
// Shift+wheel zooms the sequence axis and drag pans it, so the plain wheel
|
|
74
95
|
// scrolls the host page (spec: draw/zoom-controls#design).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/charts/a3/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AA0D3D,4EAA4E;AAC5E,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,CAAC;IACnD,MAAM;IACN,WAAW;IACX,gBAAgB;IAChB,eAAe;IACf,MAAM;IACN,iBAAiB;IACjB,aAAa;IACb,WAAW;IACX,YAAY;IACZ,cAAc;IACd,aAAa;IACb,gBAAgB;IAChB,oBAAoB;IACpB,gBAAgB;IAChB,cAAc;IACd,gBAAgB;IAChB,aAAa;IACb,iBAAiB;IACjB,eAAe;IACf,uBAAuB;IACvB,OAAO;CAC4C,CAAC,CAAC;AAIvD,MAAM,YAAY,GAA+C,IAAI,CAAC;AACtE,KAAK,YAAY,CAAC;AAoBlB;;;GAGG;AACH,MAAM,UAAU,aAAa,CAC3B,QAAgB,EAChB,SAAwB,EAAE,EAC1B,aAA2B,EAAE;IAE7B,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,IAAI,KAAK,CAAC;IACtC,MAAM,IAAI,GAAkC,IAAI,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,EAAE,CAAC;IACpF,MAAM,KAAK,GAAkC;QAC3C,GA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,CAAC,cAAc,IAAI,GAAG;QAC3C,YAAY,EAAE,MAAM,CAAC,aAAa,IAAI,QAAQ;QAC9C,SAAS,EAAE,UAAU,CAAC,SAAS,IAAI,EAAE;QACrC,eAAe,EAAE,UAAU,CAAC,SAAS,IAAI,IAAI;QAC7C,KAAK;QACL,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAChD,GAAG,CAAC,UAAU,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,UAAU,CAAC,QAAQ,EAAE,CAAC;KAChF,CAAC;AACJ,CAAC;AAED,2EAA2E;AAC3E,2DAA2D;AAC3D,MAAM,OAAO,GAAuC,MAAM,CAAC,MAAM,CAAC;IAChE;QACE,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,CAAC;QACb,gBAAgB,EAAE,OAAO;QACzB,eAAe,EAAE,IAAI;QACrB,gBAAgB,EAAE,IAAI;QACtB,uBAAuB,EAAE,KAAK;KAC/B;IACD;QACE,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,CAAC;QACb,gBAAgB,EAAE,KAAK;QACvB,gBAAgB,EAAE,KAAK;QACvB,eAAe,EAAE,KAAK;KACvB;CACF,CAAC,CAAC;AAEH,SAAS,aAAa,CACpB,GAA+B,EAC/B,KAAgC;IAEhC,OAAO,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AACvC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { A3Appearance, A3ChartConfig } from "./config.ts";
|
|
2
|
-
export { buildA3Option } from "./config.ts";
|
|
1
|
+
export type { A3Appearance, A3ChartConfig, A3SurfaceHints } from "./config.ts";
|
|
2
|
+
export { A3_CHART_CONFIG_MEMBERS, a3SurfaceHints, buildA3Option } from "./config.ts";
|
|
3
3
|
export type { A3EChartsOption, A3PtmPlacement } from "./types.ts";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/charts/a3/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC/
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/charts/a3/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACrF,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/charts/a3/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { buildA3Option } from "./config.js";
|
|
1
|
+
export { A3_CHART_CONFIG_MEMBERS, a3SurfaceHints, buildA3Option } from "./config.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/charts/a3/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/charts/a3/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { type MarginMembers } from "../../shared/layout.ts";
|
|
2
|
+
import type { LegendMembers } from "../../shared/legend.ts";
|
|
3
|
+
import { type ColumnNames, type TabularData } from "../../shared/source.ts";
|
|
4
|
+
/**
|
|
5
|
+
* An instance of the `chart/bar/v1` schema, written by rtemis.draw's
|
|
6
|
+
* `BarConfig` class. Every member is optional. spec: draw/shared-builders#bar
|
|
7
|
+
*/
|
|
8
|
+
export interface BarChartConfig extends MarginMembers, LegendMembers {
|
|
9
|
+
readonly type?: "bar";
|
|
10
|
+
/** Column holding the categories. */
|
|
11
|
+
readonly x?: string | null;
|
|
12
|
+
/** Columns holding the values, one series each. */
|
|
13
|
+
readonly y?: ColumnNames | null;
|
|
14
|
+
/** Column whose values split each value column into one series per group. */
|
|
15
|
+
readonly group?: string | null;
|
|
16
|
+
/**
|
|
17
|
+
* How rows sharing a category and group combine into one bar. The host
|
|
18
|
+
* applies it to the data before building (rtemislive in DuckDB, rtemis.draw
|
|
19
|
+
* in R); the builder requires one row per category and group when it is set.
|
|
20
|
+
* Default `"none"`: one bar per row.
|
|
21
|
+
*/
|
|
22
|
+
readonly aggregate?: "none" | "sum" | "mean" | "median" | "count";
|
|
23
|
+
/** Category order by total value across series. Default `"input"`. */
|
|
24
|
+
readonly order?: "input" | "increasing" | "decreasing";
|
|
25
|
+
/** Stack the series instead of grouping them. Default `false`. */
|
|
26
|
+
readonly stack?: boolean;
|
|
27
|
+
/** Draw the bars horizontally. Default `false`. */
|
|
28
|
+
readonly horizontal?: boolean;
|
|
29
|
+
/** A slider, Shift+wheel zoom, and drag panning on the category axis. Default `false`. */
|
|
30
|
+
readonly zoom?: boolean;
|
|
31
|
+
/** Bar thickness in pixels; unset uses automatic category spacing. */
|
|
32
|
+
readonly bar_width?: number | null;
|
|
33
|
+
/** Series colors, or bar colors for one series; unset uses the theme palette. */
|
|
34
|
+
readonly palette?: ColumnNames | null;
|
|
35
|
+
/** Value axis limits, `[min, max]`; unset fits the data. */
|
|
36
|
+
readonly ylim?: readonly [number, number] | null;
|
|
37
|
+
/** Bottom axis name; unset draws none. */
|
|
38
|
+
readonly xlab?: string | null;
|
|
39
|
+
/** Left axis name; unset draws none. */
|
|
40
|
+
readonly ylab?: string | null;
|
|
41
|
+
/** Chart title. */
|
|
42
|
+
readonly title?: string | null;
|
|
43
|
+
}
|
|
44
|
+
/** What is not chart config: animation. */
|
|
45
|
+
export interface BarAppearance {
|
|
46
|
+
/** Animate the first render and updates; unset leaves the ECharts default. */
|
|
47
|
+
readonly animation?: boolean;
|
|
48
|
+
}
|
|
49
|
+
/** Every member of {@link BarChartConfig}, checked against `chart/bar/v1`. */
|
|
50
|
+
export declare const BAR_CHART_CONFIG_MEMBERS: readonly ["type", "x", "y", "group", "aggregate", "order", "stack", "horizontal", "zoom", "bar_width", "palette", "ylim", "xlab", "ylab", "title", "margin_top", "margin_right", "margin_bottom", "margin_left", "legend_position", "legend_placement", "legend_title"];
|
|
51
|
+
/**
|
|
52
|
+
* Build the ECharts option of a bar chart from tabular data and its
|
|
53
|
+
* `chart/bar/v1` config. One bar per row and series; with `group`, the
|
|
54
|
+
* categories are the distinct `x` values and each group adds a series per
|
|
55
|
+
* value column, empty where a category lacks the group. Distinct categories
|
|
56
|
+
* and groups follow their column's levels, then order of appearance.
|
|
57
|
+
*/
|
|
58
|
+
export declare function buildBarOption(data: TabularData, config: BarChartConfig, appearance?: BarAppearance): Record<string, unknown>;
|
|
59
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/charts/bar/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACrF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAEL,KAAK,WAAW,EAIhB,KAAK,WAAW,EACjB,MAAM,wBAAwB,CAAC;AAEhC;;;GAGG;AACH,MAAM,WAAW,cAAe,SAAQ,aAAa,EAAE,aAAa;IAClE,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC;IACtB,qCAAqC;IACrC,QAAQ,C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MAAM,wBAAwB,yQAuBkB,CAAC;AAWxD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE,cAAc,EACtB,UAAU,GAAE,aAAkB,GAC7B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA2FzB"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { axisZoom, cartesianGrid } from "../../shared/layout.js";
|
|
2
|
+
import { asArray, column, distinct, numberOrNull, } from "../../shared/source.js";
|
|
3
|
+
/** Every member of {@link BarChartConfig}, checked against `chart/bar/v1`. */
|
|
4
|
+
export const BAR_CHART_CONFIG_MEMBERS = Object.freeze([
|
|
5
|
+
"type",
|
|
6
|
+
"x",
|
|
7
|
+
"y",
|
|
8
|
+
"group",
|
|
9
|
+
"aggregate",
|
|
10
|
+
"order",
|
|
11
|
+
"stack",
|
|
12
|
+
"horizontal",
|
|
13
|
+
"zoom",
|
|
14
|
+
"bar_width",
|
|
15
|
+
"palette",
|
|
16
|
+
"ylim",
|
|
17
|
+
"xlab",
|
|
18
|
+
"ylab",
|
|
19
|
+
"title",
|
|
20
|
+
"margin_top",
|
|
21
|
+
"margin_right",
|
|
22
|
+
"margin_bottom",
|
|
23
|
+
"margin_left",
|
|
24
|
+
"legend_position",
|
|
25
|
+
"legend_placement",
|
|
26
|
+
"legend_title",
|
|
27
|
+
]);
|
|
28
|
+
const _everyMember = true;
|
|
29
|
+
void _everyMember;
|
|
30
|
+
/**
|
|
31
|
+
* Build the ECharts option of a bar chart from tabular data and its
|
|
32
|
+
* `chart/bar/v1` config. One bar per row and series; with `group`, the
|
|
33
|
+
* categories are the distinct `x` values and each group adds a series per
|
|
34
|
+
* value column, empty where a category lacks the group. Distinct categories
|
|
35
|
+
* and groups follow their column's levels, then order of appearance.
|
|
36
|
+
*/
|
|
37
|
+
export function buildBarOption(data, config, appearance = {}) {
|
|
38
|
+
const source = data.columns;
|
|
39
|
+
const yColumns = asArray(config.y);
|
|
40
|
+
if (!config.x || yColumns.length === 0) {
|
|
41
|
+
throw new Error("A bar chart needs both `x` and `y` set to draw.");
|
|
42
|
+
}
|
|
43
|
+
const xs = column(source, config.x, "x").map((v) => String(v));
|
|
44
|
+
const aggregate = config.aggregate ?? "none";
|
|
45
|
+
let categories;
|
|
46
|
+
let series;
|
|
47
|
+
if (config.group) {
|
|
48
|
+
const groupValues = column(source, config.group, "group").map((v) => String(v));
|
|
49
|
+
requireOneRowPer(xs, groupValues);
|
|
50
|
+
categories = distinct(xs, data.levels?.[config.x]);
|
|
51
|
+
const groups = distinct(groupValues, data.levels?.[config.group]);
|
|
52
|
+
const at = new Map(categories.map((c, i) => [c, i]));
|
|
53
|
+
series = groups.flatMap((g) => yColumns.map((y) => {
|
|
54
|
+
const values = column(source, y, "y");
|
|
55
|
+
const data = categories.map(() => null);
|
|
56
|
+
xs.forEach((x, row) => {
|
|
57
|
+
const i = at.get(x);
|
|
58
|
+
if (groupValues[row] === g && i !== undefined)
|
|
59
|
+
data[i] = numberOrNull(values[row]);
|
|
60
|
+
});
|
|
61
|
+
const name = groups.length > 1 ? (yColumns.length > 1 ? `${y} / ${g}` : g) : y;
|
|
62
|
+
return { name, data };
|
|
63
|
+
}));
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
if (aggregate !== "none")
|
|
67
|
+
requireOneRowPer(xs);
|
|
68
|
+
categories = xs;
|
|
69
|
+
series = yColumns.map((y) => ({ name: y, data: column(source, y, "y").map(numberOrNull) }));
|
|
70
|
+
}
|
|
71
|
+
const permutation = order(categories, series, config.order ?? "input");
|
|
72
|
+
categories = permutation.map((i) => categories[i]);
|
|
73
|
+
series = series.map((s) => ({ ...s, data: permutation.map((i) => s.data[i] ?? null) }));
|
|
74
|
+
const palette = asArray(config.palette);
|
|
75
|
+
const stack = config.stack ? "total" : undefined;
|
|
76
|
+
const barWidth = typeof config.bar_width === "number" ? config.bar_width : undefined;
|
|
77
|
+
const builtSeries = series.map((s, i) => {
|
|
78
|
+
const single = series.length === 1;
|
|
79
|
+
const perBar = single && palette.length > 1;
|
|
80
|
+
const color = perBar ? undefined : palette.length > 0 ? palette[i % palette.length] : undefined;
|
|
81
|
+
return {
|
|
82
|
+
type: "bar",
|
|
83
|
+
...(single ? {} : { name: s.name }),
|
|
84
|
+
data: perBar
|
|
85
|
+
? s.data.map((value, j) => ({
|
|
86
|
+
value,
|
|
87
|
+
itemStyle: { color: palette[(permutation[j] ?? j) % palette.length] },
|
|
88
|
+
}))
|
|
89
|
+
: s.data,
|
|
90
|
+
...(stack ? { stack } : {}),
|
|
91
|
+
...(barWidth === undefined ? {} : { barWidth }),
|
|
92
|
+
...(color === undefined ? {} : { itemStyle: { color } }),
|
|
93
|
+
};
|
|
94
|
+
});
|
|
95
|
+
const horizontal = config.horizontal ?? false;
|
|
96
|
+
const category = {
|
|
97
|
+
type: "category",
|
|
98
|
+
data: categories,
|
|
99
|
+
axisPointer: { type: "none" },
|
|
100
|
+
axisTick: { show: false },
|
|
101
|
+
};
|
|
102
|
+
const value = {
|
|
103
|
+
type: "value",
|
|
104
|
+
axisTick: { show: false },
|
|
105
|
+
...(config.ylim ? { min: config.ylim[0], max: config.ylim[1] } : {}),
|
|
106
|
+
};
|
|
107
|
+
const xAxis = horizontal ? value : category;
|
|
108
|
+
const yAxis = horizontal ? category : value;
|
|
109
|
+
if (config.xlab)
|
|
110
|
+
Object.assign(xAxis, { name: config.xlab, nameLocation: "middle" });
|
|
111
|
+
if (config.ylab)
|
|
112
|
+
Object.assign(yAxis, { name: config.ylab, nameLocation: "middle" });
|
|
113
|
+
const grid = cartesianGrid(config, Boolean(config.xlab || config.ylab));
|
|
114
|
+
const dataZoom = config.zoom ? axisZoom(horizontal ? "y" : "x", grid) : undefined;
|
|
115
|
+
return {
|
|
116
|
+
...(config.title ? { title: { text: config.title } } : {}),
|
|
117
|
+
tooltip: { trigger: "axis" },
|
|
118
|
+
...(series.length > 1 ? { legend: { data: series.map((s) => s.name) } } : {}),
|
|
119
|
+
xAxis,
|
|
120
|
+
yAxis,
|
|
121
|
+
grid,
|
|
122
|
+
...(dataZoom ? { dataZoom } : {}),
|
|
123
|
+
series: builtSeries,
|
|
124
|
+
...(appearance.animation === undefined ? {} : { animation: appearance.animation }),
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
/** The category permutation for an order: input order, or stable by total across series. */
|
|
128
|
+
function order(categories, series, how) {
|
|
129
|
+
const index = categories.map((_, i) => i);
|
|
130
|
+
if (how === "input")
|
|
131
|
+
return index;
|
|
132
|
+
const total = (i) => series.reduce((sum, s) => sum + (s.data[i] ?? 0), 0);
|
|
133
|
+
const sign = how === "increasing" ? 1 : -1;
|
|
134
|
+
return index.sort((a, b) => sign * (total(a) - total(b)) || a - b);
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Stop when two rows share a category (and group): with `group` or
|
|
138
|
+
* `aggregate` set, a bar is one category and group, combined by the host.
|
|
139
|
+
*/
|
|
140
|
+
function requireOneRowPer(xs, groups) {
|
|
141
|
+
const seen = new Set();
|
|
142
|
+
xs.forEach((x, row) => {
|
|
143
|
+
const key = groups ? `${x}\u0000${groups[row]}` : x;
|
|
144
|
+
if (seen.has(key)) {
|
|
145
|
+
const where = groups ? `category '${x}' in group '${groups[row]}'` : `category '${x}'`;
|
|
146
|
+
throw new Error(`Several rows hold ${where}. Combine them before building, as the \`aggregate\` member says (sum, mean, median, or count).`);
|
|
147
|
+
}
|
|
148
|
+
seen.add(key);
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/charts/bar/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAsB,MAAM,wBAAwB,CAAC;AAErF,OAAO,EACL,OAAO,EAEP,MAAM,EACN,QAAQ,EACR,YAAY,GAEb,MAAM,wBAAwB,CAAC;A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AE,wBAAwB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/charts/bar/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,16 +3,26 @@
|
|
|
3
3
|
* takes a chart's data and its `chart/<type>/v1` config and returns the
|
|
4
4
|
* ECharts option.
|
|
5
5
|
*
|
|
6
|
-
* spec: draw/shared-builders#
|
|
6
|
+
* spec: draw/shared-builders#package
|
|
7
7
|
*
|
|
8
8
|
* @module
|
|
9
9
|
*/
|
|
10
10
|
import { buildA3Option } from "./charts/a3/index.ts";
|
|
11
|
-
|
|
12
|
-
export {
|
|
11
|
+
import { buildBarOption } from "./charts/bar/index.ts";
|
|
12
|
+
export type { A3Appearance, A3ChartConfig, A3EChartsOption, A3PtmPlacement, A3SurfaceHints, } from "./charts/a3/index.ts";
|
|
13
|
+
export { A3_CHART_CONFIG_MEMBERS, a3SurfaceHints, buildA3Option } from "./charts/a3/index.ts";
|
|
14
|
+
export type { BarAppearance, BarChartConfig } from "./charts/bar/index.ts";
|
|
15
|
+
export { BAR_CHART_CONFIG_MEMBERS, buildBarOption } from "./charts/bar/index.ts";
|
|
16
|
+
export type { MarginMembers } from "./shared/layout.ts";
|
|
17
|
+
export { DEFAULT_MARGIN, ZOOM_SLIDER_ID } from "./shared/layout.ts";
|
|
18
|
+
export type { LegendMembers } from "./shared/legend.ts";
|
|
19
|
+
export type { ColumnarSource, ColumnNames, TabularData } from "./shared/source.ts";
|
|
20
|
+
export type { ColorScheme, ThemeTokens } from "./theme/tokens.ts";
|
|
21
|
+
export { DEFAULT_FONT_FAMILY, darkThemeTokens, fontStack, lightThemeTokens, RTEMIS_PALETTE, SIGN_COLORS, themeFontSizes, themeOption, } from "./theme/tokens.ts";
|
|
13
22
|
/** The builder of each chart type, by `chart/<type>/v1` type name. */
|
|
14
23
|
export declare const builders: Readonly<{
|
|
15
24
|
a3: typeof buildA3Option;
|
|
25
|
+
bar: typeof buildBarOption;
|
|
16
26
|
}>;
|
|
17
27
|
/** A chart type with a builder in this package. */
|
|
18
28
|
export type ChartType = keyof typeof builders;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,YAAY,EACV,YAAY,EACZ,aAAa,EACb,eAAe,EACf,cAAc,EACd,cAAc,GACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC9F,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACjF,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACnF,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,cAAc,EACd,WAAW,GACZ,MAAM,mBAAmB,CAAC;AAE3B,sEAAsE;AACtE,eAAO,MAAM,QAAQ;;;EAGnB,CAAC;AAEH,mDAAmD;AACnD,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,QAAQ,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3,14 +3,19 @@
|
|
|
3
3
|
* takes a chart's data and its `chart/<type>/v1` config and returns the
|
|
4
4
|
* ECharts option.
|
|
5
5
|
*
|
|
6
|
-
* spec: draw/shared-builders#
|
|
6
|
+
* spec: draw/shared-builders#package
|
|
7
7
|
*
|
|
8
8
|
* @module
|
|
9
9
|
*/
|
|
10
10
|
import { buildA3Option } from "./charts/a3/index.js";
|
|
11
|
-
|
|
11
|
+
import { buildBarOption } from "./charts/bar/index.js";
|
|
12
|
+
export { A3_CHART_CONFIG_MEMBERS, a3SurfaceHints, buildA3Option } from "./charts/a3/index.js";
|
|
13
|
+
export { BAR_CHART_CONFIG_MEMBERS, buildBarOption } from "./charts/bar/index.js";
|
|
14
|
+
export { DEFAULT_MARGIN, ZOOM_SLIDER_ID } from "./shared/layout.js";
|
|
15
|
+
export { DEFAULT_FONT_FAMILY, darkThemeTokens, fontStack, lightThemeTokens, RTEMIS_PALETTE, SIGN_COLORS, themeFontSizes, themeOption, } from "./theme/tokens.js";
|
|
12
16
|
/** The builder of each chart type, by `chart/<type>/v1` type name. */
|
|
13
17
|
export const builders = Object.freeze({
|
|
14
18
|
a3: buildA3Option,
|
|
19
|
+
bar: buildBarOption,
|
|
15
20
|
});
|
|
16
21
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AASvD,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE9F,OAAO,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEjF,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIpE,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,cAAc,EACd,WAAW,GACZ,MAAM,mBAAmB,CAAC;AAE3B,sEAAsE;AACtE,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC;IACpC,EAAE,EAAE,aAAa;IACjB,GAAG,EAAE,cAAc;CACpB,CAAC,CAAC"}
|