canvasxpress 71.7.0 → 71.8.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/package.json +1 -1
- package/src/canvasXpress.d.mts +47 -4
- package/src/canvasXpress.d.ts +47 -4
- package/src/canvasXpress.js +3 -3
package/package.json
CHANGED
package/src/canvasXpress.d.mts
CHANGED
|
@@ -31,12 +31,34 @@ export interface CXData {
|
|
|
31
31
|
[key: string]: unknown;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* User-event hooks fired by the engine. Each handler is called with
|
|
36
|
+
* `this` bound to the chart instance and three arguments: `o` (the resolved
|
|
37
|
+
* data object under the cursor, or null off any element), `e` (the native DOM
|
|
38
|
+
* event) and `t` (the chart instance — prefer this over `this`).
|
|
39
|
+
*/
|
|
35
40
|
export interface CXEvents {
|
|
41
|
+
/** A data element is clicked. */
|
|
36
42
|
click?: (o: any, e: MouseEvent, t: CanvasXpressInstance) => void;
|
|
43
|
+
/** A legend item is clicked. */
|
|
44
|
+
clicklegend?: (o: any, e: MouseEvent, t: CanvasXpressInstance) => void;
|
|
45
|
+
/** A data element is double-clicked. */
|
|
37
46
|
dblclick?: (o: any, e: MouseEvent, t: CanvasXpressInstance) => void;
|
|
47
|
+
/** Fired continuously during a drag operation. */
|
|
48
|
+
drag?: (o: any, e: MouseEvent, t: CanvasXpressInstance) => void;
|
|
49
|
+
/** Network graphs: a node drag has finished. */
|
|
50
|
+
enddragnode?: (o: any, e: MouseEvent, t: CanvasXpressInstance) => void;
|
|
51
|
+
/** Fired once after rendering completes. */
|
|
52
|
+
enddraw?: (o: any, e: Event, t: CanvasXpressInstance) => void;
|
|
38
53
|
mousemove?: (o: any, e: MouseEvent, t: CanvasXpressInstance) => void;
|
|
39
54
|
mouseout?: (o: any, e: MouseEvent, t: CanvasXpressInstance) => void;
|
|
55
|
+
mouseover?: (o: any, e: MouseEvent, t: CanvasXpressInstance) => void;
|
|
56
|
+
mouseup?: (o: any, e: MouseEvent, t: CanvasXpressInstance) => void;
|
|
57
|
+
/** The chart was updated by a remote source. */
|
|
58
|
+
remoteupdate?: (o: any, e: Event, t: CanvasXpressInstance) => void;
|
|
59
|
+
/** Fired after a selection of data points has been made. */
|
|
60
|
+
select?: (o: any, e: MouseEvent, t: CanvasXpressInstance) => void;
|
|
61
|
+
wheel?: (o: any, e: WheelEvent, t: CanvasXpressInstance) => void;
|
|
40
62
|
[key: string]: ((o: any, e: any, t: CanvasXpressInstance) => void) | undefined;
|
|
41
63
|
}
|
|
42
64
|
|
|
@@ -123,7 +145,7 @@ export type CXGraphType =
|
|
|
123
145
|
|
|
124
146
|
/**
|
|
125
147
|
* Full chart configuration — one property per parameter in the CanvasXpress
|
|
126
|
-
* config schema (
|
|
148
|
+
* config schema (1782 keys). String enums become open literal
|
|
127
149
|
* unions (except `graphType`, which is closed); `@graphTypes` in a key's JSDoc
|
|
128
150
|
* lists the graph types it applies to (absent = all). The index signature keeps
|
|
129
151
|
* obfuscation aliases and any newer key valid. See `CXConfigFor<G>` for the
|
|
@@ -1587,10 +1609,13 @@ export interface CXConfig {
|
|
|
1587
1609
|
dataPipeline?: unknown[] | boolean | string | number;
|
|
1588
1610
|
/**
|
|
1589
1611
|
* Approximate pixel size for the data points in scatter plots, dotplots and boxplots. The
|
|
1590
|
-
* size will be adjusted according to the dimensions of the graph
|
|
1612
|
+
* size will be adjusted according to the dimensions of the graph. Boxplots and dotplots
|
|
1613
|
+
* default to 15 (to match ggplot2 geom_point) unless set explicitly. Set to the string
|
|
1614
|
+
* "auto" to size scatter points from the plot area, damped by the number of points (larger
|
|
1615
|
+
* dots on sparse/large panels, smaller on dense ones)
|
|
1591
1616
|
* @default 10
|
|
1592
1617
|
*/
|
|
1593
|
-
dataPointSize?: number | boolean;
|
|
1618
|
+
dataPointSize?: number | boolean | "auto";
|
|
1594
1619
|
/**
|
|
1595
1620
|
* Factor used to adjust the size of the dataPointSize
|
|
1596
1621
|
* @default 1
|
|
@@ -6817,6 +6842,14 @@ export interface CXConfig {
|
|
|
6817
6842
|
* @default []
|
|
6818
6843
|
*/
|
|
6819
6844
|
segregateVariablesBy?: unknown[] | boolean | string | number;
|
|
6845
|
+
/**
|
|
6846
|
+
* Flag to make fit lines and confidence areas (regression, loess, forecast, Kaplan-Meier
|
|
6847
|
+
* curves/bands, area/ribbon) clickable: a click selects and broadcasts the data the
|
|
6848
|
+
* fit/curve was computed over (e.g. a KM arm selects its whole cohort)
|
|
6849
|
+
* @graphTypes Scatter2D
|
|
6850
|
+
* @default true
|
|
6851
|
+
*/
|
|
6852
|
+
selectableFits?: boolean;
|
|
6820
6853
|
/**
|
|
6821
6854
|
* Variable / Sample names of data points (in the data object) to initially select
|
|
6822
6855
|
* @default []
|
|
@@ -8022,6 +8055,14 @@ export interface CXConfig {
|
|
|
8022
8055
|
* @default 0
|
|
8023
8056
|
*/
|
|
8024
8057
|
smpTextRotate?: number | boolean;
|
|
8058
|
+
/**
|
|
8059
|
+
* Flag to automatically keep the sample (or grouping-factor) labels of vertical
|
|
8060
|
+
* one-dimensional plots horizontal when the longest label fits its band, falling back to
|
|
8061
|
+
* smpTextRotate otherwise. Re-evaluated on resize
|
|
8062
|
+
* @graphTypes Alluvial, Area, AreaLine, Bar, BarLine, Boxplot … (65 types; see CXGraphTypeKeys)
|
|
8063
|
+
* @default true
|
|
8064
|
+
*/
|
|
8065
|
+
smpTextRotateAuto?: boolean;
|
|
8025
8066
|
/**
|
|
8026
8067
|
* Scaling factor used to increase or decrease the sample labels font size in the canvas
|
|
8027
8068
|
* @graphTypes Alluvial, Area, AreaLine, Bar, BarLine, Boxplot … (65 types; see CXGraphTypeKeys)
|
|
@@ -11326,6 +11367,7 @@ export type CXKeysConfidenceIntervals =
|
|
|
11326
11367
|
| "confidenceIntervalColorCoordinate"
|
|
11327
11368
|
| "confidenceIntervalsMax"
|
|
11328
11369
|
| "confidenceLevel"
|
|
11370
|
+
| "selectableFits"
|
|
11329
11371
|
| "showConfidenceIntervals";
|
|
11330
11372
|
/** Config keys in the "Context Menu" category. */
|
|
11331
11373
|
export type CXKeysContextMenu =
|
|
@@ -12585,6 +12627,7 @@ export type CXKeysSamples =
|
|
|
12585
12627
|
| "smpTextFontStyle"
|
|
12586
12628
|
| "smpTextMargin"
|
|
12587
12629
|
| "smpTextRotate"
|
|
12630
|
+
| "smpTextRotateAuto"
|
|
12588
12631
|
| "smpTextScaleFontFactor"
|
|
12589
12632
|
| "smpTitle"
|
|
12590
12633
|
| "smpTitleAlign"
|
package/src/canvasXpress.d.ts
CHANGED
|
@@ -40,12 +40,34 @@ declare namespace CanvasXpress {
|
|
|
40
40
|
[key: string]: unknown;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* User-event hooks fired by the engine. Each handler is called with
|
|
45
|
+
* `this` bound to the chart instance and three arguments: `o` (the resolved
|
|
46
|
+
* data object under the cursor, or null off any element), `e` (the native DOM
|
|
47
|
+
* event) and `t` (the chart instance — prefer this over `this`).
|
|
48
|
+
*/
|
|
44
49
|
export interface CXEvents {
|
|
50
|
+
/** A data element is clicked. */
|
|
45
51
|
click?: (o: any, e: MouseEvent, t: CanvasXpressInstance) => void;
|
|
52
|
+
/** A legend item is clicked. */
|
|
53
|
+
clicklegend?: (o: any, e: MouseEvent, t: CanvasXpressInstance) => void;
|
|
54
|
+
/** A data element is double-clicked. */
|
|
46
55
|
dblclick?: (o: any, e: MouseEvent, t: CanvasXpressInstance) => void;
|
|
56
|
+
/** Fired continuously during a drag operation. */
|
|
57
|
+
drag?: (o: any, e: MouseEvent, t: CanvasXpressInstance) => void;
|
|
58
|
+
/** Network graphs: a node drag has finished. */
|
|
59
|
+
enddragnode?: (o: any, e: MouseEvent, t: CanvasXpressInstance) => void;
|
|
60
|
+
/** Fired once after rendering completes. */
|
|
61
|
+
enddraw?: (o: any, e: Event, t: CanvasXpressInstance) => void;
|
|
47
62
|
mousemove?: (o: any, e: MouseEvent, t: CanvasXpressInstance) => void;
|
|
48
63
|
mouseout?: (o: any, e: MouseEvent, t: CanvasXpressInstance) => void;
|
|
64
|
+
mouseover?: (o: any, e: MouseEvent, t: CanvasXpressInstance) => void;
|
|
65
|
+
mouseup?: (o: any, e: MouseEvent, t: CanvasXpressInstance) => void;
|
|
66
|
+
/** The chart was updated by a remote source. */
|
|
67
|
+
remoteupdate?: (o: any, e: Event, t: CanvasXpressInstance) => void;
|
|
68
|
+
/** Fired after a selection of data points has been made. */
|
|
69
|
+
select?: (o: any, e: MouseEvent, t: CanvasXpressInstance) => void;
|
|
70
|
+
wheel?: (o: any, e: WheelEvent, t: CanvasXpressInstance) => void;
|
|
49
71
|
[key: string]: ((o: any, e: any, t: CanvasXpressInstance) => void) | undefined;
|
|
50
72
|
}
|
|
51
73
|
|
|
@@ -132,7 +154,7 @@ declare namespace CanvasXpress {
|
|
|
132
154
|
|
|
133
155
|
/**
|
|
134
156
|
* Full chart configuration — one property per parameter in the CanvasXpress
|
|
135
|
-
* config schema (
|
|
157
|
+
* config schema (1782 keys). String enums become open literal
|
|
136
158
|
* unions (except `graphType`, which is closed); `@graphTypes` in a key's JSDoc
|
|
137
159
|
* lists the graph types it applies to (absent = all). The index signature keeps
|
|
138
160
|
* obfuscation aliases and any newer key valid. See `CXConfigFor<G>` for the
|
|
@@ -1596,10 +1618,13 @@ declare namespace CanvasXpress {
|
|
|
1596
1618
|
dataPipeline?: unknown[] | boolean | string | number;
|
|
1597
1619
|
/**
|
|
1598
1620
|
* Approximate pixel size for the data points in scatter plots, dotplots and boxplots. The
|
|
1599
|
-
* size will be adjusted according to the dimensions of the graph
|
|
1621
|
+
* size will be adjusted according to the dimensions of the graph. Boxplots and dotplots
|
|
1622
|
+
* default to 15 (to match ggplot2 geom_point) unless set explicitly. Set to the string
|
|
1623
|
+
* "auto" to size scatter points from the plot area, damped by the number of points (larger
|
|
1624
|
+
* dots on sparse/large panels, smaller on dense ones)
|
|
1600
1625
|
* @default 10
|
|
1601
1626
|
*/
|
|
1602
|
-
dataPointSize?: number | boolean;
|
|
1627
|
+
dataPointSize?: number | boolean | "auto";
|
|
1603
1628
|
/**
|
|
1604
1629
|
* Factor used to adjust the size of the dataPointSize
|
|
1605
1630
|
* @default 1
|
|
@@ -6826,6 +6851,14 @@ declare namespace CanvasXpress {
|
|
|
6826
6851
|
* @default []
|
|
6827
6852
|
*/
|
|
6828
6853
|
segregateVariablesBy?: unknown[] | boolean | string | number;
|
|
6854
|
+
/**
|
|
6855
|
+
* Flag to make fit lines and confidence areas (regression, loess, forecast, Kaplan-Meier
|
|
6856
|
+
* curves/bands, area/ribbon) clickable: a click selects and broadcasts the data the
|
|
6857
|
+
* fit/curve was computed over (e.g. a KM arm selects its whole cohort)
|
|
6858
|
+
* @graphTypes Scatter2D
|
|
6859
|
+
* @default true
|
|
6860
|
+
*/
|
|
6861
|
+
selectableFits?: boolean;
|
|
6829
6862
|
/**
|
|
6830
6863
|
* Variable / Sample names of data points (in the data object) to initially select
|
|
6831
6864
|
* @default []
|
|
@@ -8031,6 +8064,14 @@ declare namespace CanvasXpress {
|
|
|
8031
8064
|
* @default 0
|
|
8032
8065
|
*/
|
|
8033
8066
|
smpTextRotate?: number | boolean;
|
|
8067
|
+
/**
|
|
8068
|
+
* Flag to automatically keep the sample (or grouping-factor) labels of vertical
|
|
8069
|
+
* one-dimensional plots horizontal when the longest label fits its band, falling back to
|
|
8070
|
+
* smpTextRotate otherwise. Re-evaluated on resize
|
|
8071
|
+
* @graphTypes Alluvial, Area, AreaLine, Bar, BarLine, Boxplot … (65 types; see CXGraphTypeKeys)
|
|
8072
|
+
* @default true
|
|
8073
|
+
*/
|
|
8074
|
+
smpTextRotateAuto?: boolean;
|
|
8034
8075
|
/**
|
|
8035
8076
|
* Scaling factor used to increase or decrease the sample labels font size in the canvas
|
|
8036
8077
|
* @graphTypes Alluvial, Area, AreaLine, Bar, BarLine, Boxplot … (65 types; see CXGraphTypeKeys)
|
|
@@ -11335,6 +11376,7 @@ declare namespace CanvasXpress {
|
|
|
11335
11376
|
| "confidenceIntervalColorCoordinate"
|
|
11336
11377
|
| "confidenceIntervalsMax"
|
|
11337
11378
|
| "confidenceLevel"
|
|
11379
|
+
| "selectableFits"
|
|
11338
11380
|
| "showConfidenceIntervals";
|
|
11339
11381
|
/** Config keys in the "Context Menu" category. */
|
|
11340
11382
|
export type CXKeysContextMenu =
|
|
@@ -12594,6 +12636,7 @@ declare namespace CanvasXpress {
|
|
|
12594
12636
|
| "smpTextFontStyle"
|
|
12595
12637
|
| "smpTextMargin"
|
|
12596
12638
|
| "smpTextRotate"
|
|
12639
|
+
| "smpTextRotateAuto"
|
|
12597
12640
|
| "smpTextScaleFontFactor"
|
|
12598
12641
|
| "smpTitle"
|
|
12599
12642
|
| "smpTitleAlign"
|