@antv/gpt-vis 0.5.5 → 0.5.7
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/dist/cjs/Area/index.d.ts +2 -3
- package/dist/cjs/Area/index.js +48 -5
- package/dist/cjs/Bar/index.d.ts +5 -2
- package/dist/cjs/Bar/index.js +43 -7
- package/dist/cjs/Boxplot/index.d.ts +13 -0
- package/dist/cjs/Boxplot/index.js +88 -0
- package/dist/cjs/ChartCodeRender/VisChart.d.ts +7 -1
- package/dist/cjs/ChartCodeRender/VisChart.js +100 -12
- package/dist/cjs/ChartCodeRender/index.js +16 -2
- package/dist/cjs/ChartCodeRender/type.d.ts +104 -5
- package/dist/cjs/Column/index.d.ts +5 -3
- package/dist/cjs/Column/index.js +44 -7
- package/dist/cjs/ConfigProvider/hooks/useConfig.js +2 -1
- package/dist/cjs/DualAxes/index.d.ts +1 -1
- package/dist/cjs/DualAxes/index.js +20 -8
- package/dist/cjs/FishboneDiagram/index.d.ts +1 -0
- package/dist/cjs/FishboneDiagram/index.js +21 -7
- package/dist/cjs/Funnel/index.d.ts +12 -0
- package/dist/cjs/Funnel/index.js +173 -0
- package/dist/cjs/Histogram/index.d.ts +4 -3
- package/dist/cjs/Histogram/index.js +32 -3
- package/dist/cjs/IndentedTree/index.d.ts +1 -0
- package/dist/cjs/IndentedTree/index.js +32 -20
- package/dist/cjs/Line/index.d.ts +2 -3
- package/dist/cjs/Line/index.js +36 -3
- package/dist/cjs/Liquid/index.d.ts +11 -0
- package/dist/cjs/Liquid/index.js +85 -0
- package/dist/cjs/MindMap/index.d.ts +1 -0
- package/dist/cjs/MindMap/index.js +29 -21
- package/dist/cjs/Pie/index.d.ts +2 -2
- package/dist/cjs/Pie/index.js +22 -3
- package/dist/cjs/Radar/index.d.ts +5 -3
- package/dist/cjs/Radar/index.js +106 -37
- package/dist/cjs/Sankey/index.d.ts +12 -0
- package/dist/cjs/Sankey/index.js +106 -0
- package/dist/cjs/Scatter/index.d.ts +2 -3
- package/dist/cjs/Scatter/index.js +52 -6
- package/dist/cjs/Treemap/index.d.ts +2 -3
- package/dist/cjs/Treemap/index.js +23 -3
- package/dist/cjs/Venn/index.d.ts +32 -0
- package/dist/cjs/Venn/index.js +87 -0
- package/dist/cjs/Violin/index.d.ts +10 -0
- package/dist/cjs/Violin/index.js +185 -0
- package/dist/cjs/WordCloud/index.d.ts +2 -3
- package/dist/cjs/WordCloud/index.js +34 -7
- package/dist/cjs/export.d.ts +7 -1
- package/dist/cjs/export.js +38 -8
- package/dist/cjs/theme.d.ts +2 -0
- package/dist/cjs/theme.js +133 -0
- package/dist/cjs/types/chart.d.ts +17 -0
- package/dist/cjs/types/chart.js +6 -0
- package/dist/cjs/utils/palette.d.ts +2 -0
- package/dist/cjs/utils/palette.js +54 -0
- package/dist/cjs/utils/plot.d.ts +1 -0
- package/dist/cjs/utils/plot.js +15 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Area/index.d.ts +2 -3
- package/dist/esm/Area/index.js +80 -6
- package/dist/esm/Bar/index.d.ts +5 -2
- package/dist/esm/Bar/index.js +66 -9
- package/dist/esm/Boxplot/index.d.ts +13 -0
- package/dist/esm/Boxplot/index.js +83 -0
- package/dist/esm/ChartCodeRender/VisChart.d.ts +7 -1
- package/dist/esm/ChartCodeRender/VisChart.js +144 -34
- package/dist/esm/ChartCodeRender/index.js +15 -1
- package/dist/esm/ChartCodeRender/type.d.ts +104 -5
- package/dist/esm/Column/index.d.ts +5 -3
- package/dist/esm/Column/index.js +67 -9
- package/dist/esm/ConfigProvider/hooks/useConfig.js +9 -1
- package/dist/esm/DualAxes/index.d.ts +1 -1
- package/dist/esm/DualAxes/index.js +35 -12
- package/dist/esm/FishboneDiagram/index.d.ts +1 -0
- package/dist/esm/FishboneDiagram/index.js +23 -7
- package/dist/esm/Funnel/index.d.ts +12 -0
- package/dist/esm/Funnel/index.js +171 -0
- package/dist/esm/Histogram/index.d.ts +4 -3
- package/dist/esm/Histogram/index.js +55 -5
- package/dist/esm/IndentedTree/index.d.ts +1 -0
- package/dist/esm/IndentedTree/index.js +36 -29
- package/dist/esm/Line/index.d.ts +2 -3
- package/dist/esm/Line/index.js +63 -4
- package/dist/esm/Liquid/index.d.ts +11 -0
- package/dist/esm/Liquid/index.js +100 -0
- package/dist/esm/MindMap/index.d.ts +1 -0
- package/dist/esm/MindMap/index.js +37 -30
- package/dist/esm/Pie/index.d.ts +2 -2
- package/dist/esm/Pie/index.js +37 -4
- package/dist/esm/Radar/index.d.ts +5 -3
- package/dist/esm/Radar/index.js +138 -42
- package/dist/esm/Sankey/index.d.ts +12 -0
- package/dist/esm/Sankey/index.js +88 -0
- package/dist/esm/Scatter/index.d.ts +2 -3
- package/dist/esm/Scatter/index.js +76 -11
- package/dist/esm/Treemap/index.d.ts +2 -3
- package/dist/esm/Treemap/index.js +39 -4
- package/dist/esm/Venn/index.d.ts +32 -0
- package/dist/esm/Venn/index.js +69 -0
- package/dist/esm/Violin/index.d.ts +10 -0
- package/dist/esm/Violin/index.js +192 -0
- package/dist/esm/WordCloud/index.d.ts +2 -3
- package/dist/esm/WordCloud/index.js +51 -9
- package/dist/esm/export.d.ts +7 -1
- package/dist/esm/export.js +8 -2
- package/dist/esm/theme.d.ts +2 -0
- package/dist/esm/theme.js +103 -0
- package/dist/esm/types/chart.d.ts +17 -0
- package/dist/esm/types/chart.js +6 -0
- package/dist/esm/utils/palette.d.ts +2 -0
- package/dist/esm/utils/palette.js +2 -0
- package/dist/esm/utils/plot.d.ts +1 -0
- package/dist/esm/utils/plot.js +10 -0
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/umd/373.async.js +1 -0
- package/dist/umd/index.min.js +1 -1
- package/package.json +2 -1
- package/dist/umd/962.async.js +0 -1
|
@@ -1,17 +1,59 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
1
7
|
import { WordCloud as ADCWordCloud } from '@ant-design/plots';
|
|
2
8
|
import React from 'react';
|
|
3
9
|
import { usePlotConfig } from "../ConfigProvider/hooks";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
import { THEME_MAP } from "../theme";
|
|
11
|
+
var defaultConfig = function defaultConfig(props) {
|
|
12
|
+
var data = props.data,
|
|
13
|
+
_props$style = props.style,
|
|
14
|
+
style = _props$style === void 0 ? {} : _props$style;
|
|
15
|
+
var backgroundColor = style.backgroundColor,
|
|
16
|
+
palette = style.palette;
|
|
17
|
+
var hasPalette = !!(palette !== null && palette !== void 0 && palette[0]);
|
|
18
|
+
var paletteConfig = {
|
|
19
|
+
color: undefined
|
|
20
|
+
};
|
|
21
|
+
if (hasPalette) {
|
|
22
|
+
paletteConfig = {
|
|
23
|
+
color: {
|
|
24
|
+
range: palette
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
return _objectSpread(_objectSpread({
|
|
29
|
+
data: data,
|
|
30
|
+
layout: {
|
|
31
|
+
fontSize: [20, 100]
|
|
32
|
+
},
|
|
33
|
+
colorField: 'text',
|
|
34
|
+
legend: false,
|
|
35
|
+
tooltip: false,
|
|
36
|
+
encode: {
|
|
37
|
+
text: 'text',
|
|
38
|
+
color: 'text',
|
|
39
|
+
value: 'value'
|
|
40
|
+
}
|
|
41
|
+
}, backgroundColor ? {
|
|
42
|
+
viewStyle: {
|
|
43
|
+
viewFill: backgroundColor
|
|
44
|
+
}
|
|
45
|
+
} : {
|
|
46
|
+
viewStyle: undefined
|
|
47
|
+
}), {}, {
|
|
48
|
+
scale: _objectSpread({}, paletteConfig)
|
|
49
|
+
});
|
|
12
50
|
};
|
|
13
51
|
var WordCloud = function WordCloud(props) {
|
|
14
|
-
var
|
|
52
|
+
var _props$theme;
|
|
53
|
+
var themeConfig = THEME_MAP[(_props$theme = props.theme) !== null && _props$theme !== void 0 ? _props$theme : 'default'];
|
|
54
|
+
var config = usePlotConfig('WordCloud', defaultConfig, _objectSpread(_objectSpread({}, props), {}, {
|
|
55
|
+
theme: themeConfig
|
|
56
|
+
}));
|
|
15
57
|
return /*#__PURE__*/React.createElement(ADCWordCloud, config);
|
|
16
58
|
};
|
|
17
59
|
export default WordCloud;
|
package/dist/esm/export.d.ts
CHANGED
|
@@ -2,14 +2,20 @@
|
|
|
2
2
|
/********** plot chart **********/
|
|
3
3
|
import { default as Area, type AreaProps } from './Area';
|
|
4
4
|
import { default as Bar, type BarProps } from './Bar';
|
|
5
|
+
import { default as Boxplot, type BoxplotProps } from './Boxplot';
|
|
5
6
|
import { default as Column, type ColumnProps } from './Column';
|
|
6
7
|
import { default as DualAxes, type DualAxesProps } from './DualAxes';
|
|
8
|
+
import { default as Funnel, type FunnelProps } from './Funnel';
|
|
7
9
|
import { default as Histogram, type HistogramProps } from './Histogram';
|
|
8
10
|
import { default as Line, type LineProps } from './Line';
|
|
11
|
+
import { default as Liquid, type LiquidProps } from './Liquid';
|
|
9
12
|
import { default as Pie, type PieProps } from './Pie';
|
|
10
13
|
import { default as Radar, type RadarProps } from './Radar';
|
|
14
|
+
import { default as Sankey, type SankeyProps } from './Sankey';
|
|
11
15
|
import { default as Scatter, type ScatterProps } from './Scatter';
|
|
12
16
|
import { default as Treemap, type TreemapProps } from './Treemap';
|
|
17
|
+
import { default as Venn, type VennProps } from './Venn';
|
|
18
|
+
import { default as Violin, type ViolinProps } from './Violin';
|
|
13
19
|
import { default as WordCloud, type WordCloudProps } from './WordCloud';
|
|
14
20
|
/********** graph chart **********/
|
|
15
21
|
import { default as FishboneDiagram, type FishboneDiagramProps } from './FishboneDiagram';
|
|
@@ -23,5 +29,5 @@ export { Map, type MapProps } from './export-map';
|
|
|
23
29
|
import { PinMap, type PinMapProps, HeatMap, type HeatMapProps, PathMap, type PathMapProps } from './export-map';
|
|
24
30
|
/********** NTV **********/
|
|
25
31
|
export { VisText, type VisTextProps } from './Text';
|
|
26
|
-
export { Area, Bar, Column, DualAxes, FishboneDiagram, FlowDiagram, HeatMap, Histogram, Line, MindMap, NetworkGraph, PathMap, Pie, PinMap, Radar, Scatter, Treemap, WordCloud, type AreaProps, type BarProps, type ColumnProps, type DualAxesProps, type FishboneDiagramProps, type FlowDiagramProps, type HeatMapProps, type HistogramProps, type LineProps, type MindMapProps, type NetworkGraphProps, type PathMapProps, type PieProps, type PinMapProps, type RadarProps, type ScatterProps, type TreemapProps, type WordCloudProps, };
|
|
32
|
+
export { Area, Bar, Boxplot, Column, DualAxes, FishboneDiagram, FlowDiagram, Funnel, HeatMap, Histogram, Line, Liquid, MindMap, NetworkGraph, PathMap, Pie, PinMap, Radar, Sankey, Scatter, Treemap, Venn, Violin, WordCloud, type AreaProps, type BarProps, type BoxplotProps, type ColumnProps, type DualAxesProps, type FishboneDiagramProps, type FlowDiagramProps, type FunnelProps, type HeatMapProps, type HistogramProps, type LineProps, type LiquidProps, type MindMapProps, type NetworkGraphProps, type PathMapProps, type PieProps, type PinMapProps, type RadarProps, type SankeyProps, type ScatterProps, type TreemapProps, type VennProps, type ViolinProps, type WordCloudProps, };
|
|
27
33
|
export declare const DEFAULT_CHART_COMPONENTS: Record<string, React.FC<any>>;
|
package/dist/esm/export.js
CHANGED
|
@@ -9,14 +9,20 @@ import { ChartType } from "./types";
|
|
|
9
9
|
/********** plot chart **********/
|
|
10
10
|
import { default as Area } from "./Area";
|
|
11
11
|
import { default as Bar } from "./Bar";
|
|
12
|
+
import { default as Boxplot } from "./Boxplot";
|
|
12
13
|
import { default as Column } from "./Column";
|
|
13
14
|
import { default as DualAxes } from "./DualAxes";
|
|
15
|
+
import { default as Funnel } from "./Funnel";
|
|
14
16
|
import { default as Histogram } from "./Histogram";
|
|
15
17
|
import { default as Line } from "./Line";
|
|
18
|
+
import { default as Liquid } from "./Liquid";
|
|
16
19
|
import { default as Pie } from "./Pie";
|
|
17
20
|
import { default as Radar } from "./Radar";
|
|
21
|
+
import { default as Sankey } from "./Sankey";
|
|
18
22
|
import { default as Scatter } from "./Scatter";
|
|
19
23
|
import { default as Treemap } from "./Treemap";
|
|
24
|
+
import { default as Venn } from "./Venn";
|
|
25
|
+
import { default as Violin } from "./Violin";
|
|
20
26
|
import { default as WordCloud } from "./WordCloud";
|
|
21
27
|
|
|
22
28
|
/********** graph chart **********/
|
|
@@ -33,5 +39,5 @@ import { PinMap, HeatMap, PathMap } from "./export-map";
|
|
|
33
39
|
|
|
34
40
|
/********** NTV **********/
|
|
35
41
|
export { VisText } from "./Text";
|
|
36
|
-
export { Area, Bar, Column, DualAxes, FishboneDiagram, FlowDiagram, HeatMap, Histogram, Line, MindMap, NetworkGraph, PathMap, Pie, PinMap, Radar, Scatter, Treemap, WordCloud };
|
|
37
|
-
export var DEFAULT_CHART_COMPONENTS = (_DEFAULT_CHART_COMPON = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_DEFAULT_CHART_COMPON, ChartType.
|
|
42
|
+
export { Area, Bar, Boxplot, Column, DualAxes, FishboneDiagram, FlowDiagram, Funnel, HeatMap, Histogram, Line, Liquid, MindMap, NetworkGraph, PathMap, Pie, PinMap, Radar, Sankey, Scatter, Treemap, Venn, Violin, WordCloud };
|
|
43
|
+
export var DEFAULT_CHART_COMPONENTS = (_DEFAULT_CHART_COMPON = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_DEFAULT_CHART_COMPON, ChartType.Area, Area), ChartType.Bar, Bar), ChartType.Boxplot, Boxplot), ChartType.Column, Column), ChartType.DualAxes, DualAxes), ChartType.FishboneDiagram, FishboneDiagram), ChartType.FlowDiagram, FlowDiagram), ChartType.Funnel, Funnel), ChartType.HeatMap, HeatMap), ChartType.Histogram, Histogram), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_DEFAULT_CHART_COMPON, ChartType.Line, Line), ChartType.Liquid, Liquid), ChartType.MindMap, MindMap), ChartType.NetworkGraph, NetworkGraph), ChartType.Pie, Pie), ChartType.PinMap, PinMap), ChartType.Radar, Radar), ChartType.Sankey, Sankey), ChartType.Scatter, Scatter), ChartType.Treemap, Treemap), _defineProperty(_defineProperty(_defineProperty(_DEFAULT_CHART_COMPON, ChartType.Venn, Venn), ChartType.Violin, Violin), ChartType.WordCloud, WordCloud));
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { ACADEMY_COLOR_PALETTE, DEFAULT_COLOR_PALETTE } from "./utils/palette";
|
|
2
|
+
var DEFAULT_THEME = {
|
|
3
|
+
type: 'light',
|
|
4
|
+
view: {
|
|
5
|
+
viewFill: '#FFF',
|
|
6
|
+
plotFill: 'transparent',
|
|
7
|
+
mainFill: 'transparent',
|
|
8
|
+
contentFill: 'transparent'
|
|
9
|
+
},
|
|
10
|
+
interval: {
|
|
11
|
+
rect: {
|
|
12
|
+
fillOpacity: 0.8
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
line: {
|
|
16
|
+
line: {
|
|
17
|
+
lineWidth: 2
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
area: {
|
|
21
|
+
area: {
|
|
22
|
+
fillOpacity: 0.6
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
point: {
|
|
26
|
+
point: {
|
|
27
|
+
lineWidth: 1
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
var DARK_THEME = {
|
|
32
|
+
type: 'dark',
|
|
33
|
+
view: {
|
|
34
|
+
viewFill: '#000',
|
|
35
|
+
plotFill: 'transparent',
|
|
36
|
+
mainFill: 'transparent',
|
|
37
|
+
contentFill: 'transparent'
|
|
38
|
+
},
|
|
39
|
+
interval: {
|
|
40
|
+
rect: {
|
|
41
|
+
fillOpacity: 0.8
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
line: {
|
|
45
|
+
line: {
|
|
46
|
+
lineWidth: 2
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
area: {
|
|
50
|
+
area: {
|
|
51
|
+
fillOpacity: 0.6
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
point: {
|
|
55
|
+
point: {
|
|
56
|
+
lineWidth: 1
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
var ACADEMY_THEME = {
|
|
61
|
+
type: 'academy',
|
|
62
|
+
view: {
|
|
63
|
+
viewFill: '#FFF',
|
|
64
|
+
plotFill: 'transparent',
|
|
65
|
+
mainFill: 'transparent',
|
|
66
|
+
contentFill: 'transparent'
|
|
67
|
+
},
|
|
68
|
+
interval: {
|
|
69
|
+
rect: {
|
|
70
|
+
fillOpacity: 0.8
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
line: {
|
|
74
|
+
line: {
|
|
75
|
+
lineWidth: 2
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
area: {
|
|
79
|
+
area: {
|
|
80
|
+
fillOpacity: 0.6
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
point: {
|
|
84
|
+
point: {
|
|
85
|
+
lineWidth: 1
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
export var THEME_MAP = {
|
|
90
|
+
default: DEFAULT_THEME,
|
|
91
|
+
academy: ACADEMY_THEME,
|
|
92
|
+
dark: DARK_THEME
|
|
93
|
+
};
|
|
94
|
+
export var G6THEME_MAP = {
|
|
95
|
+
default: {
|
|
96
|
+
type: 'assign-color-by-branch',
|
|
97
|
+
colors: DEFAULT_COLOR_PALETTE
|
|
98
|
+
},
|
|
99
|
+
academy: {
|
|
100
|
+
type: 'assign-color-by-branch',
|
|
101
|
+
colors: ACADEMY_COLOR_PALETTE
|
|
102
|
+
}
|
|
103
|
+
};
|
|
@@ -14,6 +14,12 @@ export declare enum ChartType {
|
|
|
14
14
|
WordCloud = "word-cloud",
|
|
15
15
|
DualAxes = "dual-axes",
|
|
16
16
|
Radar = "radar",
|
|
17
|
+
Liquid = "liquid",
|
|
18
|
+
Boxplot = "boxplot",
|
|
19
|
+
Violin = "violin",
|
|
20
|
+
Venn = "venn",
|
|
21
|
+
Funnel = "funnel",
|
|
22
|
+
Sankey = "sankey",
|
|
17
23
|
PinMap = "pin-map",
|
|
18
24
|
PathMap = "path-map",
|
|
19
25
|
HeatMap = "heat-map",
|
|
@@ -35,6 +41,7 @@ export interface BasePlotProps<T> extends BaseChartProps {
|
|
|
35
41
|
data: T[];
|
|
36
42
|
axisXTitle?: string;
|
|
37
43
|
axisYTitle?: string;
|
|
44
|
+
title?: string;
|
|
38
45
|
}
|
|
39
46
|
export interface BaseMapProps<T> extends BaseChartProps, Map {
|
|
40
47
|
style?: CSSProperties;
|
|
@@ -65,3 +72,13 @@ export interface GraphProps extends BaseGraphProps<GraphData> {
|
|
|
65
72
|
}
|
|
66
73
|
export interface TreeGraphProps extends BaseGraphProps<TreeGraphData> {
|
|
67
74
|
}
|
|
75
|
+
export interface Theme {
|
|
76
|
+
theme?: 'default' | 'academy' | 'dark';
|
|
77
|
+
}
|
|
78
|
+
export interface Style {
|
|
79
|
+
style?: {
|
|
80
|
+
lineWidth?: number;
|
|
81
|
+
backgroundColor?: string;
|
|
82
|
+
palette?: string[];
|
|
83
|
+
};
|
|
84
|
+
}
|
package/dist/esm/types/chart.js
CHANGED
|
@@ -10,6 +10,12 @@ export var ChartType = /*#__PURE__*/function (ChartType) {
|
|
|
10
10
|
ChartType["WordCloud"] = "word-cloud";
|
|
11
11
|
ChartType["DualAxes"] = "dual-axes";
|
|
12
12
|
ChartType["Radar"] = "radar";
|
|
13
|
+
ChartType["Liquid"] = "liquid";
|
|
14
|
+
ChartType["Boxplot"] = "boxplot";
|
|
15
|
+
ChartType["Violin"] = "violin";
|
|
16
|
+
ChartType["Venn"] = "venn";
|
|
17
|
+
ChartType["Funnel"] = "funnel";
|
|
18
|
+
ChartType["Sankey"] = "sankey";
|
|
13
19
|
ChartType["PinMap"] = "pin-map";
|
|
14
20
|
ChartType["PathMap"] = "path-map";
|
|
15
21
|
ChartType["HeatMap"] = "heat-map";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export var DEFAULT_COLOR_PALETTE = ['#1783FF', '#F08F56', '#D580FF', '#00C9C9', '#7863FF', '#DB9D0D', '#60C42D', '#FF80CA', '#2491B3', '#17C76F'];
|
|
2
|
+
export var ACADEMY_COLOR_PALETTE = ['#4e79a7', '#f28e2c', '#e15759', '#76b7b2', '#59a14f', '#edc949', '#af7aa1', '#ff9da7', '#9c755f', '#bab0ab'];
|
package/dist/esm/utils/plot.d.ts
CHANGED
package/dist/esm/utils/plot.js
CHANGED
|
@@ -73,4 +73,14 @@ export function transform2ADCProps(props) {
|
|
|
73
73
|
var transformedEncode = visG2Encode2ADCEncode(props);
|
|
74
74
|
var transformedAxis = axisTitle2G2axis(transformedEncode);
|
|
75
75
|
return transformedAxis;
|
|
76
|
+
}
|
|
77
|
+
export function groupBy(data, keyFunc) {
|
|
78
|
+
return data.reduce(function (acc, item) {
|
|
79
|
+
var key = keyFunc(item);
|
|
80
|
+
if (!acc[key]) {
|
|
81
|
+
acc[key] = [];
|
|
82
|
+
}
|
|
83
|
+
acc[key].push(item);
|
|
84
|
+
return acc;
|
|
85
|
+
}, {});
|
|
76
86
|
}
|
package/dist/esm/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "0.5.
|
|
1
|
+
declare const _default: "0.5.7";
|
|
2
2
|
export default _default;
|
package/dist/esm/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '0.5.
|
|
1
|
+
export default '0.5.7';
|