@antv/gpt-vis 0.6.1 → 1.0.0-beta.2
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/README.md +185 -114
- package/README.zh-CN.md +187 -112
- package/dist/cjs/gpt-vis/index.d.ts +115 -0
- package/dist/cjs/gpt-vis/index.js +196 -0
- package/dist/cjs/index.d.ts +57 -13
- package/dist/cjs/index.js +85 -35
- package/dist/cjs/syntax/index.d.ts +2 -0
- package/dist/cjs/{Text/mini-charts/hooks → syntax}/index.js +9 -7
- package/dist/cjs/syntax/parser.d.ts +82 -0
- package/dist/cjs/syntax/parser.js +348 -0
- package/dist/cjs/types/index.d.ts +33 -2
- package/dist/cjs/types/index.js +0 -6
- package/dist/cjs/util/container.d.ts +5 -0
- package/dist/cjs/{utils/map/util.js → util/container.js} +18 -13
- package/dist/cjs/util/theme.d.ts +26 -0
- package/dist/cjs/{theme.js → util/theme.js} +70 -14
- package/dist/cjs/vis/area/index.d.ts +60 -0
- package/dist/cjs/vis/area/index.js +152 -0
- package/dist/cjs/vis/bar/index.d.ts +60 -0
- package/dist/cjs/vis/bar/index.js +123 -0
- package/dist/cjs/vis/boxplot/index.d.ts +59 -0
- package/dist/cjs/vis/boxplot/index.js +111 -0
- package/dist/cjs/vis/column/index.d.ts +60 -0
- package/dist/cjs/vis/column/index.js +122 -0
- package/dist/cjs/vis/dual-axes/index.d.ts +64 -0
- package/dist/cjs/vis/dual-axes/index.js +148 -0
- package/dist/cjs/vis/fishbone-diagram/index.d.ts +35 -0
- package/dist/cjs/vis/fishbone-diagram/index.js +183 -0
- package/dist/cjs/vis/flow-diagram/index.d.ts +27 -0
- package/dist/cjs/vis/flow-diagram/index.js +271 -0
- package/dist/cjs/vis/funnel/index.d.ts +54 -0
- package/dist/cjs/vis/funnel/index.js +190 -0
- package/dist/cjs/vis/histogram/index.d.ts +47 -0
- package/dist/cjs/vis/histogram/index.js +108 -0
- package/dist/cjs/vis/indented-tree/index.d.ts +40 -0
- package/dist/cjs/vis/indented-tree/index.js +375 -0
- package/dist/cjs/vis/line/index.d.ts +59 -0
- package/dist/cjs/vis/line/index.js +105 -0
- package/dist/cjs/vis/liquid/index.d.ts +44 -0
- package/dist/cjs/vis/liquid/index.js +88 -0
- package/dist/cjs/vis/mindmap/index.d.ts +32 -0
- package/dist/cjs/vis/mindmap/index.js +214 -0
- package/dist/cjs/vis/network-graph/index.d.ts +59 -0
- package/dist/cjs/vis/network-graph/index.js +166 -0
- package/dist/cjs/vis/organization-chart/index.d.ts +64 -0
- package/dist/cjs/vis/organization-chart/index.js +191 -0
- package/dist/cjs/vis/pie/index.d.ts +55 -0
- package/dist/cjs/vis/pie/index.js +108 -0
- package/dist/cjs/vis/radar/index.d.ts +58 -0
- package/dist/cjs/vis/radar/index.js +153 -0
- package/dist/cjs/vis/sankey/index.d.ts +56 -0
- package/dist/cjs/vis/sankey/index.js +94 -0
- package/dist/cjs/vis/scatter/index.d.ts +54 -0
- package/dist/cjs/vis/scatter/index.js +95 -0
- package/dist/cjs/vis/summary/index.d.ts +41 -0
- package/dist/cjs/vis/summary/index.js +71 -0
- package/dist/cjs/vis/table/index.d.ts +50 -0
- package/dist/cjs/vis/table/index.js +209 -0
- package/dist/cjs/vis/treemap/index.d.ts +68 -0
- package/dist/cjs/vis/treemap/index.js +106 -0
- package/dist/cjs/vis/venn/index.d.ts +55 -0
- package/dist/cjs/vis/venn/index.js +115 -0
- package/dist/cjs/vis/violin/index.d.ts +59 -0
- package/dist/cjs/vis/violin/index.js +156 -0
- package/dist/cjs/vis/waterfall/index.d.ts +64 -0
- package/dist/cjs/vis/waterfall/index.js +195 -0
- package/dist/cjs/vis/word-cloud/index.d.ts +53 -0
- package/dist/cjs/vis/word-cloud/index.js +90 -0
- package/dist/cjs/vis-wrapper/icons.d.ts +8 -0
- package/dist/cjs/vis-wrapper/icons.js +63 -0
- package/dist/cjs/vis-wrapper/index.d.ts +25 -0
- package/dist/cjs/vis-wrapper/index.js +242 -0
- package/dist/cjs/vis-wrapper/styles.d.ts +8 -0
- package/dist/cjs/vis-wrapper/styles.js +221 -0
- package/dist/esm/gpt-vis/index.d.ts +115 -0
- package/dist/esm/gpt-vis/index.js +245 -0
- package/dist/esm/index.d.ts +57 -13
- package/dist/esm/index.js +28 -15
- package/dist/esm/syntax/index.d.ts +2 -0
- package/dist/esm/syntax/index.js +1 -0
- package/dist/esm/syntax/parser.d.ts +82 -0
- package/dist/esm/syntax/parser.js +559 -0
- package/dist/esm/types/index.d.ts +33 -2
- package/dist/esm/types/index.js +0 -1
- package/dist/esm/util/container.d.ts +5 -0
- package/dist/esm/util/container.js +20 -0
- package/dist/esm/util/theme.d.ts +26 -0
- package/dist/esm/util/theme.js +150 -0
- package/dist/esm/vis/area/index.d.ts +60 -0
- package/dist/esm/vis/area/index.js +231 -0
- package/dist/esm/vis/bar/index.d.ts +60 -0
- package/dist/esm/vis/bar/index.js +204 -0
- package/dist/esm/vis/boxplot/index.d.ts +59 -0
- package/dist/esm/vis/boxplot/index.js +177 -0
- package/dist/esm/vis/column/index.d.ts +60 -0
- package/dist/esm/vis/column/index.js +199 -0
- package/dist/esm/vis/dual-axes/index.d.ts +64 -0
- package/dist/esm/vis/dual-axes/index.js +235 -0
- package/dist/esm/vis/fishbone-diagram/index.d.ts +35 -0
- package/dist/esm/vis/fishbone-diagram/index.js +218 -0
- package/dist/esm/vis/flow-diagram/index.d.ts +27 -0
- package/dist/esm/vis/flow-diagram/index.js +342 -0
- package/dist/esm/vis/funnel/index.d.ts +54 -0
- package/dist/esm/vis/funnel/index.js +247 -0
- package/dist/esm/vis/histogram/index.d.ts +47 -0
- package/dist/esm/vis/histogram/index.js +147 -0
- package/dist/esm/vis/indented-tree/index.d.ts +40 -0
- package/dist/esm/vis/indented-tree/index.js +564 -0
- package/dist/esm/vis/line/index.d.ts +59 -0
- package/dist/esm/vis/line/index.js +173 -0
- package/dist/esm/vis/liquid/index.d.ts +44 -0
- package/dist/esm/vis/liquid/index.js +131 -0
- package/dist/esm/vis/mindmap/index.d.ts +32 -0
- package/dist/esm/vis/mindmap/index.js +315 -0
- package/dist/esm/vis/network-graph/index.d.ts +59 -0
- package/dist/esm/vis/network-graph/index.js +240 -0
- package/dist/esm/vis/organization-chart/index.d.ts +64 -0
- package/dist/esm/vis/organization-chart/index.js +269 -0
- package/dist/esm/vis/pie/index.d.ts +55 -0
- package/dist/esm/vis/pie/index.js +164 -0
- package/dist/esm/vis/radar/index.d.ts +58 -0
- package/dist/esm/vis/radar/index.js +238 -0
- package/dist/esm/vis/sankey/index.d.ts +56 -0
- package/dist/esm/vis/sankey/index.js +136 -0
- package/dist/esm/vis/scatter/index.d.ts +54 -0
- package/dist/esm/vis/scatter/index.js +159 -0
- package/dist/esm/vis/summary/index.d.ts +41 -0
- package/dist/esm/vis/summary/index.js +101 -0
- package/dist/esm/vis/table/index.d.ts +50 -0
- package/dist/esm/vis/table/index.js +167 -0
- package/dist/esm/vis/treemap/index.d.ts +68 -0
- package/dist/esm/vis/treemap/index.js +159 -0
- package/dist/esm/vis/venn/index.d.ts +55 -0
- package/dist/esm/vis/venn/index.js +167 -0
- package/dist/esm/vis/violin/index.d.ts +59 -0
- package/dist/esm/vis/violin/index.js +246 -0
- package/dist/esm/vis/waterfall/index.d.ts +64 -0
- package/dist/esm/vis/waterfall/index.js +263 -0
- package/dist/esm/vis/word-cloud/index.d.ts +53 -0
- package/dist/esm/vis/word-cloud/index.js +129 -0
- package/dist/esm/vis-wrapper/icons.d.ts +8 -0
- package/dist/esm/vis-wrapper/icons.js +29 -0
- package/dist/esm/vis-wrapper/index.d.ts +25 -0
- package/dist/esm/vis-wrapper/index.js +242 -0
- package/dist/esm/vis-wrapper/styles.d.ts +8 -0
- package/dist/esm/vis-wrapper/styles.js +21 -0
- package/dist/umd/index.min.js +1 -1
- package/package.json +18 -59
- package/README.ja-JP.md +0 -164
- package/dist/cjs/Area/index.d.ts +0 -11
- package/dist/cjs/Area/index.js +0 -105
- package/dist/cjs/Bar/index.d.ts +0 -14
- package/dist/cjs/Bar/index.js +0 -101
- package/dist/cjs/Boxplot/index.d.ts +0 -11
- package/dist/cjs/Boxplot/index.js +0 -88
- package/dist/cjs/ChartCodeRender/Loading.d.ts +0 -6
- package/dist/cjs/ChartCodeRender/Loading.js +0 -54
- package/dist/cjs/ChartCodeRender/VisChart.d.ts +0 -19
- package/dist/cjs/ChartCodeRender/VisChart.js +0 -338
- package/dist/cjs/ChartCodeRender/icon.d.ts +0 -10
- package/dist/cjs/ChartCodeRender/icon.js +0 -162
- package/dist/cjs/ChartCodeRender/index.d.ts +0 -8
- package/dist/cjs/ChartCodeRender/index.js +0 -113
- package/dist/cjs/ChartCodeRender/styles.d.ts +0 -19
- package/dist/cjs/ChartCodeRender/styles.js +0 -232
- package/dist/cjs/ChartCodeRender/type.d.ts +0 -176
- package/dist/cjs/ChartCodeRender/type.js +0 -17
- package/dist/cjs/ChartCodeRender/utils.d.ts +0 -1
- package/dist/cjs/ChartCodeRender/utils.js +0 -51
- package/dist/cjs/Column/index.d.ts +0 -14
- package/dist/cjs/Column/index.js +0 -102
- package/dist/cjs/ConfigProvider/context.d.ts +0 -3
- package/dist/cjs/ConfigProvider/context.js +0 -41
- package/dist/cjs/ConfigProvider/hooks/index.d.ts +0 -1
- package/dist/cjs/ConfigProvider/hooks/index.js +0 -23
- package/dist/cjs/ConfigProvider/hooks/useConfig.d.ts +0 -13
- package/dist/cjs/ConfigProvider/hooks/useConfig.js +0 -109
- package/dist/cjs/ConfigProvider/index.d.ts +0 -7
- package/dist/cjs/ConfigProvider/index.js +0 -43
- package/dist/cjs/DualAxes/index.d.ts +0 -20
- package/dist/cjs/DualAxes/index.js +0 -84
- package/dist/cjs/DualAxes/util.d.ts +0 -9
- package/dist/cjs/DualAxes/util.js +0 -77
- package/dist/cjs/FishboneDiagram/index.d.ts +0 -7
- package/dist/cjs/FishboneDiagram/index.js +0 -66
- package/dist/cjs/FlowDiagram/helper.d.ts +0 -7
- package/dist/cjs/FlowDiagram/helper.js +0 -83
- package/dist/cjs/FlowDiagram/index.d.ts +0 -6
- package/dist/cjs/FlowDiagram/index.js +0 -107
- package/dist/cjs/Funnel/index.d.ts +0 -12
- package/dist/cjs/Funnel/index.js +0 -173
- package/dist/cjs/GPTVis/Lite.d.ts +0 -19
- package/dist/cjs/GPTVis/Lite.js +0 -81
- package/dist/cjs/GPTVis/hooks/useContext.d.ts +0 -8
- package/dist/cjs/GPTVis/hooks/useContext.js +0 -49
- package/dist/cjs/GPTVis/hooks/useEvent.d.ts +0 -1
- package/dist/cjs/GPTVis/hooks/useEvent.js +0 -33
- package/dist/cjs/GPTVis/index.d.ts +0 -6
- package/dist/cjs/GPTVis/index.js +0 -42
- package/dist/cjs/HeatMap/index.d.ts +0 -12
- package/dist/cjs/HeatMap/index.js +0 -67
- package/dist/cjs/Histogram/index.d.ts +0 -8
- package/dist/cjs/Histogram/index.js +0 -79
- package/dist/cjs/IndentedTree/index.d.ts +0 -7
- package/dist/cjs/IndentedTree/index.js +0 -78
- package/dist/cjs/Line/index.d.ts +0 -11
- package/dist/cjs/Line/index.js +0 -94
- package/dist/cjs/Liquid/index.d.ts +0 -11
- package/dist/cjs/Liquid/index.js +0 -85
- package/dist/cjs/Map/Component/MapView.d.ts +0 -3
- package/dist/cjs/Map/Component/MapView.js +0 -40
- package/dist/cjs/Map/Component/Marker.d.ts +0 -3
- package/dist/cjs/Map/Component/Marker.js +0 -53
- package/dist/cjs/Map/Component/Polyline.d.ts +0 -3
- package/dist/cjs/Map/Component/Polyline.js +0 -50
- package/dist/cjs/Map/Component/index.d.ts +0 -4
- package/dist/cjs/Map/Component/index.js +0 -45
- package/dist/cjs/Map/data.json +0 -305
- package/dist/cjs/Map/index.d.ts +0 -5
- package/dist/cjs/Map/index.js +0 -61
- package/dist/cjs/MindMap/index.d.ts +0 -7
- package/dist/cjs/MindMap/index.js +0 -75
- package/dist/cjs/NetworkGraph/index.d.ts +0 -6
- package/dist/cjs/NetworkGraph/index.js +0 -75
- package/dist/cjs/OrganizationChart/index.d.ts +0 -6
- package/dist/cjs/OrganizationChart/index.js +0 -95
- package/dist/cjs/PathMap/index.d.ts +0 -6
- package/dist/cjs/PathMap/index.js +0 -58
- package/dist/cjs/Pie/index.d.ts +0 -23
- package/dist/cjs/Pie/index.js +0 -94
- package/dist/cjs/PinMap/index.d.ts +0 -6
- package/dist/cjs/PinMap/index.js +0 -44
- package/dist/cjs/PinMap/maker.svg +0 -1
- package/dist/cjs/Radar/index.d.ts +0 -13
- package/dist/cjs/Radar/index.js +0 -153
- package/dist/cjs/Sankey/index.d.ts +0 -14
- package/dist/cjs/Sankey/index.js +0 -110
- package/dist/cjs/Scatter/index.d.ts +0 -13
- package/dist/cjs/Scatter/index.js +0 -103
- package/dist/cjs/Spreadsheet/index.d.ts +0 -28
- package/dist/cjs/Spreadsheet/index.js +0 -113
- package/dist/cjs/Table/index.d.ts +0 -9
- package/dist/cjs/Table/index.js +0 -91
- package/dist/cjs/Text/VisText.d.ts +0 -4
- package/dist/cjs/Text/VisText.js +0 -82
- package/dist/cjs/Text/config.d.ts +0 -18
- package/dist/cjs/Text/config.js +0 -91
- package/dist/cjs/Text/custom-icons/index.d.ts +0 -3
- package/dist/cjs/Text/custom-icons/index.js +0 -66
- package/dist/cjs/Text/index.d.ts +0 -3
- package/dist/cjs/Text/index.js +0 -42
- package/dist/cjs/Text/mini-charts/hooks/getElementFontSize.d.ts +0 -1
- package/dist/cjs/Text/mini-charts/hooks/getElementFontSize.js +0 -65
- package/dist/cjs/Text/mini-charts/hooks/index.d.ts +0 -1
- package/dist/cjs/Text/mini-charts/hooks/useSvgWrapper.d.ts +0 -5
- package/dist/cjs/Text/mini-charts/hooks/useSvgWrapper.js +0 -65
- package/dist/cjs/Text/mini-charts/index.d.ts +0 -2
- package/dist/cjs/Text/mini-charts/index.js +0 -25
- package/dist/cjs/Text/mini-charts/line/SingleLineChart.d.ts +0 -3
- package/dist/cjs/Text/mini-charts/line/SingleLineChart.js +0 -63
- package/dist/cjs/Text/mini-charts/line/index.d.ts +0 -1
- package/dist/cjs/Text/mini-charts/line/index.js +0 -29
- package/dist/cjs/Text/mini-charts/line/scaleLinear.d.ts +0 -4
- package/dist/cjs/Text/mini-charts/line/scaleLinear.js +0 -35
- package/dist/cjs/Text/mini-charts/line/useLineCompute.d.ts +0 -6
- package/dist/cjs/Text/mini-charts/line/useLineCompute.js +0 -103
- package/dist/cjs/Text/mini-charts/proportion/getArcPath.d.ts +0 -1
- package/dist/cjs/Text/mini-charts/proportion/getArcPath.js +0 -51
- package/dist/cjs/Text/mini-charts/proportion/index.d.ts +0 -3
- package/dist/cjs/Text/mini-charts/proportion/index.js +0 -71
- package/dist/cjs/Text/theme.d.ts +0 -24
- package/dist/cjs/Text/theme.js +0 -52
- package/dist/cjs/Text/types.d.ts +0 -20
- package/dist/cjs/Text/types.js +0 -17
- package/dist/cjs/Text/utils/getThemeColor.d.ts +0 -11
- package/dist/cjs/Text/utils/getThemeColor.js +0 -46
- package/dist/cjs/Text/utils/index.d.ts +0 -2
- package/dist/cjs/Text/utils/index.js +0 -25
- package/dist/cjs/Text/utils/useAntdDarkAlgorithm.d.ts +0 -2
- package/dist/cjs/Text/utils/useAntdDarkAlgorithm.js +0 -40
- package/dist/cjs/Treemap/index.d.ts +0 -10
- package/dist/cjs/Treemap/index.js +0 -93
- package/dist/cjs/Venn/index.d.ts +0 -32
- package/dist/cjs/Venn/index.js +0 -87
- package/dist/cjs/Violin/index.d.ts +0 -10
- package/dist/cjs/Violin/index.js +0 -190
- package/dist/cjs/Waterfall/index.d.ts +0 -25
- package/dist/cjs/Waterfall/index.js +0 -184
- package/dist/cjs/WordCloud/index.d.ts +0 -9
- package/dist/cjs/WordCloud/index.js +0 -76
- package/dist/cjs/constants/index.d.ts +0 -2
- package/dist/cjs/constants/index.js +0 -35
- package/dist/cjs/export-map.browser.d.ts +0 -4
- package/dist/cjs/export-map.browser.js +0 -48
- package/dist/cjs/export-map.d.ts +0 -10
- package/dist/cjs/export-map.js +0 -41
- package/dist/cjs/export.d.ts +0 -76
- package/dist/cjs/export.js +0 -159
- package/dist/cjs/render.d.ts +0 -2
- package/dist/cjs/render.js +0 -67
- package/dist/cjs/theme.d.ts +0 -2
- package/dist/cjs/types/chart.d.ts +0 -88
- package/dist/cjs/types/chart.js +0 -61
- package/dist/cjs/types/config.d.ts +0 -25
- package/dist/cjs/types/config.js +0 -17
- package/dist/cjs/types/map.d.ts +0 -242
- package/dist/cjs/types/map.js +0 -17
- package/dist/cjs/utils/config.d.ts +0 -5
- package/dist/cjs/utils/config.js +0 -76
- package/dist/cjs/utils/graph.d.ts +0 -18
- package/dist/cjs/utils/graph.js +0 -64
- package/dist/cjs/utils/index.d.ts +0 -1
- package/dist/cjs/utils/index.js +0 -23
- package/dist/cjs/utils/map/context.d.ts +0 -3
- package/dist/cjs/utils/map/context.js +0 -45
- package/dist/cjs/utils/map/controls.d.ts +0 -0
- package/dist/cjs/utils/map/controls.js +0 -0
- package/dist/cjs/utils/map/index.d.ts +0 -6
- package/dist/cjs/utils/map/index.js +0 -33
- package/dist/cjs/utils/map/markers.d.ts +0 -2
- package/dist/cjs/utils/map/markers.js +0 -88
- package/dist/cjs/utils/map/polyline.d.ts +0 -2
- package/dist/cjs/utils/map/polyline.js +0 -52
- package/dist/cjs/utils/map/style.d.ts +0 -45
- package/dist/cjs/utils/map/style.js +0 -112
- package/dist/cjs/utils/map/util.d.ts +0 -1
- package/dist/cjs/utils/map/view.d.ts +0 -5
- package/dist/cjs/utils/map/view.js +0 -100
- package/dist/cjs/utils/palette.d.ts +0 -2
- package/dist/cjs/utils/palette.js +0 -54
- package/dist/cjs/utils/plot.d.ts +0 -5
- package/dist/cjs/utils/plot.js +0 -90
- package/dist/cjs/version.d.ts +0 -2
- package/dist/cjs/version.js +0 -25
- package/dist/esm/Area/index.d.ts +0 -11
- package/dist/esm/Area/index.js +0 -108
- package/dist/esm/Bar/index.d.ts +0 -14
- package/dist/esm/Bar/index.js +0 -92
- package/dist/esm/Boxplot/index.d.ts +0 -11
- package/dist/esm/Boxplot/index.js +0 -86
- package/dist/esm/ChartCodeRender/Loading.d.ts +0 -6
- package/dist/esm/ChartCodeRender/Loading.js +0 -21
- package/dist/esm/ChartCodeRender/VisChart.d.ts +0 -19
- package/dist/esm/ChartCodeRender/VisChart.js +0 -450
- package/dist/esm/ChartCodeRender/icon.d.ts +0 -10
- package/dist/esm/ChartCodeRender/icon.js +0 -103
- package/dist/esm/ChartCodeRender/index.d.ts +0 -8
- package/dist/esm/ChartCodeRender/index.js +0 -99
- package/dist/esm/ChartCodeRender/styles.d.ts +0 -19
- package/dist/esm/ChartCodeRender/styles.js +0 -61
- package/dist/esm/ChartCodeRender/type.d.ts +0 -176
- package/dist/esm/ChartCodeRender/type.js +0 -1
- package/dist/esm/ChartCodeRender/utils.d.ts +0 -1
- package/dist/esm/ChartCodeRender/utils.js +0 -37
- package/dist/esm/Column/index.d.ts +0 -14
- package/dist/esm/Column/index.js +0 -93
- package/dist/esm/ConfigProvider/context.d.ts +0 -3
- package/dist/esm/ConfigProvider/context.js +0 -3
- package/dist/esm/ConfigProvider/hooks/index.d.ts +0 -1
- package/dist/esm/ConfigProvider/hooks/index.js +0 -1
- package/dist/esm/ConfigProvider/hooks/useConfig.d.ts +0 -13
- package/dist/esm/ConfigProvider/hooks/useConfig.js +0 -71
- package/dist/esm/ConfigProvider/index.d.ts +0 -7
- package/dist/esm/ConfigProvider/index.js +0 -17
- package/dist/esm/DualAxes/index.d.ts +0 -20
- package/dist/esm/DualAxes/index.js +0 -77
- package/dist/esm/DualAxes/util.d.ts +0 -9
- package/dist/esm/DualAxes/util.js +0 -77
- package/dist/esm/FishboneDiagram/index.d.ts +0 -7
- package/dist/esm/FishboneDiagram/index.js +0 -43
- package/dist/esm/FlowDiagram/helper.d.ts +0 -7
- package/dist/esm/FlowDiagram/helper.js +0 -76
- package/dist/esm/FlowDiagram/index.d.ts +0 -6
- package/dist/esm/FlowDiagram/index.js +0 -72
- package/dist/esm/Funnel/index.d.ts +0 -12
- package/dist/esm/Funnel/index.js +0 -171
- package/dist/esm/GPTVis/Lite.d.ts +0 -19
- package/dist/esm/GPTVis/Lite.js +0 -57
- package/dist/esm/GPTVis/hooks/useContext.d.ts +0 -8
- package/dist/esm/GPTVis/hooks/useContext.js +0 -9
- package/dist/esm/GPTVis/hooks/useEvent.d.ts +0 -1
- package/dist/esm/GPTVis/hooks/useEvent.js +0 -6
- package/dist/esm/GPTVis/index.d.ts +0 -6
- package/dist/esm/GPTVis/index.js +0 -25
- package/dist/esm/HeatMap/index.d.ts +0 -12
- package/dist/esm/HeatMap/index.js +0 -45
- package/dist/esm/Histogram/index.d.ts +0 -8
- package/dist/esm/Histogram/index.js +0 -75
- package/dist/esm/IndentedTree/index.d.ts +0 -7
- package/dist/esm/IndentedTree/index.js +0 -68
- package/dist/esm/Line/index.d.ts +0 -11
- package/dist/esm/Line/index.js +0 -92
- package/dist/esm/Liquid/index.d.ts +0 -11
- package/dist/esm/Liquid/index.js +0 -100
- package/dist/esm/Map/Component/MapView.d.ts +0 -3
- package/dist/esm/Map/Component/MapView.js +0 -18
- package/dist/esm/Map/Component/Marker.d.ts +0 -3
- package/dist/esm/Map/Component/Marker.js +0 -40
- package/dist/esm/Map/Component/Polyline.d.ts +0 -3
- package/dist/esm/Map/Component/Polyline.js +0 -35
- package/dist/esm/Map/Component/index.d.ts +0 -4
- package/dist/esm/Map/Component/index.js +0 -4
- package/dist/esm/Map/data.json +0 -305
- package/dist/esm/Map/index.d.ts +0 -5
- package/dist/esm/Map/index.js +0 -50
- package/dist/esm/MindMap/index.d.ts +0 -7
- package/dist/esm/MindMap/index.js +0 -69
- package/dist/esm/NetworkGraph/index.d.ts +0 -6
- package/dist/esm/NetworkGraph/index.js +0 -64
- package/dist/esm/OrganizationChart/index.d.ts +0 -6
- package/dist/esm/OrganizationChart/index.js +0 -75
- package/dist/esm/PathMap/index.d.ts +0 -6
- package/dist/esm/PathMap/index.js +0 -41
- package/dist/esm/Pie/index.d.ts +0 -23
- package/dist/esm/Pie/index.js +0 -96
- package/dist/esm/PinMap/index.d.ts +0 -6
- package/dist/esm/PinMap/index.js +0 -22
- package/dist/esm/PinMap/maker.svg +0 -1
- package/dist/esm/Radar/index.d.ts +0 -13
- package/dist/esm/Radar/index.js +0 -150
- package/dist/esm/Sankey/index.d.ts +0 -14
- package/dist/esm/Sankey/index.js +0 -98
- package/dist/esm/Scatter/index.d.ts +0 -13
- package/dist/esm/Scatter/index.js +0 -95
- package/dist/esm/Spreadsheet/index.d.ts +0 -28
- package/dist/esm/Spreadsheet/index.js +0 -129
- package/dist/esm/Table/index.d.ts +0 -9
- package/dist/esm/Table/index.js +0 -30
- package/dist/esm/Text/VisText.d.ts +0 -4
- package/dist/esm/Text/VisText.js +0 -55
- package/dist/esm/Text/config.d.ts +0 -18
- package/dist/esm/Text/config.js +0 -82
- package/dist/esm/Text/custom-icons/index.d.ts +0 -3
- package/dist/esm/Text/custom-icons/index.js +0 -37
- package/dist/esm/Text/index.d.ts +0 -3
- package/dist/esm/Text/index.js +0 -2
- package/dist/esm/Text/mini-charts/hooks/getElementFontSize.d.ts +0 -1
- package/dist/esm/Text/mini-charts/hooks/getElementFontSize.js +0 -32
- package/dist/esm/Text/mini-charts/hooks/index.d.ts +0 -1
- package/dist/esm/Text/mini-charts/hooks/index.js +0 -1
- package/dist/esm/Text/mini-charts/hooks/useSvgWrapper.d.ts +0 -5
- package/dist/esm/Text/mini-charts/hooks/useSvgWrapper.js +0 -37
- package/dist/esm/Text/mini-charts/index.d.ts +0 -2
- package/dist/esm/Text/mini-charts/index.js +0 -2
- package/dist/esm/Text/mini-charts/line/SingleLineChart.d.ts +0 -3
- package/dist/esm/Text/mini-charts/line/SingleLineChart.js +0 -62
- package/dist/esm/Text/mini-charts/line/index.d.ts +0 -1
- package/dist/esm/Text/mini-charts/line/index.js +0 -1
- package/dist/esm/Text/mini-charts/line/scaleLinear.d.ts +0 -4
- package/dist/esm/Text/mini-charts/line/scaleLinear.js +0 -19
- package/dist/esm/Text/mini-charts/line/useLineCompute.d.ts +0 -6
- package/dist/esm/Text/mini-charts/line/useLineCompute.js +0 -118
- package/dist/esm/Text/mini-charts/proportion/getArcPath.d.ts +0 -1
- package/dist/esm/Text/mini-charts/proportion/getArcPath.js +0 -19
- package/dist/esm/Text/mini-charts/proportion/index.d.ts +0 -3
- package/dist/esm/Text/mini-charts/proportion/index.js +0 -64
- package/dist/esm/Text/theme.d.ts +0 -24
- package/dist/esm/Text/theme.js +0 -24
- package/dist/esm/Text/types.d.ts +0 -20
- package/dist/esm/Text/types.js +0 -1
- package/dist/esm/Text/utils/getThemeColor.d.ts +0 -11
- package/dist/esm/Text/utils/getThemeColor.js +0 -29
- package/dist/esm/Text/utils/index.d.ts +0 -2
- package/dist/esm/Text/utils/index.js +0 -2
- package/dist/esm/Text/utils/useAntdDarkAlgorithm.d.ts +0 -2
- package/dist/esm/Text/utils/useAntdDarkAlgorithm.js +0 -14
- package/dist/esm/Treemap/index.d.ts +0 -10
- package/dist/esm/Treemap/index.js +0 -88
- package/dist/esm/Venn/index.d.ts +0 -32
- package/dist/esm/Venn/index.js +0 -69
- package/dist/esm/Violin/index.d.ts +0 -10
- package/dist/esm/Violin/index.js +0 -199
- package/dist/esm/Waterfall/index.d.ts +0 -25
- package/dist/esm/Waterfall/index.js +0 -185
- package/dist/esm/WordCloud/index.d.ts +0 -9
- package/dist/esm/WordCloud/index.js +0 -59
- package/dist/esm/constants/index.d.ts +0 -2
- package/dist/esm/constants/index.js +0 -9
- package/dist/esm/export-map.browser.d.ts +0 -4
- package/dist/esm/export-map.browser.js +0 -5
- package/dist/esm/export-map.d.ts +0 -10
- package/dist/esm/export-map.js +0 -9
- package/dist/esm/export.d.ts +0 -76
- package/dist/esm/export.js +0 -51
- package/dist/esm/render.d.ts +0 -2
- package/dist/esm/render.js +0 -32
- package/dist/esm/theme.d.ts +0 -2
- package/dist/esm/theme.js +0 -103
- package/dist/esm/types/chart.d.ts +0 -88
- package/dist/esm/types/chart.js +0 -33
- package/dist/esm/types/config.d.ts +0 -25
- package/dist/esm/types/config.js +0 -1
- package/dist/esm/types/map.d.ts +0 -242
- package/dist/esm/types/map.js +0 -1
- package/dist/esm/utils/config.d.ts +0 -5
- package/dist/esm/utils/config.js +0 -53
- package/dist/esm/utils/graph.d.ts +0 -18
- package/dist/esm/utils/graph.js +0 -55
- package/dist/esm/utils/index.d.ts +0 -1
- package/dist/esm/utils/index.js +0 -1
- package/dist/esm/utils/map/context.d.ts +0 -3
- package/dist/esm/utils/map/context.js +0 -42
- package/dist/esm/utils/map/controls.d.ts +0 -0
- package/dist/esm/utils/map/controls.js +0 -0
- package/dist/esm/utils/map/index.d.ts +0 -6
- package/dist/esm/utils/map/index.js +0 -6
- package/dist/esm/utils/map/markers.d.ts +0 -2
- package/dist/esm/utils/map/markers.js +0 -69
- package/dist/esm/utils/map/polyline.d.ts +0 -2
- package/dist/esm/utils/map/polyline.js +0 -31
- package/dist/esm/utils/map/style.d.ts +0 -45
- package/dist/esm/utils/map/style.js +0 -80
- package/dist/esm/utils/map/util.d.ts +0 -1
- package/dist/esm/utils/map/util.js +0 -11
- package/dist/esm/utils/map/view.d.ts +0 -5
- package/dist/esm/utils/map/view.js +0 -83
- package/dist/esm/utils/palette.d.ts +0 -2
- package/dist/esm/utils/palette.js +0 -2
- package/dist/esm/utils/plot.d.ts +0 -5
- package/dist/esm/utils/plot.js +0 -86
- package/dist/esm/version.d.ts +0 -2
- package/dist/esm/version.js +0 -1
- package/dist/umd/376.async.js +0 -1
- package/dist/umd/index.min.css +0 -1
|
@@ -1,75 +0,0 @@
|
|
|
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
|
-
var _excluded = ["data"];
|
|
3
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
5
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
|
-
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; }
|
|
7
|
-
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; }
|
|
8
|
-
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; }
|
|
9
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
10
|
-
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); }
|
|
11
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
12
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
14
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
15
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
16
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
17
|
-
import { OrganizationChart as ADCOrganizationChart, RCNode } from '@ant-design/graphs';
|
|
18
|
-
import React, { useMemo } from 'react';
|
|
19
|
-
import { useGraphConfig } from "../ConfigProvider/hooks";
|
|
20
|
-
import { visTreeData2GraphData } from "../utils/graph";
|
|
21
|
-
var OrganizationChartNode = RCNode.OrganizationChartNode;
|
|
22
|
-
var defaultConfig = {
|
|
23
|
-
padding: [40, 0, 0, 120],
|
|
24
|
-
autoFit: 'view',
|
|
25
|
-
autoResize: true,
|
|
26
|
-
zoomRange: [0.1, 5],
|
|
27
|
-
zoom: 1,
|
|
28
|
-
node: {
|
|
29
|
-
style: {
|
|
30
|
-
component: function component(d) {
|
|
31
|
-
var _d$states;
|
|
32
|
-
var isActive = (_d$states = d.states) === null || _d$states === void 0 ? void 0 : _d$states.includes('active');
|
|
33
|
-
return /*#__PURE__*/React.createElement(OrganizationChartNode, {
|
|
34
|
-
name: d.name,
|
|
35
|
-
position: d.description,
|
|
36
|
-
status: 'online',
|
|
37
|
-
isActive: isActive
|
|
38
|
-
});
|
|
39
|
-
},
|
|
40
|
-
size: [280, 80]
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
edge: {
|
|
44
|
-
state: {
|
|
45
|
-
active: {
|
|
46
|
-
stroke: '#1890ff',
|
|
47
|
-
halo: false
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
behaviors: ['drag-canvas', 'hover-activate-neighbors'],
|
|
52
|
-
transforms: function transforms(prev) {
|
|
53
|
-
return [].concat(_toConsumableArray(prev.filter(function (t) {
|
|
54
|
-
return t.type !== 'collapse-expand-react-node';
|
|
55
|
-
})), [_objectSpread(_objectSpread({}, prev.find(function (t) {
|
|
56
|
-
return t.type === 'collapse-expand-react-node';
|
|
57
|
-
})), {}, {
|
|
58
|
-
enable: true,
|
|
59
|
-
iconOffsetY: 24
|
|
60
|
-
})]);
|
|
61
|
-
},
|
|
62
|
-
animation: false
|
|
63
|
-
};
|
|
64
|
-
var OrganizationChart = function OrganizationChart(props) {
|
|
65
|
-
var propsData = props.data,
|
|
66
|
-
restProps = _objectWithoutProperties(props, _excluded);
|
|
67
|
-
var data = useMemo(function () {
|
|
68
|
-
return visTreeData2GraphData(propsData);
|
|
69
|
-
}, [propsData]);
|
|
70
|
-
var config = useGraphConfig('OrganizationChart', defaultConfig, restProps);
|
|
71
|
-
return /*#__PURE__*/React.createElement(ADCOrganizationChart, _extends({
|
|
72
|
-
data: data
|
|
73
|
-
}, config));
|
|
74
|
-
};
|
|
75
|
-
export default OrganizationChart;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
var _excluded = ["data", "markerStyle", "pathStyle"];
|
|
2
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
4
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
7
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
8
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
|
-
import React, { useMemo } from 'react';
|
|
12
|
-
import { useMapConfig } from "../ConfigProvider/hooks";
|
|
13
|
-
import Map from "../Map";
|
|
14
|
-
import { formatMakerStyle, formatPolylineStyle } from "../utils/map";
|
|
15
|
-
var PathMap = function PathMap(props) {
|
|
16
|
-
var _useMapConfig = useMapConfig('PathMap', props),
|
|
17
|
-
data = _useMapConfig.data,
|
|
18
|
-
markerStyle = _useMapConfig.markerStyle,
|
|
19
|
-
pathStyle = _useMapConfig.pathStyle,
|
|
20
|
-
rest = _objectWithoutProperties(_useMapConfig, _excluded);
|
|
21
|
-
var markerdata = useMemo(function () {
|
|
22
|
-
var markers = [];
|
|
23
|
-
(data || []).forEach(function (item) {
|
|
24
|
-
if (item.markers) {
|
|
25
|
-
markers.push.apply(markers, _toConsumableArray(item.markers));
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
return formatMakerStyle(markers, markerStyle);
|
|
29
|
-
}, [data, markerStyle]);
|
|
30
|
-
var linedata = useMemo(function () {
|
|
31
|
-
var lines = (data || []).map(function (item) {
|
|
32
|
-
return item.path;
|
|
33
|
-
});
|
|
34
|
-
return formatPolylineStyle(lines, pathStyle);
|
|
35
|
-
}, [data, pathStyle]);
|
|
36
|
-
return /*#__PURE__*/React.createElement(Map, _extends({
|
|
37
|
-
markers: markerdata,
|
|
38
|
-
polyline: linedata
|
|
39
|
-
}, rest));
|
|
40
|
-
};
|
|
41
|
-
export default PathMap;
|
package/dist/esm/Pie/index.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { PieConfig } from '@ant-design/plots';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import type { BasePlotProps, Theme } from '../types';
|
|
4
|
-
/**
|
|
5
|
-
* PieDataItem is the type for each data item in the pie chart.
|
|
6
|
-
* It includes the name of the sector and its corresponding value.
|
|
7
|
-
* @param category The name of the sector.
|
|
8
|
-
* @param value The value of the sector.
|
|
9
|
-
*/
|
|
10
|
-
type PieDataItem = {
|
|
11
|
-
category: string;
|
|
12
|
-
value: number;
|
|
13
|
-
[key: string]: string | number;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* the props for the Pie
|
|
17
|
-
* @param data pie data
|
|
18
|
-
*/
|
|
19
|
-
export type PieProps = BasePlotProps<PieDataItem> & Partial<PieConfig> & Theme & {
|
|
20
|
-
innerRadius?: number;
|
|
21
|
-
};
|
|
22
|
-
declare const Pie: (props: PieProps) => React.JSX.Element;
|
|
23
|
-
export default Pie;
|
package/dist/esm/Pie/index.js
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
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); }
|
|
7
|
-
import { Pie as ADCPie } from '@ant-design/plots';
|
|
8
|
-
import { round, sumBy } from 'lodash';
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import { usePlotConfig } from "../ConfigProvider/hooks";
|
|
11
|
-
import { THEME_MAP } from "../theme";
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* PieDataItem is the type for each data item in the pie chart.
|
|
15
|
-
* It includes the name of the sector and its corresponding value.
|
|
16
|
-
* @param category The name of the sector.
|
|
17
|
-
* @param value The value of the sector.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* the props for the Pie
|
|
22
|
-
* @param data pie data
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
var defaultConfig = function defaultConfig(props) {
|
|
26
|
-
var _props$data = props.data,
|
|
27
|
-
data = _props$data === void 0 ? [] : _props$data,
|
|
28
|
-
_props$angleField = props.angleField,
|
|
29
|
-
angleField = _props$angleField === void 0 ? 'value' : _props$angleField,
|
|
30
|
-
_props$colorField = props.colorField,
|
|
31
|
-
colorField = _props$colorField === void 0 ? 'category' : _props$colorField,
|
|
32
|
-
_props$style = props.style,
|
|
33
|
-
style = _props$style === void 0 ? {} : _props$style;
|
|
34
|
-
var sumValue = sumBy(data, angleField);
|
|
35
|
-
var backgroundColor = style.backgroundColor,
|
|
36
|
-
palette = style.palette;
|
|
37
|
-
var hasPalette = !!(palette !== null && palette !== void 0 && palette[0]);
|
|
38
|
-
var paletteConfig = {
|
|
39
|
-
color: undefined
|
|
40
|
-
};
|
|
41
|
-
if (hasPalette) {
|
|
42
|
-
paletteConfig = {
|
|
43
|
-
color: {
|
|
44
|
-
range: palette
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
return _objectSpread({
|
|
49
|
-
angleField: angleField,
|
|
50
|
-
colorField: colorField,
|
|
51
|
-
tooltip: function tooltip(d) {
|
|
52
|
-
return {
|
|
53
|
-
name: d[colorField],
|
|
54
|
-
value: d[angleField]
|
|
55
|
-
};
|
|
56
|
-
},
|
|
57
|
-
label: {
|
|
58
|
-
position: 'outside',
|
|
59
|
-
// text: angleField,
|
|
60
|
-
transform: [{
|
|
61
|
-
type: 'overlapHide'
|
|
62
|
-
}],
|
|
63
|
-
text: function text(d) {
|
|
64
|
-
return "".concat(d[colorField], ": ").concat(round(d[angleField] / sumValue * 100, 1), "%");
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
legend: {
|
|
68
|
-
color: {
|
|
69
|
-
title: false,
|
|
70
|
-
position: 'top'
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
interaction: {
|
|
74
|
-
elementSelect: {
|
|
75
|
-
single: true
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
scale: _objectSpread({}, paletteConfig)
|
|
79
|
-
}, backgroundColor ? {
|
|
80
|
-
viewStyle: {
|
|
81
|
-
viewFill: backgroundColor
|
|
82
|
-
}
|
|
83
|
-
} : {
|
|
84
|
-
viewStyle: undefined
|
|
85
|
-
});
|
|
86
|
-
};
|
|
87
|
-
var Pie = function Pie(props) {
|
|
88
|
-
var _props$theme;
|
|
89
|
-
var themeConfig = THEME_MAP[(_props$theme = props.theme) !== null && _props$theme !== void 0 ? _props$theme : 'default'];
|
|
90
|
-
var config = usePlotConfig('Pie', defaultConfig, _objectSpread(_objectSpread({}, props), {}, {
|
|
91
|
-
theme: themeConfig,
|
|
92
|
-
innerRadius: Math.max(0, Math.min(1, props.innerRadius || 0))
|
|
93
|
-
}));
|
|
94
|
-
return /*#__PURE__*/React.createElement(ADCPie, config);
|
|
95
|
-
};
|
|
96
|
-
export default Pie;
|
package/dist/esm/PinMap/index.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
var _excluded = ["data", "markerStyle"];
|
|
2
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
-
import React, { useMemo } from 'react';
|
|
6
|
-
import { useMapConfig } from "../ConfigProvider/hooks";
|
|
7
|
-
import Map from "../Map";
|
|
8
|
-
import { formatMakerStyle } from "../utils/map";
|
|
9
|
-
var PinMap = function PinMap(props) {
|
|
10
|
-
var _useMapConfig = useMapConfig('PinMap', props),
|
|
11
|
-
data = _useMapConfig.data,
|
|
12
|
-
markerStyle = _useMapConfig.markerStyle,
|
|
13
|
-
rest = _objectWithoutProperties(_useMapConfig, _excluded);
|
|
14
|
-
var markerdata = useMemo(function () {
|
|
15
|
-
return formatMakerStyle(data || [], markerStyle);
|
|
16
|
-
}, [data, markerStyle]);
|
|
17
|
-
return /*#__PURE__*/React.createElement(Map, _extends({
|
|
18
|
-
markers: markerdata,
|
|
19
|
-
includePoints: markerdata
|
|
20
|
-
}, rest));
|
|
21
|
-
};
|
|
22
|
-
export default PinMap;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="48px" width="48px" viewBox="0 0 1024 1024"><path d="M512 490.666667C453.12 490.666667 405.333333 442.88 405.333333 384 405.333333 325.12 453.12 277.333333 512 277.333333 570.88 277.333333 618.666667 325.12 618.666667 384 618.666667 442.88 570.88 490.666667 512 490.666667M512 85.333333C346.88 85.333333 213.333333 218.88 213.333333 384 213.333333 608 512 938.666667 512 938.666667 512 938.666667 810.666667 608 810.666667 384 810.666667 218.88 677.12 85.333333 512 85.333333Z" fill="#6808FE"></path></svg>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { BasePlotProps, Style, Theme } from '../types';
|
|
3
|
-
export type RadarDataItem = {
|
|
4
|
-
name: string;
|
|
5
|
-
value: number;
|
|
6
|
-
[key: string]: string | number;
|
|
7
|
-
};
|
|
8
|
-
export type RadarProps = BasePlotProps<RadarDataItem> & Theme & Style & {
|
|
9
|
-
width?: number;
|
|
10
|
-
height?: number;
|
|
11
|
-
};
|
|
12
|
-
declare const Radar: (props: RadarProps) => React.JSX.Element;
|
|
13
|
-
export default Radar;
|
package/dist/esm/Radar/index.js
DELETED
|
@@ -1,150 +0,0 @@
|
|
|
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); }
|
|
7
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
import { Chart } from '@antv/g2';
|
|
14
|
-
import React, { useEffect, useRef } from 'react';
|
|
15
|
-
import { THEME_MAP } from "../theme";
|
|
16
|
-
import { groupBy } from "../utils/plot";
|
|
17
|
-
function transformRadartoParallel(data) {
|
|
18
|
-
if (!data || data.length === 0) {
|
|
19
|
-
return [];
|
|
20
|
-
}
|
|
21
|
-
var groups = groupBy(data, function (d) {
|
|
22
|
-
return d.group || '';
|
|
23
|
-
});
|
|
24
|
-
return Object.entries(groups).map(function (_ref) {
|
|
25
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
26
|
-
group = _ref2[0],
|
|
27
|
-
values = _ref2[1];
|
|
28
|
-
var paralleValues = (values || []).reduce(function (acc, _ref3) {
|
|
29
|
-
var name = _ref3.name,
|
|
30
|
-
value = _ref3.value;
|
|
31
|
-
acc[name] = value;
|
|
32
|
-
return acc;
|
|
33
|
-
}, {});
|
|
34
|
-
return _objectSpread(_objectSpread({}, paralleValues), {}, {
|
|
35
|
-
group: group
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
var defaultConfig = function defaultConfig(props) {
|
|
40
|
-
var data = props.data,
|
|
41
|
-
title = props.title,
|
|
42
|
-
_props$theme = props.theme,
|
|
43
|
-
theme = _props$theme === void 0 ? 'default' : _props$theme,
|
|
44
|
-
_props$style = props.style,
|
|
45
|
-
style = _props$style === void 0 ? {} : _props$style;
|
|
46
|
-
var backgroundColor = style.backgroundColor,
|
|
47
|
-
_style$palette = style.palette,
|
|
48
|
-
palette = _style$palette === void 0 ? [] : _style$palette,
|
|
49
|
-
_style$lineWidth = style.lineWidth,
|
|
50
|
-
lineWidth = _style$lineWidth === void 0 ? 2 : _style$lineWidth;
|
|
51
|
-
var parallelData = transformRadartoParallel(data);
|
|
52
|
-
var position = Object.keys(parallelData[0] || {}).filter(function (key) {
|
|
53
|
-
return key !== 'group';
|
|
54
|
-
});
|
|
55
|
-
return _objectSpread(_objectSpread({
|
|
56
|
-
title: title,
|
|
57
|
-
autoFit: true,
|
|
58
|
-
theme: THEME_MAP[theme],
|
|
59
|
-
inset: 18,
|
|
60
|
-
type: 'line',
|
|
61
|
-
data: parallelData,
|
|
62
|
-
coordinate: {
|
|
63
|
-
type: 'radar'
|
|
64
|
-
},
|
|
65
|
-
encode: {
|
|
66
|
-
position: position,
|
|
67
|
-
color: 'group'
|
|
68
|
-
},
|
|
69
|
-
style: {
|
|
70
|
-
lineWidth: lineWidth,
|
|
71
|
-
lineCap: 'round',
|
|
72
|
-
lineJoin: 'round'
|
|
73
|
-
}
|
|
74
|
-
}, backgroundColor ? {
|
|
75
|
-
viewStyle: {
|
|
76
|
-
viewFill: backgroundColor
|
|
77
|
-
}
|
|
78
|
-
} : {}), {}, {
|
|
79
|
-
legend: {
|
|
80
|
-
color: parallelData.length > 1 ? {
|
|
81
|
-
itemMarker: 'point'
|
|
82
|
-
} : false
|
|
83
|
-
},
|
|
84
|
-
scale: _objectSpread(_objectSpread({}, Object.fromEntries(Array.from({
|
|
85
|
-
length: position.length
|
|
86
|
-
}, function (_, i) {
|
|
87
|
-
return ["position".concat(i === 0 ? '' : i), {
|
|
88
|
-
domainMin: 0,
|
|
89
|
-
nice: true
|
|
90
|
-
}];
|
|
91
|
-
}))), palette !== null && palette !== void 0 && palette[0] ? {
|
|
92
|
-
color: {
|
|
93
|
-
range: palette
|
|
94
|
-
}
|
|
95
|
-
} : {}),
|
|
96
|
-
axis: Object.fromEntries(Array.from({
|
|
97
|
-
length: position.length
|
|
98
|
-
}, function (_, i) {
|
|
99
|
-
return ["position".concat(i === 0 ? '' : i), {
|
|
100
|
-
zIndex: 1,
|
|
101
|
-
titleFontSize: 10,
|
|
102
|
-
titleSpacing: 8,
|
|
103
|
-
label: true,
|
|
104
|
-
labelFill: theme === 'dark' ? '#fff' : '#000',
|
|
105
|
-
labelOpacity: 0.45,
|
|
106
|
-
labelFontSize: 10,
|
|
107
|
-
line: true,
|
|
108
|
-
lineFill: '#000',
|
|
109
|
-
lineStrokeOpacity: 0.25,
|
|
110
|
-
tickFilter: function tickFilter(_, idx) {
|
|
111
|
-
return !(i !== 0 && idx === 0);
|
|
112
|
-
},
|
|
113
|
-
tickCount: 4,
|
|
114
|
-
gridStrokeOpacity: 0.45,
|
|
115
|
-
gridStroke: theme === 'dark' ? '#fff' : '#000',
|
|
116
|
-
gridLineWidth: 1,
|
|
117
|
-
gridLineDash: [4, 4]
|
|
118
|
-
}];
|
|
119
|
-
})),
|
|
120
|
-
interaction: {
|
|
121
|
-
tooltip: {
|
|
122
|
-
series: false
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
};
|
|
127
|
-
var Radar = function Radar(props) {
|
|
128
|
-
var containerRef = useRef(null);
|
|
129
|
-
var chartRef = useRef(null);
|
|
130
|
-
useEffect(function () {
|
|
131
|
-
if (!containerRef.current) return;
|
|
132
|
-
var chart = new Chart({
|
|
133
|
-
container: containerRef.current,
|
|
134
|
-
autoFit: true,
|
|
135
|
-
padding: 'auto'
|
|
136
|
-
});
|
|
137
|
-
var config = defaultConfig(props);
|
|
138
|
-
chart.options(config);
|
|
139
|
-
chart.render();
|
|
140
|
-
chartRef.current = chart;
|
|
141
|
-
return function () {
|
|
142
|
-
chart.destroy();
|
|
143
|
-
chartRef.current = null;
|
|
144
|
-
};
|
|
145
|
-
}, [props]);
|
|
146
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
147
|
-
ref: containerRef
|
|
148
|
-
});
|
|
149
|
-
};
|
|
150
|
-
export default Radar;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { BasePlotProps, Style, Theme } from '../types';
|
|
3
|
-
type SankeyDatum = {
|
|
4
|
-
source: string;
|
|
5
|
-
target: string;
|
|
6
|
-
value: number;
|
|
7
|
-
};
|
|
8
|
-
export type SankeyProps = BasePlotProps<SankeyDatum> & Theme & Style & {
|
|
9
|
-
nodeAlign?: 'left' | 'center' | 'right' | 'justify';
|
|
10
|
-
width?: number;
|
|
11
|
-
height?: number;
|
|
12
|
-
};
|
|
13
|
-
declare const Sankey: (props: SankeyProps) => React.JSX.Element;
|
|
14
|
-
export default Sankey;
|
package/dist/esm/Sankey/index.js
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
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); }
|
|
7
|
-
import { Chart } from '@antv/g2';
|
|
8
|
-
import React, { useEffect, useRef } from 'react';
|
|
9
|
-
import { THEME_MAP } from "../theme";
|
|
10
|
-
var defaultConfig = function defaultConfig(props) {
|
|
11
|
-
var title = props.title,
|
|
12
|
-
data = props.data,
|
|
13
|
-
_props$theme = props.theme,
|
|
14
|
-
theme = _props$theme === void 0 ? 'default' : _props$theme,
|
|
15
|
-
_props$nodeAlign = props.nodeAlign,
|
|
16
|
-
nodeAlign = _props$nodeAlign === void 0 ? 'center' : _props$nodeAlign,
|
|
17
|
-
_props$style = props.style,
|
|
18
|
-
style = _props$style === void 0 ? {} : _props$style;
|
|
19
|
-
var backgroundColor = style.backgroundColor,
|
|
20
|
-
palette = style.palette;
|
|
21
|
-
var hasPalette = !!(palette !== null && palette !== void 0 && palette[0]);
|
|
22
|
-
var paletteConfig = {};
|
|
23
|
-
if (hasPalette) {
|
|
24
|
-
paletteConfig = {
|
|
25
|
-
color: {
|
|
26
|
-
range: palette
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
return _objectSpread({
|
|
31
|
-
title: title,
|
|
32
|
-
type: 'sankey',
|
|
33
|
-
theme: THEME_MAP[theme],
|
|
34
|
-
layout: {
|
|
35
|
-
nodeAlign: nodeAlign,
|
|
36
|
-
nodePadding: 0.01
|
|
37
|
-
},
|
|
38
|
-
data: {
|
|
39
|
-
type: 'inline',
|
|
40
|
-
value: data,
|
|
41
|
-
transform: [{
|
|
42
|
-
type: 'custom',
|
|
43
|
-
callback: function callback(data) {
|
|
44
|
-
return {
|
|
45
|
-
links: data
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
}]
|
|
49
|
-
},
|
|
50
|
-
scale: _objectSpread({}, paletteConfig),
|
|
51
|
-
style: {
|
|
52
|
-
labelSpacing: 2,
|
|
53
|
-
nodeLineWidth: 1,
|
|
54
|
-
linkFillOpacity: 0.3
|
|
55
|
-
}
|
|
56
|
-
}, backgroundColor ? {
|
|
57
|
-
viewStyle: {
|
|
58
|
-
viewFill: backgroundColor
|
|
59
|
-
}
|
|
60
|
-
} : {});
|
|
61
|
-
};
|
|
62
|
-
var Sankey = function Sankey(props) {
|
|
63
|
-
var width = props.width,
|
|
64
|
-
height = props.height;
|
|
65
|
-
var containerRef = useRef(null);
|
|
66
|
-
var chartRef = useRef(null);
|
|
67
|
-
useEffect(function () {
|
|
68
|
-
if (!containerRef.current) return;
|
|
69
|
-
var chart = new Chart(_objectSpread(_objectSpread(_objectSpread({
|
|
70
|
-
container: containerRef.current,
|
|
71
|
-
autoFit: !(width && height)
|
|
72
|
-
}, width ? {
|
|
73
|
-
width: width
|
|
74
|
-
} : {}), height ? {
|
|
75
|
-
height: height
|
|
76
|
-
} : {}), {}, {
|
|
77
|
-
padding: 'auto'
|
|
78
|
-
}));
|
|
79
|
-
var config = defaultConfig(props);
|
|
80
|
-
chart.options(config);
|
|
81
|
-
chart.render();
|
|
82
|
-
chartRef.current = chart;
|
|
83
|
-
return function () {
|
|
84
|
-
chart.destroy();
|
|
85
|
-
chartRef.current = null;
|
|
86
|
-
};
|
|
87
|
-
}, [props]);
|
|
88
|
-
var containerStyle = _objectSpread(_objectSpread({}, width ? {
|
|
89
|
-
width: "".concat(width, "px")
|
|
90
|
-
} : {}), height ? {
|
|
91
|
-
height: "".concat(height, "px")
|
|
92
|
-
} : {});
|
|
93
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
94
|
-
ref: containerRef,
|
|
95
|
-
style: containerStyle
|
|
96
|
-
});
|
|
97
|
-
};
|
|
98
|
-
export default Sankey;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { BasePlotProps, Style, Theme } from '../types';
|
|
3
|
-
type ScatterDataItem = {
|
|
4
|
-
x: number;
|
|
5
|
-
y: number;
|
|
6
|
-
[key: string]: string | number;
|
|
7
|
-
};
|
|
8
|
-
export type ScatterProps = BasePlotProps<ScatterDataItem> & Theme & Style & {
|
|
9
|
-
xField?: string;
|
|
10
|
-
yField?: string;
|
|
11
|
-
};
|
|
12
|
-
declare const Scatter: (props: ScatterProps) => React.JSX.Element;
|
|
13
|
-
export default Scatter;
|