@orbcharts/core 3.0.0-alpha.25 → 3.0.0-alpha.26
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/types/ChartParams.d.ts +1 -1
- package/dist/src/types/DataFormatterGrid.d.ts +7 -6
- package/dist/src/types/DataFormatterMultiGrid.d.ts +4 -4
- package/dist/src/types/DataFormatterMultiValue.d.ts +6 -4
- package/dist/src/types/DataFormatterRelationship.d.ts +3 -2
- package/dist/src/types/DataFormatterSeries.d.ts +7 -2
- package/package.json +1 -1
- package/src/types/ChartParams.ts +10 -1
- package/src/types/DataFormatterGrid.ts +7 -7
- package/src/types/DataFormatterMultiGrid.ts +10 -6
- package/src/types/DataFormatterMultiValue.ts +7 -6
- package/src/types/DataFormatterRelationship.ts +4 -5
- package/src/types/DataFormatterSeries.ts +8 -5
@@ -13,7 +13,7 @@ export interface ChartParams {
|
|
13
13
|
transitionDuration: number;
|
14
14
|
transitionEase: string;
|
15
15
|
}
|
16
|
-
export type ChartParamsPartial = Partial<ChartParams
|
16
|
+
export type ChartParamsPartial = Partial<ChartParams | {
|
17
17
|
padding: Partial<Padding>;
|
18
18
|
colors: Partial<{
|
19
19
|
light: Partial<ColorScheme>;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { DataGridDatum, DataGridValue } from './DataGrid';
|
2
|
-
import { DataFormatterBase, DataFormatterValueAxis, DataFormatterGroupAxis, DataFormatterContext } from './DataFormatter';
|
2
|
+
import { DataFormatterBase, DataFormatterBasePartial, DataFormatterValueAxis, DataFormatterGroupAxis, DataFormatterContext } from './DataFormatter';
|
3
3
|
|
4
4
|
export type SeriesType = 'row' | 'column';
|
5
5
|
export interface DataFormatterGrid extends DataFormatterBase<'grid'> {
|
@@ -8,11 +8,12 @@ export interface DataFormatterGrid extends DataFormatterBase<'grid'> {
|
|
8
8
|
groupAxis: DataFormatterGroupAxis;
|
9
9
|
colorsPredicate: (datum: DataGridDatum | DataGridValue, rowIndex: number, columnIndex: number, context: DataFormatterContext<'grid'>) => string;
|
10
10
|
}
|
11
|
-
export
|
12
|
-
grid
|
13
|
-
valueAxis
|
14
|
-
groupAxis
|
15
|
-
|
11
|
+
export interface DataFormatterGridPartial extends DataFormatterBasePartial<'grid'> {
|
12
|
+
grid?: Partial<DataFormatterGridGrid>;
|
13
|
+
valueAxis?: Partial<DataFormatterValueAxis>;
|
14
|
+
groupAxis?: Partial<DataFormatterGroupAxis>;
|
15
|
+
colorsPredicate?: (datum: DataGridDatum | DataGridValue, rowIndex: number, columnIndex: number, context: DataFormatterContext<'grid'>) => string;
|
16
|
+
}
|
16
17
|
export interface DataFormatterGridGrid {
|
17
18
|
rowLabels: string[];
|
18
19
|
columnLabels: string[];
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import { DataGridDatum, DataGridValue } from './DataGrid';
|
2
2
|
import { DataFormatterGridGrid } from './DataFormatterGrid';
|
3
|
-
import { DataFormatterBase, DataFormatterValueAxis, DataFormatterGroupAxis, DataFormatterContext } from './DataFormatter';
|
3
|
+
import { DataFormatterBase, DataFormatterBasePartial, DataFormatterValueAxis, DataFormatterGroupAxis, DataFormatterContext } from './DataFormatter';
|
4
4
|
|
5
5
|
export interface DataFormatterMultiGrid extends DataFormatterBase<'multiGrid'> {
|
6
6
|
multiGrid: Array<DataFormatterMultiGridMultiGrid>;
|
7
7
|
}
|
8
|
-
export
|
9
|
-
multiGrid
|
10
|
-
}
|
8
|
+
export interface DataFormatterMultiGridPartial extends DataFormatterBasePartial<'multiGrid'> {
|
9
|
+
multiGrid?: Array<Partial<DataFormatterMultiGridMultiGrid>>;
|
10
|
+
}
|
11
11
|
export interface DataFormatterMultiGridMultiGrid {
|
12
12
|
grid: DataFormatterGridGrid;
|
13
13
|
valueAxis: DataFormatterValueAxis;
|
@@ -1,13 +1,15 @@
|
|
1
|
-
import { DataFormatterBase, DataFormatterValueAxis } from './DataFormatter';
|
1
|
+
import { DataFormatterBase, DataFormatterBasePartial, DataFormatterValueAxis } from './DataFormatter';
|
2
2
|
|
3
3
|
export interface DataFormatterMultiValue extends DataFormatterBase<'multiValue'> {
|
4
4
|
multiValue: Array<DataFormatterMultiValueMultiValue>;
|
5
5
|
xAxis: DataFormatterValueAxis;
|
6
6
|
yAxis: DataFormatterValueAxis;
|
7
7
|
}
|
8
|
-
export
|
9
|
-
multiValue
|
10
|
-
|
8
|
+
export interface DataFormatterMultiValuePartial extends DataFormatterBasePartial<'multiValue'> {
|
9
|
+
multiValue?: Array<Partial<DataFormatterMultiValueMultiValue>>;
|
10
|
+
xAxis?: Partial<DataFormatterValueAxis>;
|
11
|
+
yAxis?: Partial<DataFormatterValueAxis>;
|
12
|
+
}
|
11
13
|
export interface DataFormatterMultiValueMultiValue {
|
12
14
|
unitLabel: string;
|
13
15
|
}
|
@@ -1,5 +1,6 @@
|
|
1
|
-
import { DataFormatterBase } from './DataFormatter';
|
1
|
+
import { DataFormatterBase, DataFormatterBasePartial } from './DataFormatter';
|
2
2
|
|
3
3
|
export interface DataFormatterRelationship extends DataFormatterBase<'relationship'> {
|
4
4
|
}
|
5
|
-
export
|
5
|
+
export interface DataFormatterRelationshipPartial extends DataFormatterBasePartial<'relationship'> {
|
6
|
+
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { DataSeriesDatum, DataSeriesValue } from './DataSeries';
|
2
|
-
import { DataFormatterBase, DataFormatterContext } from './DataFormatter';
|
2
|
+
import { DataFormatterBase, DataFormatterBasePartial, DataFormatterContext } from './DataFormatter';
|
3
3
|
|
4
4
|
export interface DataFormatterSeries extends DataFormatterBase<'series'> {
|
5
5
|
unitLabel: string;
|
@@ -7,4 +7,9 @@ export interface DataFormatterSeries extends DataFormatterBase<'series'> {
|
|
7
7
|
colorsPredicate: (datum: DataSeriesDatum | DataSeriesValue, rowIndex: number, columnIndex: number, context: DataFormatterContext<'series'>) => string;
|
8
8
|
sort: ((a: DataSeriesDatum | DataSeriesValue, b: DataSeriesDatum | number) => number) | null;
|
9
9
|
}
|
10
|
-
export
|
10
|
+
export interface DataFormatterSeriesPartial extends DataFormatterBasePartial<'series'> {
|
11
|
+
unitLabel?: string;
|
12
|
+
seriesLabels?: string[];
|
13
|
+
colorsPredicate?: (datum: DataSeriesDatum | DataSeriesValue, rowIndex: number, columnIndex: number, context: DataFormatterContext<'series'>) => string;
|
14
|
+
sort?: ((a: DataSeriesDatum | DataSeriesValue, b: DataSeriesDatum | number) => number) | null;
|
15
|
+
}
|
package/package.json
CHANGED
package/src/types/ChartParams.ts
CHANGED
@@ -15,7 +15,7 @@ export interface ChartParams {
|
|
15
15
|
// [key: string]: any
|
16
16
|
}
|
17
17
|
|
18
|
-
export type ChartParamsPartial = Partial<ChartParams
|
18
|
+
export type ChartParamsPartial = Partial<ChartParams | {
|
19
19
|
padding: Partial<Padding>,
|
20
20
|
colors: Partial<{
|
21
21
|
light: Partial<ColorScheme>
|
@@ -24,6 +24,15 @@ export type ChartParamsPartial = Partial<ChartParams> & Partial<{
|
|
24
24
|
styles: Partial<Styles>
|
25
25
|
}>
|
26
26
|
|
27
|
+
function test (): ChartParamsPartial {
|
28
|
+
return {
|
29
|
+
colorScheme: 'dark',
|
30
|
+
padding: {
|
31
|
+
top: 10
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
27
36
|
export type HighlightTarget = 'series' | 'group' | 'datum' | 'none'
|
28
37
|
|
29
38
|
export interface Styles {
|
@@ -4,8 +4,7 @@ import type { DataFormatterBase, DataFormatterBasePartial, DataFormatterValueAxi
|
|
4
4
|
|
5
5
|
export type SeriesType = 'row' | 'column' // default: 'row'
|
6
6
|
|
7
|
-
export interface DataFormatterGrid
|
8
|
-
extends DataFormatterBase<'grid'> {
|
7
|
+
export interface DataFormatterGrid extends DataFormatterBase<'grid'> {
|
9
8
|
grid: DataFormatterGridGrid
|
10
9
|
valueAxis: DataFormatterValueAxis
|
11
10
|
groupAxis: DataFormatterGroupAxis
|
@@ -13,11 +12,12 @@ export interface DataFormatterGrid
|
|
13
12
|
colorsPredicate: (datum: DataGridDatum | DataGridValue, rowIndex: number, columnIndex: number, context: DataFormatterContext<'grid'>) => string
|
14
13
|
}
|
15
14
|
|
16
|
-
export
|
17
|
-
grid
|
18
|
-
valueAxis
|
19
|
-
groupAxis
|
20
|
-
|
15
|
+
export interface DataFormatterGridPartial extends DataFormatterBasePartial<'grid'> {
|
16
|
+
grid?: Partial<DataFormatterGridGrid>
|
17
|
+
valueAxis?: Partial<DataFormatterValueAxis>
|
18
|
+
groupAxis?: Partial<DataFormatterGroupAxis>
|
19
|
+
colorsPredicate?: (datum: DataGridDatum | DataGridValue, rowIndex: number, columnIndex: number, context: DataFormatterContext<'grid'>) => string
|
20
|
+
}
|
21
21
|
|
22
22
|
// grid欄位
|
23
23
|
export interface DataFormatterGridGrid {
|
@@ -1,17 +1,21 @@
|
|
1
1
|
import { DataGridDatum, DataGridValue } from './DataGrid'
|
2
2
|
import { DataFormatterGridGrid } from './DataFormatterGrid'
|
3
|
-
import {
|
3
|
+
import {
|
4
|
+
DataFormatterBase,
|
5
|
+
DataFormatterBasePartial,
|
6
|
+
DataFormatterValueAxis,
|
7
|
+
DataFormatterGroupAxis,
|
8
|
+
DataFormatterContext } from './DataFormatter'
|
4
9
|
import { AxisPosition } from './Axis'
|
5
10
|
|
6
|
-
export interface DataFormatterMultiGrid
|
7
|
-
extends DataFormatterBase<'multiGrid'> {
|
11
|
+
export interface DataFormatterMultiGrid extends DataFormatterBase<'multiGrid'> {
|
8
12
|
multiGrid: Array<DataFormatterMultiGridMultiGrid>
|
9
13
|
// visibleGroupRange: [number, number] | null
|
10
14
|
}
|
11
15
|
|
12
|
-
export
|
13
|
-
multiGrid
|
14
|
-
}
|
16
|
+
export interface DataFormatterMultiGridPartial extends DataFormatterBasePartial<'multiGrid'> {
|
17
|
+
multiGrid?: Array<Partial<DataFormatterMultiGridMultiGrid>>
|
18
|
+
}
|
15
19
|
|
16
20
|
// multiGrid欄位
|
17
21
|
export interface DataFormatterMultiGridMultiGrid {
|
@@ -1,17 +1,18 @@
|
|
1
1
|
import { DataMultiValueDatum, DataMultiValue } from './DataMultiValue'
|
2
|
-
import { DataFormatterBase, DataFormatterValueAxis } from './DataFormatter'
|
2
|
+
import { DataFormatterBase, DataFormatterBasePartial, DataFormatterValueAxis } from './DataFormatter'
|
3
3
|
|
4
|
-
export interface DataFormatterMultiValue
|
5
|
-
extends DataFormatterBase<'multiValue'> {
|
4
|
+
export interface DataFormatterMultiValue extends DataFormatterBase<'multiValue'> {
|
6
5
|
// labelFormat: (datum: unknown) => string
|
7
6
|
multiValue: Array<DataFormatterMultiValueMultiValue>
|
8
7
|
xAxis: DataFormatterValueAxis
|
9
8
|
yAxis: DataFormatterValueAxis
|
10
9
|
}
|
11
10
|
|
12
|
-
export
|
13
|
-
multiValue
|
14
|
-
|
11
|
+
export interface DataFormatterMultiValuePartial extends DataFormatterBasePartial<'multiValue'> {
|
12
|
+
multiValue?: Array<Partial<DataFormatterMultiValueMultiValue>>
|
13
|
+
xAxis?: Partial<DataFormatterValueAxis>
|
14
|
+
yAxis?: Partial<DataFormatterValueAxis>
|
15
|
+
}
|
15
16
|
|
16
17
|
// multiValue欄位
|
17
18
|
export interface DataFormatterMultiValueMultiValue {
|
@@ -1,16 +1,15 @@
|
|
1
1
|
import { Node, Edge, DataRelationship } from './DataRelationship'
|
2
|
-
import { DataFormatterBase } from './DataFormatter'
|
2
|
+
import { DataFormatterBase, DataFormatterBasePartial } from './DataFormatter'
|
3
3
|
|
4
|
-
export interface DataFormatterRelationship
|
5
|
-
extends DataFormatterBase<'relationship'> {
|
4
|
+
export interface DataFormatterRelationship extends DataFormatterBase<'relationship'> {
|
6
5
|
// node: DataFormatterRelationshipNode
|
7
6
|
// edge: DataFormatterRelationshipEdge
|
8
7
|
}
|
9
8
|
|
10
|
-
export
|
9
|
+
export interface DataFormatterRelationshipPartial extends DataFormatterBasePartial<'relationship'> {
|
11
10
|
// node: Partial<DataFormatterRelationshipNode>
|
12
11
|
// edge: Partial<DataFormatterRelationshipEdge>
|
13
|
-
}
|
12
|
+
}
|
14
13
|
|
15
14
|
// export interface DataFormatterRelationshipNode {
|
16
15
|
// labelFormat: (node: unknown) => string
|
@@ -1,9 +1,8 @@
|
|
1
1
|
import { DataSeriesDatum, DataSeriesValue, DataSeries } from './DataSeries'
|
2
|
-
import { DataFormatterBase, DataFormatterContext } from './DataFormatter'
|
2
|
+
import { DataFormatterBase, DataFormatterBasePartial, DataFormatterContext } from './DataFormatter'
|
3
3
|
// import { ComputedDatumSeries } from './ComputedDataSeries'
|
4
4
|
|
5
|
-
export interface DataFormatterSeries
|
6
|
-
extends DataFormatterBase<'series'> {
|
5
|
+
export interface DataFormatterSeries extends DataFormatterBase<'series'> {
|
7
6
|
// series: DataFormatterSeriesSeries
|
8
7
|
unitLabel: string
|
9
8
|
seriesLabels: string[]
|
@@ -14,9 +13,13 @@ export interface DataFormatterSeries
|
|
14
13
|
// colors: Colors
|
15
14
|
}
|
16
15
|
|
17
|
-
export
|
16
|
+
export interface DataFormatterSeriesPartial extends DataFormatterBasePartial<'series'> {
|
18
17
|
// series: Partial<DataFormatterSeriesSeries>
|
19
|
-
|
18
|
+
unitLabel?: string
|
19
|
+
seriesLabels?: string[]
|
20
|
+
colorsPredicate?: (datum: DataSeriesDatum | DataSeriesValue, rowIndex: number, columnIndex: number, context: DataFormatterContext<'series'>) => string
|
21
|
+
sort?: ((a: DataSeriesDatum | DataSeriesValue, b: DataSeriesDatum | number) => number) | null
|
22
|
+
}
|
20
23
|
|
21
24
|
// export interface DataFormatterSeriesSeries {
|
22
25
|
// unitLabel: string
|