tinybase 8.5.0-beta.3 → 8.5.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/@types/ui-react-dom/index.d.ts +10 -10
- package/@types/ui-react-dom/with-schemas/index.d.ts +10 -10
- package/@types/ui-react-dom-charts/index.d.ts +177 -44
- package/@types/ui-react-dom-charts/with-schemas/index.d.ts +187 -48
- package/@types/ui-react-inspector/index.d.ts +1 -1
- package/@types/ui-react-inspector/with-schemas/index.d.ts +1 -1
- package/@types/ui-solid-dom/index.d.ts +10 -10
- package/@types/ui-solid-dom/with-schemas/index.d.ts +10 -10
- package/@types/ui-solid-inspector/index.d.ts +1 -1
- package/@types/ui-solid-inspector/with-schemas/index.d.ts +1 -1
- package/@types/ui-svelte-dom/index.d.ts +10 -10
- package/@types/ui-svelte-dom/with-schemas/index.d.ts +10 -10
- package/@types/ui-svelte-inspector/index.d.ts +1 -1
- package/@types/ui-svelte-inspector/with-schemas/index.d.ts +1 -1
- package/common/index.js +1 -1
- package/common/with-schemas/index.js +1 -1
- package/index.js +3 -2
- package/mergeable-store/index.js +3 -2
- package/mergeable-store/with-schemas/index.js +3 -2
- package/min/index.js +1 -1
- package/min/index.js.gz +0 -0
- package/min/mergeable-store/index.js +1 -1
- package/min/mergeable-store/index.js.gz +0 -0
- package/min/mergeable-store/with-schemas/index.js +1 -1
- package/min/mergeable-store/with-schemas/index.js.gz +0 -0
- package/min/omni/index.js +1 -1
- package/min/omni/index.js.gz +0 -0
- package/min/omni/with-schemas/index.js +1 -1
- package/min/omni/with-schemas/index.js.gz +0 -0
- package/min/persisters/index.js +1 -1
- package/min/persisters/index.js.gz +0 -0
- package/min/persisters/persister-cr-sqlite-wasm/index.js +1 -1
- package/min/persisters/persister-cr-sqlite-wasm/index.js.gz +0 -0
- package/min/persisters/persister-cr-sqlite-wasm/with-schemas/index.js +1 -1
- package/min/persisters/persister-cr-sqlite-wasm/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-durable-object-sql-storage/index.js +1 -1
- package/min/persisters/persister-durable-object-sql-storage/index.js.gz +0 -0
- package/min/persisters/persister-durable-object-sql-storage/with-schemas/index.js +1 -1
- package/min/persisters/persister-durable-object-sql-storage/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-electric-sql/index.js +1 -1
- package/min/persisters/persister-electric-sql/index.js.gz +0 -0
- package/min/persisters/persister-electric-sql/with-schemas/index.js +1 -1
- package/min/persisters/persister-electric-sql/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-expo-sqlite/index.js +1 -1
- package/min/persisters/persister-expo-sqlite/index.js.gz +0 -0
- package/min/persisters/persister-expo-sqlite/with-schemas/index.js +1 -1
- package/min/persisters/persister-expo-sqlite/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-libsql/index.js +1 -1
- package/min/persisters/persister-libsql/index.js.gz +0 -0
- package/min/persisters/persister-libsql/with-schemas/index.js +1 -1
- package/min/persisters/persister-libsql/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-pglite/index.js +1 -1
- package/min/persisters/persister-pglite/index.js.gz +0 -0
- package/min/persisters/persister-pglite/with-schemas/index.js +1 -1
- package/min/persisters/persister-pglite/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-postgres/index.js +1 -1
- package/min/persisters/persister-postgres/index.js.gz +0 -0
- package/min/persisters/persister-postgres/with-schemas/index.js +1 -1
- package/min/persisters/persister-postgres/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-powersync/index.js +1 -1
- package/min/persisters/persister-powersync/index.js.gz +0 -0
- package/min/persisters/persister-powersync/with-schemas/index.js +1 -1
- package/min/persisters/persister-powersync/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-react-native-sqlite/index.js +1 -1
- package/min/persisters/persister-react-native-sqlite/index.js.gz +0 -0
- package/min/persisters/persister-react-native-sqlite/with-schemas/index.js +1 -1
- package/min/persisters/persister-react-native-sqlite/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-remote/index.js +1 -1
- package/min/persisters/persister-remote/index.js.gz +0 -0
- package/min/persisters/persister-remote/with-schemas/index.js +1 -1
- package/min/persisters/persister-remote/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-sqlite-bun/index.js +1 -1
- package/min/persisters/persister-sqlite-bun/index.js.gz +0 -0
- package/min/persisters/persister-sqlite-bun/with-schemas/index.js +1 -1
- package/min/persisters/persister-sqlite-bun/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-sqlite-wasm/index.js +1 -1
- package/min/persisters/persister-sqlite-wasm/index.js.gz +0 -0
- package/min/persisters/persister-sqlite-wasm/with-schemas/index.js +1 -1
- package/min/persisters/persister-sqlite-wasm/with-schemas/index.js.gz +0 -0
- package/min/persisters/persister-sqlite3/index.js +1 -1
- package/min/persisters/persister-sqlite3/index.js.gz +0 -0
- package/min/persisters/persister-sqlite3/with-schemas/index.js +1 -1
- package/min/persisters/persister-sqlite3/with-schemas/index.js.gz +0 -0
- package/min/persisters/with-schemas/index.js +1 -1
- package/min/persisters/with-schemas/index.js.gz +0 -0
- package/min/synchronizers/index.js +1 -1
- package/min/synchronizers/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-broadcast-channel/index.js +1 -1
- package/min/synchronizers/synchronizer-broadcast-channel/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js +1 -1
- package/min/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-local/index.js +1 -1
- package/min/synchronizers/synchronizer-local/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-local/with-schemas/index.js +1 -1
- package/min/synchronizers/synchronizer-local/with-schemas/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-ws-client/index.js +1 -1
- package/min/synchronizers/synchronizer-ws-client/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-ws-client/with-schemas/index.js +1 -1
- package/min/synchronizers/synchronizer-ws-client/with-schemas/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-ws-server/index.js +1 -1
- package/min/synchronizers/synchronizer-ws-server/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-ws-server/with-schemas/index.js +1 -1
- package/min/synchronizers/synchronizer-ws-server/with-schemas/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-ws-server-durable-object/index.js +1 -1
- package/min/synchronizers/synchronizer-ws-server-durable-object/index.js.gz +0 -0
- package/min/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js +1 -1
- package/min/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js.gz +0 -0
- package/min/synchronizers/with-schemas/index.js +1 -1
- package/min/synchronizers/with-schemas/index.js.gz +0 -0
- package/min/ui-react-dom-charts/index.js +1 -1
- package/min/ui-react-dom-charts/index.js.gz +0 -0
- package/min/ui-react-dom-charts/with-schemas/index.js +1 -1
- package/min/ui-react-dom-charts/with-schemas/index.js.gz +0 -0
- package/min/with-schemas/index.js +1 -1
- package/min/with-schemas/index.js.gz +0 -0
- package/omni/index.js +7 -6
- package/omni/with-schemas/index.js +7 -6
- package/package.json +4 -4
- package/persisters/index.js +1 -1
- package/persisters/persister-cr-sqlite-wasm/index.js +1 -1
- package/persisters/persister-cr-sqlite-wasm/with-schemas/index.js +1 -1
- package/persisters/persister-durable-object-sql-storage/index.js +1 -1
- package/persisters/persister-durable-object-sql-storage/with-schemas/index.js +1 -1
- package/persisters/persister-electric-sql/index.js +1 -1
- package/persisters/persister-electric-sql/with-schemas/index.js +1 -1
- package/persisters/persister-expo-sqlite/index.js +1 -1
- package/persisters/persister-expo-sqlite/with-schemas/index.js +1 -1
- package/persisters/persister-libsql/index.js +1 -1
- package/persisters/persister-libsql/with-schemas/index.js +1 -1
- package/persisters/persister-pglite/index.js +1 -1
- package/persisters/persister-pglite/with-schemas/index.js +1 -1
- package/persisters/persister-postgres/index.js +1 -1
- package/persisters/persister-postgres/with-schemas/index.js +1 -1
- package/persisters/persister-powersync/index.js +1 -1
- package/persisters/persister-powersync/with-schemas/index.js +1 -1
- package/persisters/persister-react-native-sqlite/index.js +1 -1
- package/persisters/persister-react-native-sqlite/with-schemas/index.js +1 -1
- package/persisters/persister-remote/index.js +3 -3
- package/persisters/persister-remote/with-schemas/index.js +3 -3
- package/persisters/persister-sqlite-bun/index.js +1 -1
- package/persisters/persister-sqlite-bun/with-schemas/index.js +1 -1
- package/persisters/persister-sqlite-wasm/index.js +1 -1
- package/persisters/persister-sqlite-wasm/with-schemas/index.js +1 -1
- package/persisters/persister-sqlite3/index.js +1 -1
- package/persisters/persister-sqlite3/with-schemas/index.js +1 -1
- package/persisters/with-schemas/index.js +1 -1
- package/readme.md +14 -14
- package/releases.md +57 -57
- package/synchronizers/index.js +2 -1
- package/synchronizers/synchronizer-broadcast-channel/index.js +2 -1
- package/synchronizers/synchronizer-broadcast-channel/with-schemas/index.js +2 -1
- package/synchronizers/synchronizer-local/index.js +2 -1
- package/synchronizers/synchronizer-local/with-schemas/index.js +2 -1
- package/synchronizers/synchronizer-ws-client/index.js +2 -1
- package/synchronizers/synchronizer-ws-client/with-schemas/index.js +2 -1
- package/synchronizers/synchronizer-ws-server/index.js +2 -1
- package/synchronizers/synchronizer-ws-server/with-schemas/index.js +2 -1
- package/synchronizers/synchronizer-ws-server-durable-object/index.js +2 -1
- package/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js +2 -1
- package/synchronizers/with-schemas/index.js +2 -1
- package/ui-react-dom-charts/index.js +688 -324
- package/ui-react-dom-charts/with-schemas/index.js +688 -324
- package/with-schemas/index.js +3 -2
|
@@ -692,7 +692,7 @@ export type SortedTablePaginatorProps = {
|
|
|
692
692
|
*
|
|
693
693
|
* See the <TableInHtmlTable /> (React) demo for this component in action:
|
|
694
694
|
*
|
|
695
|
-
* 
|
|
697
697
|
*
|
|
698
698
|
* The component's props identify which Table to render based on Table Id, and
|
|
@@ -838,7 +838,7 @@ export function TableInHtmlTable(
|
|
|
838
838
|
* See the <SortedTableInHtmlTable /> (React) demo for this component in
|
|
839
839
|
* action:
|
|
840
840
|
*
|
|
841
|
-
* 
|
|
843
843
|
*
|
|
844
844
|
* The component's props identify which Table to render based on Table Id, and
|
|
@@ -1011,7 +1011,7 @@ export function SortedTableInHtmlTable(
|
|
|
1011
1011
|
*
|
|
1012
1012
|
* See the <ValuesInHtmlTable /> (React) demo for this component in action:
|
|
1013
1013
|
*
|
|
1014
|
-
* 
|
|
1016
1016
|
*
|
|
1017
1017
|
* The component's props identify which Row to render based on Table Id, Row Id,
|
|
@@ -1142,7 +1142,7 @@ export function ValuesInHtmlTable(
|
|
|
1142
1142
|
*
|
|
1143
1143
|
* See the <SliceInHtmlTable /> (React) demo for this component in action:
|
|
1144
1144
|
*
|
|
1145
|
-
* 
|
|
1147
1147
|
*
|
|
1148
1148
|
* The component's props identify which Slice to render based on Index Id, Slice
|
|
@@ -1300,7 +1300,7 @@ export function SliceInHtmlTable(
|
|
|
1300
1300
|
* See the <RelationshipInHtmlTable /> (React) demo for this component in
|
|
1301
1301
|
* action:
|
|
1302
1302
|
*
|
|
1303
|
-
* 
|
|
1305
1305
|
*
|
|
1306
1306
|
* The component's props identify which Relationship to render based on
|
|
@@ -1478,7 +1478,7 @@ export function RelationshipInHtmlTable(
|
|
|
1478
1478
|
* See the <ResultTableInHtmlTable /> (React) demo for this component in
|
|
1479
1479
|
* action:
|
|
1480
1480
|
*
|
|
1481
|
-
* 
|
|
1483
1483
|
*
|
|
1484
1484
|
* The component's props identify which ResultTable to render based on query Id,
|
|
@@ -1631,7 +1631,7 @@ export function ResultTableInHtmlTable(
|
|
|
1631
1631
|
* See the <ResultSortedTableInHtmlTable /> (React) demo for this component in
|
|
1632
1632
|
* action:
|
|
1633
1633
|
*
|
|
1634
|
-
* 
|
|
1636
1636
|
*
|
|
1637
1637
|
* The component's props identify which ResultTable to render based on query Id,
|
|
@@ -1805,7 +1805,7 @@ export function ResultSortedTableInHtmlTable(
|
|
|
1805
1805
|
*
|
|
1806
1806
|
* See the <EditableCellView /> (React) demo for this component in action:
|
|
1807
1807
|
*
|
|
1808
|
-
* 
|
|
1810
1810
|
*
|
|
1811
1811
|
* The component's props identify which Cell to render based on Table Id, Row
|
|
@@ -1876,7 +1876,7 @@ export function EditableCellView(
|
|
|
1876
1876
|
*
|
|
1877
1877
|
* See the <EditableValueView /> (React) demo for this component in action:
|
|
1878
1878
|
*
|
|
1879
|
-
* 
|
|
1881
1881
|
*
|
|
1882
1882
|
* The component's props identify which Value to render based on Table Id, Row
|
|
@@ -1947,7 +1947,7 @@ export function EditableValueView(
|
|
|
1947
1947
|
* See the <SortedTableInHtmlTable /> (React) demo for this component in
|
|
1948
1948
|
* action:
|
|
1949
1949
|
*
|
|
1950
|
-
* 
|
|
1952
1952
|
*
|
|
1953
1953
|
* The component displays 'previous' and 'next' buttons for paging through the
|
|
@@ -674,7 +674,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
674
674
|
*
|
|
675
675
|
* See the <TableInHtmlTable /> (React) demo for this component in action:
|
|
676
676
|
*
|
|
677
|
-
* 
|
|
679
679
|
*
|
|
680
680
|
* The component's props identify which Table to render based on Table Id, and
|
|
@@ -828,7 +828,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
828
828
|
* See the <SortedTableInHtmlTable /> (React) demo for this component in
|
|
829
829
|
* action:
|
|
830
830
|
*
|
|
831
|
-
* 
|
|
833
833
|
*
|
|
834
834
|
* The component's props identify which Table to render based on Table Id, and
|
|
@@ -1009,7 +1009,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1009
1009
|
*
|
|
1010
1010
|
* See the <ValuesInHtmlTable /> (React) demo for this component in action:
|
|
1011
1011
|
*
|
|
1012
|
-
* 
|
|
1014
1014
|
*
|
|
1015
1015
|
* The component's props identify which Row to render based on Table Id, Row Id,
|
|
@@ -1148,7 +1148,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1148
1148
|
*
|
|
1149
1149
|
* See the <SliceInHtmlTable /> (React) demo for this component in action:
|
|
1150
1150
|
*
|
|
1151
|
-
* 
|
|
1153
1153
|
*
|
|
1154
1154
|
* The component's props identify which Slice to render based on Index Id, Slice
|
|
@@ -1314,7 +1314,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1314
1314
|
* See the <RelationshipInHtmlTable /> (React) demo for this component in
|
|
1315
1315
|
* action:
|
|
1316
1316
|
*
|
|
1317
|
-
* 
|
|
1319
1319
|
*
|
|
1320
1320
|
* The component's props identify which Relationship to render based on
|
|
@@ -1500,7 +1500,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1500
1500
|
* See the <ResultTableInHtmlTable /> (React) demo for this component in
|
|
1501
1501
|
* action:
|
|
1502
1502
|
*
|
|
1503
|
-
* 
|
|
1505
1505
|
*
|
|
1506
1506
|
* The component's props identify which ResultTable to render based on query Id,
|
|
@@ -1661,7 +1661,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1661
1661
|
* See the <ResultSortedTableInHtmlTable /> (React) demo for this component in
|
|
1662
1662
|
* action:
|
|
1663
1663
|
*
|
|
1664
|
-
* 
|
|
1666
1666
|
*
|
|
1667
1667
|
* The component's props identify which ResultTable to render based on query Id,
|
|
@@ -1843,7 +1843,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1843
1843
|
*
|
|
1844
1844
|
* See the <EditableCellView /> (React) demo for this component in action:
|
|
1845
1845
|
*
|
|
1846
|
-
* 
|
|
1848
1848
|
*
|
|
1849
1849
|
* The component's props identify which Cell to render based on Table Id, Row
|
|
@@ -1928,7 +1928,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1928
1928
|
*
|
|
1929
1929
|
* See the <EditableValueView /> (React) demo for this component in action:
|
|
1930
1930
|
*
|
|
1931
|
-
* 
|
|
1933
1933
|
*
|
|
1934
1934
|
* The component's props identify which Value to render based on Table Id, Row
|
|
@@ -1999,7 +1999,7 @@ export type WithSchemas<Schemas extends OptionalSchemas> = {
|
|
|
1999
1999
|
* See the <SortedTableInHtmlTable /> (React) demo for this component in
|
|
2000
2000
|
* action:
|
|
2001
2001
|
*
|
|
2002
|
-
* 
|
|
2004
2004
|
*
|
|
2005
2005
|
* The component displays 'previous' and 'next' buttons for paging through the
|
|
@@ -117,9 +117,10 @@ export type QuerySourceProps = {
|
|
|
117
117
|
export type BindingProps = {
|
|
118
118
|
/**
|
|
119
119
|
* The Id of the Cell that provides each data point's x value. Finite numbers
|
|
120
|
-
* can be used as continuous x values in line charts,
|
|
121
|
-
*
|
|
122
|
-
* as `true` and
|
|
120
|
+
* can be used as continuous linear x values in line charts, ISO date strings
|
|
121
|
+
* can be used as time x values, and other strings and booleans are used as
|
|
122
|
+
* category values. Boolean category labels are rendered as `true` and
|
|
123
|
+
* `false`.
|
|
123
124
|
* @category Prop
|
|
124
125
|
* @since v8.5.0
|
|
125
126
|
*/
|
|
@@ -175,9 +176,10 @@ export type SeriesProps = {
|
|
|
175
176
|
readonly className?: string;
|
|
176
177
|
/**
|
|
177
178
|
* The Id of the Cell that provides each data point's x value. Finite numbers
|
|
178
|
-
* can be used as continuous x values in line series,
|
|
179
|
-
*
|
|
180
|
-
* as `true` and
|
|
179
|
+
* can be used as continuous linear x values in line series, ISO date strings
|
|
180
|
+
* can be used as time x values, and other strings and booleans are used as
|
|
181
|
+
* category values. Boolean category labels are rendered as `true` and
|
|
182
|
+
* `false`.
|
|
181
183
|
* @category Prop
|
|
182
184
|
* @since v8.5.0
|
|
183
185
|
*/
|
|
@@ -224,16 +226,35 @@ export type SeriesProps = {
|
|
|
224
226
|
};
|
|
225
227
|
|
|
226
228
|
/**
|
|
227
|
-
* The
|
|
228
|
-
*
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
|
|
232
|
-
|
|
229
|
+
* The XAxisScale type describes how x-axis values should be interpreted:
|
|
230
|
+
* `auto`, `category`, `linear`, or `time`.
|
|
231
|
+
* @category Configuration
|
|
232
|
+
* @since v8.5.0
|
|
233
|
+
*/
|
|
234
|
+
export type XAxisScale = 'auto' | 'category' | 'linear' | 'time';
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* The TimestampUnit type describes the unit used by numeric timestamp values on
|
|
238
|
+
* a time x axis: `millisecond` or `second`.
|
|
239
|
+
* @category Configuration
|
|
240
|
+
* @since v8.5.0
|
|
241
|
+
*/
|
|
242
|
+
export type TimestampUnit = 'millisecond' | 'second';
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* The TimeValue type describes values that can be used for explicit bounds and
|
|
246
|
+
* ticks on a time x axis: numbers, ISO date strings, or Date objects.
|
|
247
|
+
* @category Configuration
|
|
248
|
+
* @since v8.5.0
|
|
249
|
+
*/
|
|
250
|
+
export type TimeValue = number | string | Date;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* The BaseXAxisProps type describes props shared by all x-axis configurations.
|
|
233
254
|
* @category Configuration
|
|
234
255
|
* @since v8.5.0
|
|
235
256
|
*/
|
|
236
|
-
export type
|
|
257
|
+
export type BaseXAxisProps = {
|
|
237
258
|
/**
|
|
238
259
|
* An optional string that will be added to the class attribute of the x-axis
|
|
239
260
|
* SVG group element.
|
|
@@ -249,7 +270,43 @@ export type XAxisProps = {
|
|
|
249
270
|
*/
|
|
250
271
|
readonly title?: string;
|
|
251
272
|
/**
|
|
252
|
-
* An optional
|
|
273
|
+
* An optional preferred number of ticks to render on a continuous x axis.
|
|
274
|
+
*
|
|
275
|
+
* The actual number of ticks may vary so that labels remain readable.
|
|
276
|
+
* @category Prop
|
|
277
|
+
* @since v8.5.0
|
|
278
|
+
*/
|
|
279
|
+
readonly tickCount?: number;
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* The LinearXAxisProps type describes x-axis configuration for automatically
|
|
284
|
+
* inferred, categorical, and linear axes.
|
|
285
|
+
* @category Configuration
|
|
286
|
+
* @since v8.5.0
|
|
287
|
+
*/
|
|
288
|
+
export type LinearXAxisProps = BaseXAxisProps & {
|
|
289
|
+
/**
|
|
290
|
+
* An optional scale to use for the x axis.
|
|
291
|
+
*
|
|
292
|
+
* The default `auto` scale infers linear axes from numeric line-series x
|
|
293
|
+
* values, time axes from ISO date strings, and category axes otherwise. Use
|
|
294
|
+
* `time` explicitly for numeric Unix timestamp values.
|
|
295
|
+
* @category Prop
|
|
296
|
+
* @since v8.5.0
|
|
297
|
+
*/
|
|
298
|
+
readonly scale?: 'auto' | 'category' | 'linear';
|
|
299
|
+
/**
|
|
300
|
+
* The unit for numeric timestamp values on a time x axis.
|
|
301
|
+
*
|
|
302
|
+
* This prop is ignored unless the scale prop is `time`, and defaults to
|
|
303
|
+
* `millisecond`.
|
|
304
|
+
* @category Prop
|
|
305
|
+
* @since v8.5.0
|
|
306
|
+
*/
|
|
307
|
+
readonly timestampUnit?: never;
|
|
308
|
+
/**
|
|
309
|
+
* An optional minimum x-axis bound for continuous numeric or time x values.
|
|
253
310
|
*
|
|
254
311
|
* This prop is ignored when the x axis is categorical.
|
|
255
312
|
* @category Prop
|
|
@@ -257,7 +314,7 @@ export type XAxisProps = {
|
|
|
257
314
|
*/
|
|
258
315
|
readonly min?: number;
|
|
259
316
|
/**
|
|
260
|
-
* An optional maximum x-axis bound for continuous numeric x values.
|
|
317
|
+
* An optional maximum x-axis bound for continuous numeric or time x values.
|
|
261
318
|
*
|
|
262
319
|
* This prop is ignored when the x axis is categorical.
|
|
263
320
|
* @category Prop
|
|
@@ -265,7 +322,7 @@ export type XAxisProps = {
|
|
|
265
322
|
*/
|
|
266
323
|
readonly max?: number;
|
|
267
324
|
/**
|
|
268
|
-
* Optional
|
|
325
|
+
* Optional tick values to use for a continuous numeric or time x axis.
|
|
269
326
|
*
|
|
270
327
|
* This prop is ignored when the x axis is categorical.
|
|
271
328
|
* @category Prop
|
|
@@ -273,24 +330,90 @@ export type XAxisProps = {
|
|
|
273
330
|
*/
|
|
274
331
|
readonly ticks?: readonly number[];
|
|
275
332
|
/**
|
|
276
|
-
* An optional
|
|
333
|
+
* An optional function for formatting x-axis tick labels.
|
|
277
334
|
*
|
|
278
|
-
*
|
|
335
|
+
* It receives the original tick value for category axes, the numeric tick
|
|
336
|
+
* value for linear axes, or a Date object for time axes. For time axes, the
|
|
337
|
+
* normalized epoch millisecond timestamp is provided as a second argument.
|
|
279
338
|
* @category Prop
|
|
280
339
|
* @since v8.5.0
|
|
281
340
|
*/
|
|
282
|
-
readonly
|
|
341
|
+
readonly tickFormatter?: (tick: boolean | number | string) => string;
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* The TimeXAxisProps type describes x-axis configuration for time axes.
|
|
346
|
+
* @category Configuration
|
|
347
|
+
* @since v8.5.0
|
|
348
|
+
*/
|
|
349
|
+
export type TimeXAxisProps = BaseXAxisProps & {
|
|
350
|
+
/**
|
|
351
|
+
* An optional scale to use for the x axis.
|
|
352
|
+
*
|
|
353
|
+
* The default `auto` scale infers linear axes from numeric line-series x
|
|
354
|
+
* values, time axes from ISO date strings, and category axes otherwise. Use
|
|
355
|
+
* `time` explicitly for numeric Unix timestamp values.
|
|
356
|
+
* @category Prop
|
|
357
|
+
* @since v8.5.0
|
|
358
|
+
*/
|
|
359
|
+
readonly scale: 'time';
|
|
360
|
+
/**
|
|
361
|
+
* The unit for numeric timestamp values on a time x axis.
|
|
362
|
+
*
|
|
363
|
+
* This prop is ignored unless the scale prop is `time`, and defaults to
|
|
364
|
+
* `millisecond`.
|
|
365
|
+
* @category Prop
|
|
366
|
+
* @since v8.5.0
|
|
367
|
+
*/
|
|
368
|
+
readonly timestampUnit?: TimestampUnit;
|
|
369
|
+
/**
|
|
370
|
+
* An optional minimum x-axis bound for continuous numeric or time x values.
|
|
371
|
+
*
|
|
372
|
+
* This prop is ignored when the x axis is categorical.
|
|
373
|
+
* @category Prop
|
|
374
|
+
* @since v8.5.0
|
|
375
|
+
*/
|
|
376
|
+
readonly min?: TimeValue;
|
|
377
|
+
/**
|
|
378
|
+
* An optional maximum x-axis bound for continuous numeric or time x values.
|
|
379
|
+
*
|
|
380
|
+
* This prop is ignored when the x axis is categorical.
|
|
381
|
+
* @category Prop
|
|
382
|
+
* @since v8.5.0
|
|
383
|
+
*/
|
|
384
|
+
readonly max?: TimeValue;
|
|
385
|
+
/**
|
|
386
|
+
* Optional tick values to use for a continuous numeric or time x axis.
|
|
387
|
+
*
|
|
388
|
+
* This prop is ignored when the x axis is categorical.
|
|
389
|
+
* @category Prop
|
|
390
|
+
* @since v8.5.0
|
|
391
|
+
*/
|
|
392
|
+
readonly ticks?: readonly TimeValue[];
|
|
283
393
|
/**
|
|
284
394
|
* An optional function for formatting x-axis tick labels.
|
|
285
395
|
*
|
|
286
|
-
* It receives the original tick value
|
|
287
|
-
* or
|
|
396
|
+
* It receives the original tick value for category axes, the numeric tick
|
|
397
|
+
* value for linear axes, or a Date object for time axes. For time axes, the
|
|
398
|
+
* normalized epoch millisecond timestamp is provided as a second argument.
|
|
288
399
|
* @category Prop
|
|
289
400
|
* @since v8.5.0
|
|
290
401
|
*/
|
|
291
|
-
readonly tickFormatter?: (tick:
|
|
402
|
+
readonly tickFormatter?: (tick: Date, timestamp: number) => string;
|
|
292
403
|
};
|
|
293
404
|
|
|
405
|
+
/**
|
|
406
|
+
* The XAxisProps type describes the props that configure the x axis of a
|
|
407
|
+
* CartesianChart component, LineChart component, or BarChart component.
|
|
408
|
+
*
|
|
409
|
+
* The x axis is inferred by default. Use an XAxis component child when you
|
|
410
|
+
* want to override its title, scale, continuous bounds, tick values, tick
|
|
411
|
+
* count, tick labels, or SVG class name.
|
|
412
|
+
* @category Configuration
|
|
413
|
+
* @since v8.5.0
|
|
414
|
+
*/
|
|
415
|
+
export type XAxisProps = LinearXAxisProps | TimeXAxisProps;
|
|
416
|
+
|
|
294
417
|
/**
|
|
295
418
|
* The YAxisProps type describes the props that configure the y axis of a
|
|
296
419
|
* CartesianChart component.
|
|
@@ -360,7 +483,7 @@ export type YAxisProps = {
|
|
|
360
483
|
*
|
|
361
484
|
* See the Composing Charts (React) demo for this component in action:
|
|
362
485
|
*
|
|
363
|
-
* 
|
|
365
488
|
*
|
|
366
489
|
* The series children declare their own xCellId and yCellId bindings. The
|
|
@@ -410,15 +533,16 @@ export function CartesianChart(
|
|
|
410
533
|
): ComponentReturnType;
|
|
411
534
|
|
|
412
535
|
/**
|
|
413
|
-
* The XAxis component configures the x axis of a CartesianChart component
|
|
536
|
+
* The XAxis component configures the x axis of a CartesianChart component,
|
|
537
|
+
* LineChart component, or BarChart component.
|
|
414
538
|
*
|
|
415
539
|
* It is a configuration child rather than a separately rendered SVG element:
|
|
416
|
-
* include zero or one XAxis component in a
|
|
417
|
-
*
|
|
540
|
+
* include zero or one XAxis component in a chart's children. If omitted, the x
|
|
541
|
+
* axis is inferred from the chart's series.
|
|
418
542
|
*
|
|
419
543
|
* See the Axis Overrides (React) demo for this component in action:
|
|
420
544
|
*
|
|
421
|
-
* 
|
|
423
547
|
* @category Store components
|
|
424
548
|
* @since v8.5.0
|
|
@@ -434,7 +558,7 @@ export function XAxis(props: XAxisProps): ComponentReturnType;
|
|
|
434
558
|
*
|
|
435
559
|
* See the Axis Overrides (React) demo for this component in action:
|
|
436
560
|
*
|
|
437
|
-
* 
|
|
439
563
|
* @category Store components
|
|
440
564
|
* @since v8.5.0
|
|
@@ -444,13 +568,13 @@ export function YAxis(props: YAxisProps): ComponentReturnType;
|
|
|
444
568
|
/**
|
|
445
569
|
* The LineSeries component renders a line series in a CartesianChart component.
|
|
446
570
|
* If every x value in every series is a finite number, the x axis is rendered
|
|
447
|
-
* as a continuous
|
|
448
|
-
*
|
|
449
|
-
* by xCellId.
|
|
571
|
+
* as a continuous linear scale. ISO date strings are inferred as a time scale.
|
|
572
|
+
* Other strings and booleans are rendered categorically. When sortCellId is
|
|
573
|
+
* omitted, rows are sorted by xCellId.
|
|
450
574
|
*
|
|
451
575
|
* See the Composing Charts (React) demo for this component in action:
|
|
452
576
|
*
|
|
453
|
-
* 
|
|
455
579
|
* @category Store components
|
|
456
580
|
* @since v8.5.0
|
|
@@ -459,12 +583,14 @@ export function LineSeries(props: SeriesProps): ComponentReturnType;
|
|
|
459
583
|
|
|
460
584
|
/**
|
|
461
585
|
* The BarSeries component renders a bar series in a CartesianChart component.
|
|
462
|
-
* Its x values are
|
|
463
|
-
* numbers.
|
|
586
|
+
* Its x values are rendered categorically by default, even when they are finite
|
|
587
|
+
* numbers. Add an XAxis component with a `linear` or `time` scale to position
|
|
588
|
+
* bars continuously. Boolean category labels are rendered as `true` and
|
|
589
|
+
* `false`.
|
|
464
590
|
*
|
|
465
591
|
* See the Composing Charts (React) demo for this component in action:
|
|
466
592
|
*
|
|
467
|
-
* 
|
|
469
595
|
* @category Store components
|
|
470
596
|
* @since v8.5.0
|
|
@@ -473,13 +599,15 @@ export function BarSeries(props: SeriesProps): ComponentReturnType;
|
|
|
473
599
|
|
|
474
600
|
/**
|
|
475
601
|
* The LineChart component renders a line chart from TinyBase data. If every x
|
|
476
|
-
* value is a finite number, the x axis is rendered as a continuous
|
|
477
|
-
* scale.
|
|
478
|
-
*
|
|
602
|
+
* value is a finite number, the x axis is rendered as a continuous linear
|
|
603
|
+
* scale. ISO date strings are inferred as a time scale. Other strings and
|
|
604
|
+
* booleans are rendered categorically. Add XAxis component and YAxis component
|
|
605
|
+
* children to override axis configuration. When sortCellId is omitted, rows are
|
|
606
|
+
* sorted by xCellId.
|
|
479
607
|
*
|
|
480
608
|
* See the <LineChart /> (React) demo for this component in action:
|
|
481
609
|
*
|
|
482
|
-
* 
|
|
484
612
|
* @category Store components
|
|
485
613
|
* @since v8.5.0
|
|
@@ -519,17 +647,20 @@ export function BarSeries(props: SeriesProps): ComponentReturnType;
|
|
|
519
647
|
* ```
|
|
520
648
|
*/
|
|
521
649
|
export function LineChart(
|
|
522
|
-
props: (TableSourceProps | QuerySourceProps) &
|
|
650
|
+
props: (TableSourceProps | QuerySourceProps) &
|
|
651
|
+
BindingProps &
|
|
652
|
+
ChartProps & {readonly children?: ReactNode},
|
|
523
653
|
): ComponentReturnType;
|
|
524
654
|
|
|
525
655
|
/**
|
|
526
656
|
* The BarChart component renders a bar chart from TinyBase data. Its x values
|
|
527
|
-
* are
|
|
528
|
-
*
|
|
657
|
+
* are rendered categorically by default, even when they are finite numbers. Add
|
|
658
|
+
* an XAxis component with a `linear` or `time` scale to position bars
|
|
659
|
+
* continuously. Boolean category labels are rendered as `true` and `false`.
|
|
529
660
|
*
|
|
530
661
|
* See the Sorting And Types (React) demo for this component in action:
|
|
531
662
|
*
|
|
532
|
-
* 
|
|
534
665
|
* @category Store components
|
|
535
666
|
* @since v8.5.0
|
|
@@ -570,5 +701,7 @@ export function LineChart(
|
|
|
570
701
|
* ```
|
|
571
702
|
*/
|
|
572
703
|
export function BarChart(
|
|
573
|
-
props: (TableSourceProps | QuerySourceProps) &
|
|
704
|
+
props: (TableSourceProps | QuerySourceProps) &
|
|
705
|
+
BindingProps &
|
|
706
|
+
ChartProps & {readonly children?: ReactNode},
|
|
574
707
|
): ComponentReturnType;
|