@gravity-ui/chartkit 5.21.0 → 5.22.1
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/build/index.d.ts +0 -1
- package/build/index.js +0 -1
- package/build/plugins/d3/renderer/D3Widget.d.ts +1 -1
- package/build/plugins/d3/types.d.ts +1 -0
- package/build/plugins/highcharts/renderer/helpers/config/utils/index.d.ts +2 -2
- package/build/types/index.d.ts +0 -1
- package/build/types/index.js +1 -2
- package/build/types/widget.d.ts +2 -2
- package/package.json +2 -2
- package/build/types/widget-data/area.d.ts +0 -75
- package/build/types/widget-data/area.js +0 -1
- package/build/types/widget-data/axis.d.ts +0 -85
- package/build/types/widget-data/axis.js +0 -1
- package/build/types/widget-data/bar-x.d.ts +0 -66
- package/build/types/widget-data/bar-x.js +0 -1
- package/build/types/widget-data/bar-y.d.ts +0 -59
- package/build/types/widget-data/bar-y.js +0 -1
- package/build/types/widget-data/base.d.ts +0 -47
- package/build/types/widget-data/base.js +0 -1
- package/build/types/widget-data/chart.d.ts +0 -15
- package/build/types/widget-data/chart.js +0 -1
- package/build/types/widget-data/halo.d.ts +0 -9
- package/build/types/widget-data/halo.js +0 -1
- package/build/types/widget-data/index.d.ts +0 -39
- package/build/types/widget-data/index.js +0 -17
- package/build/types/widget-data/legend.d.ts +0 -92
- package/build/types/widget-data/legend.js +0 -1
- package/build/types/widget-data/line.d.ts +0 -56
- package/build/types/widget-data/line.js +0 -1
- package/build/types/widget-data/marker.d.ts +0 -12
- package/build/types/widget-data/marker.js +0 -1
- package/build/types/widget-data/pie.d.ts +0 -87
- package/build/types/widget-data/pie.js +0 -1
- package/build/types/widget-data/scatter.d.ts +0 -45
- package/build/types/widget-data/scatter.js +0 -1
- package/build/types/widget-data/series.d.ts +0 -225
- package/build/types/widget-data/series.js +0 -1
- package/build/types/widget-data/split.d.ts +0 -13
- package/build/types/widget-data/split.js +0 -1
- package/build/types/widget-data/title.d.ts +0 -5
- package/build/types/widget-data/title.js +0 -1
- package/build/types/widget-data/tooltip.d.ts +0 -67
- package/build/types/widget-data/tooltip.js +0 -1
- package/build/types/widget-data/treemap.d.ts +0 -45
- package/build/types/widget-data/treemap.js +0 -1
- package/build/types/widget-data/waterfall.d.ts +0 -39
- package/build/types/widget-data/waterfall.js +0 -1
package/build/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ChartKit } from './components/ChartKit';
|
|
2
2
|
import { settings } from './libs';
|
|
3
|
-
export * from './types/widget-data';
|
|
4
3
|
export * from './libs/chartkit-error/chartkit-error';
|
|
5
4
|
export type { ChartKitLang, ChartKitOnLoadData, ChartKitOnRenderData, ChartKitOnChartLoad, ChartKitOnError, ChartKitPlugin, ChartKitProps, ChartKitRef, ChartKitWidgetRef, ChartKitType, ChartKitWidget, } from './types';
|
|
6
5
|
export { settings };
|
package/build/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { ChartKitWidgetRef } from '../../../types';
|
|
3
3
|
declare const D3Widget: React.ForwardRefExoticComponent<{
|
|
4
4
|
type: "d3";
|
|
5
|
-
data: import("
|
|
5
|
+
data: import("@gravity-ui/charts").ChartData<any>;
|
|
6
6
|
id?: string | undefined;
|
|
7
7
|
isMobile?: boolean | undefined;
|
|
8
8
|
onLoad?: ((data?: import("../../../types").ChartKitOnLoadData<"d3"> | undefined) => void) | undefined;
|
|
@@ -49,10 +49,10 @@ export declare const getSortedData: <T extends Record<string, any>>(data: T[], s
|
|
|
49
49
|
[Symbol.iterator]?: boolean | undefined;
|
|
50
50
|
readonly [Symbol.unscopables]?: boolean | undefined;
|
|
51
51
|
at?: boolean | undefined;
|
|
52
|
-
} | (() => string) | (() => string) | (() => T | undefined) | ((...items: T[]) => number) | {
|
|
52
|
+
} | ((start?: number | undefined, end?: number | undefined) => T[]) | (() => string) | (() => string) | (() => T | undefined) | ((...items: T[]) => number) | {
|
|
53
53
|
(...items: ConcatArray<T>[]): T[];
|
|
54
54
|
(...items: (T | ConcatArray<T>)[]): T[];
|
|
55
|
-
} | ((separator?: string | undefined) => string) | (() => T[]) | (() => T | undefined) | ((
|
|
55
|
+
} | ((separator?: string | undefined) => string) | (() => T[]) | (() => T | undefined) | ((compareFn?: ((a: T, b: T) => number) | undefined) => T[]) | {
|
|
56
56
|
(start: number, deleteCount?: number | undefined): T[];
|
|
57
57
|
(start: number, deleteCount: number, ...items: T[]): T[];
|
|
58
58
|
} | ((...items: T[]) => number) | ((searchElement: T, fromIndex?: number | undefined) => number) | ((searchElement: T, fromIndex?: number | undefined) => number) | {
|
package/build/types/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { ChartKitError } from '../libs';
|
|
3
3
|
import type { ChartKitWidget } from './widget';
|
|
4
4
|
export type { ChartKitHolidays } from './misc';
|
|
5
|
-
export * from './widget-data';
|
|
6
5
|
export type ChartKitLang = 'ru' | 'en';
|
|
7
6
|
export type ChartKitType = keyof ChartKitWidget;
|
|
8
7
|
export type ChartKitRef = {
|
package/build/types/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export * from './widget-data';
|
|
1
|
+
export {};
|
package/build/types/widget.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import type { ChartData } from '@gravity-ui/charts';
|
|
2
3
|
import type { SplitLayoutType } from '../components/SplitPane/types';
|
|
3
4
|
import type { Highcharts, HighchartsWidgetData, StringParams } from '../plugins/highcharts/types';
|
|
4
5
|
import type { IndicatorWidgetData } from '../plugins/indicator/types';
|
|
5
6
|
import type { CustomTooltipProps, Yagr, YagrWidgetData } from '../plugins/yagr/types';
|
|
6
|
-
import type { ChartKitWidgetData } from './widget-data';
|
|
7
7
|
export interface ChartKitWidget {
|
|
8
8
|
yagr: {
|
|
9
9
|
data: YagrWidgetData;
|
|
@@ -33,7 +33,7 @@ export interface ChartKitWidget {
|
|
|
33
33
|
}, callExternalOnChange?: boolean) => void;
|
|
34
34
|
};
|
|
35
35
|
d3: {
|
|
36
|
-
data:
|
|
36
|
+
data: ChartData;
|
|
37
37
|
widget: never;
|
|
38
38
|
tooltip?: {
|
|
39
39
|
splitted?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gravity-ui/chartkit",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.22.1",
|
|
4
4
|
"description": "React component used to render charts based on any sources you need",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "git@github.com:gravity-ui/ChartKit.git",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@bem-react/classname": "^1.6.0",
|
|
50
|
-
"@gravity-ui/charts": "
|
|
50
|
+
"@gravity-ui/charts": "0.6.1-beta.1",
|
|
51
51
|
"@gravity-ui/date-utils": "^2.1.0",
|
|
52
52
|
"@gravity-ui/i18n": "^1.0.0",
|
|
53
53
|
"@gravity-ui/yagr": "^4.6.0",
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { SeriesType } from '../../constants';
|
|
2
|
-
import type { BaseSeries, BaseSeriesData } from './base';
|
|
3
|
-
import type { ChartKitWidgetLegend, RectLegendSymbolOptions } from './legend';
|
|
4
|
-
import type { PointMarkerOptions } from './marker';
|
|
5
|
-
export type AreaSeriesData<T = any> = BaseSeriesData<T> & {
|
|
6
|
-
/**
|
|
7
|
-
* The `x` value of the point. Depending on the context , it may represents:
|
|
8
|
-
* - numeric value (for `linear` x axis)
|
|
9
|
-
* - timestamp value (for `datetime` x axis)
|
|
10
|
-
* - x axis category value (for `category` x axis). If the type is a string, then it is a category value itself. If the type is a number, then it is the index of an element in the array of categories described in `xAxis.categories`
|
|
11
|
-
*/
|
|
12
|
-
x?: string | number;
|
|
13
|
-
/**
|
|
14
|
-
* The `y` value of the point. Depending on the context , it may represents:
|
|
15
|
-
* - numeric value (for `linear` y axis)
|
|
16
|
-
* - timestamp value (for `datetime` y axis)
|
|
17
|
-
* - y axis category value (for `category` y axis). If the type is a string, then it is a category value itself. If the type is a number, then it is the index of an element in the array of categories described in `yAxis[0].categories`
|
|
18
|
-
*/
|
|
19
|
-
y?: string | number;
|
|
20
|
-
/** Data label value of the point. If not specified, the y value is used. */
|
|
21
|
-
label?: string | number;
|
|
22
|
-
/** Individual marker options for the point. */
|
|
23
|
-
marker?: {
|
|
24
|
-
/** States for a single point marker. */
|
|
25
|
-
states?: {
|
|
26
|
-
/** The normal state of a single point marker. */
|
|
27
|
-
normal?: {
|
|
28
|
-
/**
|
|
29
|
-
* Enable or disable the point marker.
|
|
30
|
-
*
|
|
31
|
-
* @default false
|
|
32
|
-
* */
|
|
33
|
-
enabled: boolean;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
export type AreaMarkerSymbol = 'circle' | 'square';
|
|
39
|
-
export type AreaMarkerOptions = PointMarkerOptions & {
|
|
40
|
-
symbol?: AreaMarkerSymbol;
|
|
41
|
-
};
|
|
42
|
-
export type AreaSeries<T = any> = BaseSeries & {
|
|
43
|
-
type: typeof SeriesType.Area;
|
|
44
|
-
data: AreaSeriesData<T>[];
|
|
45
|
-
/** The name of the series (used in legend, tooltip etc) */
|
|
46
|
-
name: string;
|
|
47
|
-
/** Whether to stack the values of each series on top of each other.
|
|
48
|
-
* Possible values are undefined to disable, "normal" to stack by value or "percent"
|
|
49
|
-
*
|
|
50
|
-
* @default undefined
|
|
51
|
-
* */
|
|
52
|
-
stacking?: 'normal' | 'percent';
|
|
53
|
-
/** This option allows grouping series in a stacked chart */
|
|
54
|
-
stackId?: string;
|
|
55
|
-
/** The main color of the series (hex, rgba) */
|
|
56
|
-
color?: string;
|
|
57
|
-
/** Fill opacity for the area
|
|
58
|
-
*
|
|
59
|
-
* @default 0.75
|
|
60
|
-
* */
|
|
61
|
-
opacity?: number;
|
|
62
|
-
/** Pixel width of the graph line.
|
|
63
|
-
*
|
|
64
|
-
* @default 1
|
|
65
|
-
* */
|
|
66
|
-
lineWidth?: number;
|
|
67
|
-
/** Individual series legend options. Has higher priority than legend options in widget data */
|
|
68
|
-
legend?: ChartKitWidgetLegend & {
|
|
69
|
-
symbol?: RectLegendSymbolOptions;
|
|
70
|
-
};
|
|
71
|
-
/** Options for the point markers of line in area series */
|
|
72
|
-
marker?: AreaMarkerOptions;
|
|
73
|
-
/** Y-axis index (when using two axes) */
|
|
74
|
-
yAxis?: number;
|
|
75
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import type { FormatNumberOptions } from '../../plugins/shared';
|
|
2
|
-
import type { BaseTextStyle } from './base';
|
|
3
|
-
export type ChartKitWidgetAxisType = 'category' | 'datetime' | 'linear' | 'logarithmic';
|
|
4
|
-
export type ChartKitWidgetAxisTitleAlignment = 'left' | 'center' | 'right';
|
|
5
|
-
export type ChartKitWidgetAxisLabels = {
|
|
6
|
-
/** Enable or disable the axis labels. */
|
|
7
|
-
enabled?: boolean;
|
|
8
|
-
/** The label's pixel distance from the perimeter of the plot area.
|
|
9
|
-
*
|
|
10
|
-
* @default: 10
|
|
11
|
-
*/
|
|
12
|
-
margin?: number;
|
|
13
|
-
/** The pixel padding for axis labels, to ensure white space between them.
|
|
14
|
-
*
|
|
15
|
-
* @defaults: 5
|
|
16
|
-
* */
|
|
17
|
-
padding?: number;
|
|
18
|
-
dateFormat?: string;
|
|
19
|
-
numberFormat?: FormatNumberOptions;
|
|
20
|
-
style?: Partial<BaseTextStyle>;
|
|
21
|
-
/** For horizontal axes, enable label rotation to prevent overlapping labels.
|
|
22
|
-
* If there is enough space, labels are not rotated.
|
|
23
|
-
* As the chart gets narrower, it will start rotating the labels -45 degrees. */
|
|
24
|
-
autoRotation?: boolean;
|
|
25
|
-
/** Rotation of the labels in degrees.
|
|
26
|
-
*
|
|
27
|
-
* @default: 0
|
|
28
|
-
*/
|
|
29
|
-
rotation?: number;
|
|
30
|
-
};
|
|
31
|
-
export type ChartKitWidgetAxis = {
|
|
32
|
-
categories?: string[];
|
|
33
|
-
timestamps?: number[];
|
|
34
|
-
type?: ChartKitWidgetAxisType;
|
|
35
|
-
/** The axis labels show the number or category for each tick. */
|
|
36
|
-
labels?: ChartKitWidgetAxisLabels;
|
|
37
|
-
/** The color of the line marking the axis itself. */
|
|
38
|
-
lineColor?: string;
|
|
39
|
-
title?: {
|
|
40
|
-
text?: string;
|
|
41
|
-
/** CSS styles for the title */
|
|
42
|
-
style?: Partial<BaseTextStyle>;
|
|
43
|
-
/** The pixel distance between the axis labels or line and the title.
|
|
44
|
-
*
|
|
45
|
-
* Defaults to 4 for horizontal axes, 8 for vertical.
|
|
46
|
-
* */
|
|
47
|
-
margin?: number;
|
|
48
|
-
/** Alignment of the title. */
|
|
49
|
-
align?: ChartKitWidgetAxisTitleAlignment;
|
|
50
|
-
/** Allows limiting of the contents of a title block to the specified number of lines.
|
|
51
|
-
* Defaults to 1. */
|
|
52
|
-
maxRowCount?: number;
|
|
53
|
-
};
|
|
54
|
-
/** The minimum value of the axis. If undefined the min value is automatically calculate. */
|
|
55
|
-
min?: number;
|
|
56
|
-
/** The grid lines settings. */
|
|
57
|
-
grid?: {
|
|
58
|
-
/** Enable or disable the grid lines.
|
|
59
|
-
*
|
|
60
|
-
* Defaults to true.
|
|
61
|
-
* */
|
|
62
|
-
enabled?: boolean;
|
|
63
|
-
};
|
|
64
|
-
ticks?: {
|
|
65
|
-
/** Pixel interval of the tick marks. Not applicable to categorized axis.
|
|
66
|
-
* The specified value is only a hint; the interval between ticks can be greater or less depending on the data. */
|
|
67
|
-
pixelInterval?: number;
|
|
68
|
-
};
|
|
69
|
-
/** Padding of the max value relative to the length of the axis.
|
|
70
|
-
* A padding of 0.05 will make a 100px axis 5px longer.
|
|
71
|
-
*
|
|
72
|
-
* Defaults to 0.05 for Y axis and to 0.01 for X axis.
|
|
73
|
-
* */
|
|
74
|
-
maxPadding?: number;
|
|
75
|
-
};
|
|
76
|
-
export type ChartKitWidgetXAxis = ChartKitWidgetAxis;
|
|
77
|
-
export type ChartKitWidgetYAxis = ChartKitWidgetAxis & {
|
|
78
|
-
/** Axis location.
|
|
79
|
-
* Possible values - 'left' and 'right'.
|
|
80
|
-
* */
|
|
81
|
-
position?: 'left' | 'right';
|
|
82
|
-
/** Property for splitting charts. Determines which area the axis is located in.
|
|
83
|
-
* */
|
|
84
|
-
plotIndex?: number;
|
|
85
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { SeriesType } from '../../constants';
|
|
2
|
-
import type { BaseSeries, BaseSeriesData } from './base';
|
|
3
|
-
import { ChartKitWidgetLegend, RectLegendSymbolOptions } from './legend';
|
|
4
|
-
import type { ChartKitWidgetSeriesOptions } from './series';
|
|
5
|
-
export type BarXSeriesData<T = any> = BaseSeriesData<T> & {
|
|
6
|
-
/**
|
|
7
|
-
* The `x` value of the bar. Depending on the context , it may represents:
|
|
8
|
-
* - numeric value (for `linear` x axis)
|
|
9
|
-
* - timestamp value (for `datetime` x axis)
|
|
10
|
-
* - x axis category value (for `category` x axis). If the type is a string, then it is a category value itself. If the type is a number, then it is the index of an element in the array of categories described in `xAxis.categories`
|
|
11
|
-
*/
|
|
12
|
-
x?: string | number;
|
|
13
|
-
/**
|
|
14
|
-
* The `y` value of the bar. Depending on the context , it may represents:
|
|
15
|
-
* - numeric value (for `linear` y axis)
|
|
16
|
-
* - timestamp value (for `datetime` y axis)
|
|
17
|
-
* - y axis category value (for `category` y axis). If the type is a string, then it is a category value itself. If the type is a number, then it is the index of an element in the array of categories described in `yAxis[0].categories`
|
|
18
|
-
*/
|
|
19
|
-
y?: string | number;
|
|
20
|
-
/**
|
|
21
|
-
* Corresponding value of axis category.
|
|
22
|
-
*
|
|
23
|
-
* @deprecated use `x` or `y` instead
|
|
24
|
-
*/
|
|
25
|
-
category?: string;
|
|
26
|
-
/** Data label value of the bar-x column. If not specified, the y value is used. */
|
|
27
|
-
label?: string | number;
|
|
28
|
-
/** Individual opacity for the bar-x column. */
|
|
29
|
-
opacity?: number;
|
|
30
|
-
};
|
|
31
|
-
export type BarXSeries<T = any> = BaseSeries & {
|
|
32
|
-
type: typeof SeriesType.BarX;
|
|
33
|
-
data: BarXSeriesData<T>[];
|
|
34
|
-
/** The name of the series (used in legend, tooltip etc) */
|
|
35
|
-
name: string;
|
|
36
|
-
/** The main color of the series (hex, rgba) */
|
|
37
|
-
color?: string;
|
|
38
|
-
/** Whether to stack the values of each series on top of each other.
|
|
39
|
-
* Possible values are undefined to disable, "normal" to stack by value or "percent"
|
|
40
|
-
*
|
|
41
|
-
* @default undefined
|
|
42
|
-
* */
|
|
43
|
-
stacking?: 'normal' | 'percent';
|
|
44
|
-
/** This option allows grouping series in a stacked chart */
|
|
45
|
-
stackId?: string;
|
|
46
|
-
/** Whether to group non-stacked columns or to let them render independent of each other.
|
|
47
|
-
* When false columns will be laid out individually and overlap each other.
|
|
48
|
-
*
|
|
49
|
-
* @default true
|
|
50
|
-
* */
|
|
51
|
-
grouping?: boolean;
|
|
52
|
-
dataLabels?: BaseSeries['dataLabels'] & ChartKitWidgetSeriesOptions['dataLabels'] & {
|
|
53
|
-
/**
|
|
54
|
-
* Whether to align the data label inside or outside the box
|
|
55
|
-
*
|
|
56
|
-
* @default false
|
|
57
|
-
* */
|
|
58
|
-
inside?: boolean;
|
|
59
|
-
};
|
|
60
|
-
/** Individual series legend options. Has higher priority than legend options in widget data */
|
|
61
|
-
legend?: ChartKitWidgetLegend & {
|
|
62
|
-
symbol?: RectLegendSymbolOptions;
|
|
63
|
-
};
|
|
64
|
-
/** Y-axis index (when using two axes) */
|
|
65
|
-
yAxis?: number;
|
|
66
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { SeriesType } from '../../constants';
|
|
2
|
-
import type { BaseSeries, BaseSeriesData } from './base';
|
|
3
|
-
import { ChartKitWidgetLegend, RectLegendSymbolOptions } from './legend';
|
|
4
|
-
import type { ChartKitWidgetSeriesOptions } from './series';
|
|
5
|
-
export type BarYSeriesData<T = any> = BaseSeriesData<T> & {
|
|
6
|
-
/**
|
|
7
|
-
* The `x` value of the bar. Depending on the context , it may represents:
|
|
8
|
-
* - numeric value (for `linear` x axis)
|
|
9
|
-
* - timestamp value (for `datetime` x axis)
|
|
10
|
-
* - x axis category value (for `category` x axis). If the type is a string, then it is a category value itself. If the type is a number, then it is the index of an element in the array of categories described in `xAxis.categories`
|
|
11
|
-
*/
|
|
12
|
-
x?: string | number;
|
|
13
|
-
/**
|
|
14
|
-
* The `y` value of the bar. Depending on the context , it may represents:
|
|
15
|
-
* - numeric value (for `linear` y axis)
|
|
16
|
-
* - timestamp value (for `datetime` y axis)
|
|
17
|
-
* - y axis category value (for `category` y axis). If the type is a string, then it is a category value itself. If the type is a number, then it is the index of an element in the array of categories described in `yAxis[0].categories`
|
|
18
|
-
*/
|
|
19
|
-
y?: string | number;
|
|
20
|
-
/** Data label value of the bar. If not specified, the x value is used. */
|
|
21
|
-
label?: string | number;
|
|
22
|
-
/** Individual opacity for the bar. */
|
|
23
|
-
opacity?: number;
|
|
24
|
-
};
|
|
25
|
-
export type BarYSeries<T = any> = BaseSeries & {
|
|
26
|
-
type: typeof SeriesType.BarY;
|
|
27
|
-
data: BarYSeriesData<T>[];
|
|
28
|
-
/** The name of the series (used in legend, tooltip etc) */
|
|
29
|
-
name: string;
|
|
30
|
-
/** The main color of the series (hex, rgba) */
|
|
31
|
-
color?: string;
|
|
32
|
-
/** Whether to stack the values of each series on top of each other.
|
|
33
|
-
* Possible values are undefined to disable, "normal" to stack by value or "percent"
|
|
34
|
-
*
|
|
35
|
-
* @default undefined
|
|
36
|
-
* */
|
|
37
|
-
stacking?: 'normal' | 'percent';
|
|
38
|
-
/** This option allows grouping series in a stacked chart */
|
|
39
|
-
stackId?: string;
|
|
40
|
-
/** Whether to group non-stacked columns or to let them render independent of each other.
|
|
41
|
-
* When false columns will be laid out individually and overlap each other.
|
|
42
|
-
*
|
|
43
|
-
* @default true
|
|
44
|
-
* */
|
|
45
|
-
grouping?: boolean;
|
|
46
|
-
dataLabels?: ChartKitWidgetSeriesOptions['dataLabels'] & {
|
|
47
|
-
/**
|
|
48
|
-
* Whether to align the data label inside or outside the box.
|
|
49
|
-
* For charts with a percentage stack, it is always true.
|
|
50
|
-
*
|
|
51
|
-
* @default false
|
|
52
|
-
* */
|
|
53
|
-
inside?: boolean;
|
|
54
|
-
};
|
|
55
|
-
/** Individual series legend options. Has higher priority than legend options in widget data */
|
|
56
|
-
legend?: ChartKitWidgetLegend & {
|
|
57
|
-
symbol?: RectLegendSymbolOptions;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
export type BaseSeries = {
|
|
2
|
-
/** Initial visibility of the series */
|
|
3
|
-
visible?: boolean;
|
|
4
|
-
/**
|
|
5
|
-
* Options for the series data labels, appearing next to each data point.
|
|
6
|
-
* */
|
|
7
|
-
dataLabels?: {
|
|
8
|
-
/**
|
|
9
|
-
* Enable or disable the data labels
|
|
10
|
-
* @default true
|
|
11
|
-
*/
|
|
12
|
-
enabled?: boolean;
|
|
13
|
-
style?: Partial<BaseTextStyle>;
|
|
14
|
-
/**
|
|
15
|
-
* @default 5
|
|
16
|
-
* */
|
|
17
|
-
padding?: number;
|
|
18
|
-
/**
|
|
19
|
-
* @default false
|
|
20
|
-
* */
|
|
21
|
-
allowOverlap?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Allows to use any html-tags to display the content.
|
|
24
|
-
* The element will be displayed outside the box of the SVG element.
|
|
25
|
-
*
|
|
26
|
-
* @default false
|
|
27
|
-
* */
|
|
28
|
-
html?: boolean;
|
|
29
|
-
};
|
|
30
|
-
/** You can set the cursor to "pointer" if you have click events attached to the series, to signal to the user that the points and lines can be clicked. */
|
|
31
|
-
cursor?: string;
|
|
32
|
-
};
|
|
33
|
-
export type BaseSeriesData<T = any> = {
|
|
34
|
-
/**
|
|
35
|
-
* A reserved subspace to store options and values for customized functionality
|
|
36
|
-
*
|
|
37
|
-
* Here you can add additional data for your own event callbacks and formatter callbacks
|
|
38
|
-
*/
|
|
39
|
-
custom?: T;
|
|
40
|
-
/** Individual color for the data chunk (point in scatter, segment in pie, bar etc) */
|
|
41
|
-
color?: string;
|
|
42
|
-
};
|
|
43
|
-
export type BaseTextStyle = {
|
|
44
|
-
fontSize: string;
|
|
45
|
-
fontWeight?: string;
|
|
46
|
-
fontColor?: string;
|
|
47
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export type ChartMargin = {
|
|
2
|
-
top: number;
|
|
3
|
-
right: number;
|
|
4
|
-
bottom: number;
|
|
5
|
-
left: number;
|
|
6
|
-
};
|
|
7
|
-
export type ChartKitWidgetChart = {
|
|
8
|
-
margin?: Partial<ChartMargin>;
|
|
9
|
-
events?: {
|
|
10
|
-
click?: (data: {
|
|
11
|
-
point: unknown;
|
|
12
|
-
series: unknown;
|
|
13
|
-
}, event: PointerEvent) => void;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/** The halo appearing around the hovered part of series(point in line-type series or slice in pie charts) */
|
|
2
|
-
export type Halo = {
|
|
3
|
-
/** Enable or disable the halo */
|
|
4
|
-
enabled?: boolean;
|
|
5
|
-
/** The opacity of halo */
|
|
6
|
-
opacity?: number;
|
|
7
|
-
/** The pixel size of the halo. Radius for point markers or width of the outside slice in pie charts. */
|
|
8
|
-
size?: number;
|
|
9
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { ChartKitWidgetXAxis, ChartKitWidgetYAxis } from './axis';
|
|
2
|
-
import type { ChartKitWidgetChart } from './chart';
|
|
3
|
-
import type { ChartKitWidgetLegend } from './legend';
|
|
4
|
-
import type { ChartKitWidgetSeries, ChartKitWidgetSeriesOptions } from './series';
|
|
5
|
-
import type { ChartKitWidgetSplit } from './split';
|
|
6
|
-
import type { ChartKitWidgetTitle } from './title';
|
|
7
|
-
import type { ChartKitWidgetTooltip } from './tooltip';
|
|
8
|
-
export * from './axis';
|
|
9
|
-
export * from './base';
|
|
10
|
-
export * from './chart';
|
|
11
|
-
export * from './legend';
|
|
12
|
-
export * from './pie';
|
|
13
|
-
export * from './scatter';
|
|
14
|
-
export * from './bar-x';
|
|
15
|
-
export * from './bar-y';
|
|
16
|
-
export * from './area';
|
|
17
|
-
export * from './line';
|
|
18
|
-
export * from './series';
|
|
19
|
-
export * from './split';
|
|
20
|
-
export * from './title';
|
|
21
|
-
export * from './tooltip';
|
|
22
|
-
export * from './halo';
|
|
23
|
-
export * from './treemap';
|
|
24
|
-
export * from './waterfall';
|
|
25
|
-
export type ChartKitWidgetData<T = any> = {
|
|
26
|
-
chart?: ChartKitWidgetChart;
|
|
27
|
-
legend?: ChartKitWidgetLegend;
|
|
28
|
-
series: {
|
|
29
|
-
data: ChartKitWidgetSeries<T>[];
|
|
30
|
-
options?: ChartKitWidgetSeriesOptions;
|
|
31
|
-
};
|
|
32
|
-
title?: ChartKitWidgetTitle;
|
|
33
|
-
tooltip?: ChartKitWidgetTooltip<T>;
|
|
34
|
-
xAxis?: ChartKitWidgetXAxis;
|
|
35
|
-
yAxis?: ChartKitWidgetYAxis[];
|
|
36
|
-
/** Setting for displaying charts on different plots.
|
|
37
|
-
* It can be used to visualize related information on multiple charts. */
|
|
38
|
-
split?: ChartKitWidgetSplit;
|
|
39
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export * from './axis';
|
|
2
|
-
export * from './base';
|
|
3
|
-
export * from './chart';
|
|
4
|
-
export * from './legend';
|
|
5
|
-
export * from './pie';
|
|
6
|
-
export * from './scatter';
|
|
7
|
-
export * from './bar-x';
|
|
8
|
-
export * from './bar-y';
|
|
9
|
-
export * from './area';
|
|
10
|
-
export * from './line';
|
|
11
|
-
export * from './series';
|
|
12
|
-
export * from './split';
|
|
13
|
-
export * from './title';
|
|
14
|
-
export * from './tooltip';
|
|
15
|
-
export * from './halo';
|
|
16
|
-
export * from './treemap';
|
|
17
|
-
export * from './waterfall';
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import type { BaseTextStyle } from './base';
|
|
2
|
-
export type ChartKitWidgetLegend = {
|
|
3
|
-
enabled?: boolean;
|
|
4
|
-
/**
|
|
5
|
-
* Different types for different color schemes.
|
|
6
|
-
* If the color scheme is continuous, a gradient legend will be drawn.
|
|
7
|
-
* Otherwise, samples for different point values
|
|
8
|
-
*
|
|
9
|
-
* @default 'discrete'
|
|
10
|
-
*/
|
|
11
|
-
type?: 'discrete' | 'continuous';
|
|
12
|
-
/**
|
|
13
|
-
* The horizontal alignment of the legend box within the chart area.
|
|
14
|
-
*
|
|
15
|
-
* @default center
|
|
16
|
-
* */
|
|
17
|
-
align?: 'left' | 'center' | 'right';
|
|
18
|
-
/**
|
|
19
|
-
* Defines the pixel distance between each legend item
|
|
20
|
-
*
|
|
21
|
-
* @default 20
|
|
22
|
-
* */
|
|
23
|
-
itemDistance?: number;
|
|
24
|
-
/** CSS styles for each legend item */
|
|
25
|
-
itemStyle?: BaseTextStyle;
|
|
26
|
-
/**
|
|
27
|
-
* The space between the legend and the axis labels or chart area.
|
|
28
|
-
*
|
|
29
|
-
* @default 15
|
|
30
|
-
*/
|
|
31
|
-
margin?: number;
|
|
32
|
-
title?: {
|
|
33
|
-
text?: string;
|
|
34
|
-
/** CSS styles for the title */
|
|
35
|
-
style?: Partial<BaseTextStyle>;
|
|
36
|
-
/** The distance(in pixels) between the main content of the legend and its title
|
|
37
|
-
*
|
|
38
|
-
* Defaults to 4 for horizontal axes, 8 for vertical.
|
|
39
|
-
* */
|
|
40
|
-
margin?: number;
|
|
41
|
-
};
|
|
42
|
-
colorScale?: {
|
|
43
|
-
stops?: number[];
|
|
44
|
-
colors: string[];
|
|
45
|
-
domain?: number[];
|
|
46
|
-
};
|
|
47
|
-
width?: number;
|
|
48
|
-
};
|
|
49
|
-
export type BaseLegendSymbol = {
|
|
50
|
-
/**
|
|
51
|
-
* The pixel padding between the legend item symbol and the legend item text.
|
|
52
|
-
*
|
|
53
|
-
* @default 5
|
|
54
|
-
* */
|
|
55
|
-
padding?: number;
|
|
56
|
-
};
|
|
57
|
-
export type RectLegendSymbolOptions = BaseLegendSymbol & {
|
|
58
|
-
/**
|
|
59
|
-
* The pixel width of the symbol for series types that use a rectangle in the legend
|
|
60
|
-
*
|
|
61
|
-
* @default 10
|
|
62
|
-
* */
|
|
63
|
-
width?: number;
|
|
64
|
-
/**
|
|
65
|
-
* The pixel width of the symbol for series types that use a rectangle in the legend
|
|
66
|
-
*
|
|
67
|
-
* @default 10
|
|
68
|
-
* */
|
|
69
|
-
height?: number;
|
|
70
|
-
/**
|
|
71
|
-
* The border radius of the symbol for series types that use a rectangle in the legend.
|
|
72
|
-
*
|
|
73
|
-
* Defaults to half the symbolHeight, effectively creating a circle.
|
|
74
|
-
*/
|
|
75
|
-
radius?: number;
|
|
76
|
-
};
|
|
77
|
-
export type PathLegendSymbolOptions = BaseLegendSymbol & {
|
|
78
|
-
/**
|
|
79
|
-
* The pixel width of the symbol for series types that use a path in the legend
|
|
80
|
-
*
|
|
81
|
-
* @default 16
|
|
82
|
-
* */
|
|
83
|
-
width?: number;
|
|
84
|
-
};
|
|
85
|
-
export type SymbolLegendSymbolOptions = BaseLegendSymbol & {
|
|
86
|
-
/**
|
|
87
|
-
* The pixel width of the symbol for series types that use a symbol in the legend
|
|
88
|
-
*
|
|
89
|
-
* @default 8
|
|
90
|
-
* */
|
|
91
|
-
width?: number;
|
|
92
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|