@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
package/dist/cjs/utils/plot.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// src/utils/plot.ts
|
|
20
|
-
var plot_exports = {};
|
|
21
|
-
__export(plot_exports, {
|
|
22
|
-
groupBy: () => groupBy,
|
|
23
|
-
transform2ADCProps: () => transform2ADCProps
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(plot_exports);
|
|
26
|
-
var import_lodash = require("lodash");
|
|
27
|
-
var ADC_ENCODE_FIELDS = /* @__PURE__ */ new Map([
|
|
28
|
-
["x", "xField"],
|
|
29
|
-
["y", "yField"],
|
|
30
|
-
["series", "seriesField"],
|
|
31
|
-
["size", "sizeField"],
|
|
32
|
-
["color", "colorField"],
|
|
33
|
-
["shape", "shapeField"],
|
|
34
|
-
["y", "angleField"]
|
|
35
|
-
]);
|
|
36
|
-
function visG2Encode2ADCEncode(config) {
|
|
37
|
-
const encodeConfig = config.encode;
|
|
38
|
-
if (!encodeConfig)
|
|
39
|
-
return config;
|
|
40
|
-
const _config = { ...config };
|
|
41
|
-
for (const field of encodeConfig) {
|
|
42
|
-
const adcField = ADC_ENCODE_FIELDS.get(field);
|
|
43
|
-
if (adcField) {
|
|
44
|
-
_config[adcField] = encodeConfig[field];
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return _config;
|
|
48
|
-
}
|
|
49
|
-
function axisTitle2G2axis(config) {
|
|
50
|
-
const { axisXTitle, axisYTitle } = config;
|
|
51
|
-
const _config = { axis: {}, ...config };
|
|
52
|
-
if (axisXTitle) {
|
|
53
|
-
if ((0, import_lodash.get)(_config, "axis.x")) {
|
|
54
|
-
_config.axis.x.title = axisXTitle;
|
|
55
|
-
} else {
|
|
56
|
-
_config.axis.x = { title: axisXTitle };
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
if (axisYTitle) {
|
|
60
|
-
if ((0, import_lodash.get)(_config, "axis.y")) {
|
|
61
|
-
_config.axis.y.title = axisYTitle;
|
|
62
|
-
} else {
|
|
63
|
-
_config.axis.y = { title: axisYTitle };
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
return _config;
|
|
67
|
-
}
|
|
68
|
-
function transform2ADCProps(props) {
|
|
69
|
-
const transformedEncode = visG2Encode2ADCEncode(props);
|
|
70
|
-
const transformedAxis = axisTitle2G2axis(transformedEncode);
|
|
71
|
-
return transformedAxis;
|
|
72
|
-
}
|
|
73
|
-
function groupBy(data, keyFunc) {
|
|
74
|
-
return data.reduce(
|
|
75
|
-
(acc, item) => {
|
|
76
|
-
const key = keyFunc(item);
|
|
77
|
-
if (!acc[key]) {
|
|
78
|
-
acc[key] = [];
|
|
79
|
-
}
|
|
80
|
-
acc[key].push(item);
|
|
81
|
-
return acc;
|
|
82
|
-
},
|
|
83
|
-
{}
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
87
|
-
0 && (module.exports = {
|
|
88
|
-
groupBy,
|
|
89
|
-
transform2ADCProps
|
|
90
|
-
});
|
package/dist/cjs/version.d.ts
DELETED
package/dist/cjs/version.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// src/version.ts
|
|
20
|
-
var version_exports = {};
|
|
21
|
-
__export(version_exports, {
|
|
22
|
-
default: () => version_default
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(version_exports);
|
|
25
|
-
var version_default = "0.6.1";
|
package/dist/esm/Area/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { AreaConfig } from '@ant-design/plots';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import type { BasePlotProps, Style, Theme } from '../types';
|
|
4
|
-
type AreaDataItem = {
|
|
5
|
-
time: string | number;
|
|
6
|
-
value: number;
|
|
7
|
-
[key: string]: string | number;
|
|
8
|
-
};
|
|
9
|
-
export type AreaProps = BasePlotProps<AreaDataItem> & Partial<AreaConfig> & Theme & Style;
|
|
10
|
-
declare const Area: (props: AreaProps) => React.JSX.Element;
|
|
11
|
-
export default Area;
|
package/dist/esm/Area/index.js
DELETED
|
@@ -1,108 +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 { Area as ADCArea } from '@ant-design/plots';
|
|
8
|
-
import { get } from 'lodash';
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import { usePlotConfig } from "../ConfigProvider/hooks";
|
|
11
|
-
import { THEME_MAP } from "../theme";
|
|
12
|
-
var getLinearGradientColor = function getLinearGradientColor(color) {
|
|
13
|
-
return "linear-gradient(-90deg, white 0%, ".concat(color, " 100%)");
|
|
14
|
-
};
|
|
15
|
-
var DEFAULT_COLOR = '#3A95FF';
|
|
16
|
-
var defaultConfig = function defaultConfig(props) {
|
|
17
|
-
var data = props.data,
|
|
18
|
-
_props$xField = props.xField,
|
|
19
|
-
xField = _props$xField === void 0 ? 'time' : _props$xField,
|
|
20
|
-
_props$yField = props.yField,
|
|
21
|
-
yField = _props$yField === void 0 ? 'value' : _props$yField,
|
|
22
|
-
_props$style = props.style,
|
|
23
|
-
style = _props$style === void 0 ? {} : _props$style;
|
|
24
|
-
var backgroundColor = style.backgroundColor,
|
|
25
|
-
palette = style.palette,
|
|
26
|
-
_style$lineWidth = style.lineWidth,
|
|
27
|
-
lineWidth = _style$lineWidth === void 0 ? 2 : _style$lineWidth;
|
|
28
|
-
var hasGroupField = get(data, '[0].group') !== undefined;
|
|
29
|
-
var axisYTitle = get(props, 'axis.y.title');
|
|
30
|
-
var fillColor = getLinearGradientColor((palette === null || palette === void 0 ? void 0 : palette[0]) || DEFAULT_COLOR);
|
|
31
|
-
var defaultStyle = hasGroupField ? {
|
|
32
|
-
opacity: 0.6
|
|
33
|
-
} : {
|
|
34
|
-
opacity: 0.6,
|
|
35
|
-
fill: fillColor
|
|
36
|
-
};
|
|
37
|
-
var paletteConfig = {
|
|
38
|
-
color: undefined
|
|
39
|
-
};
|
|
40
|
-
var encode = {};
|
|
41
|
-
var hasPalette = !!(palette !== null && palette !== void 0 && palette[0]);
|
|
42
|
-
if (hasPalette) {
|
|
43
|
-
paletteConfig = {
|
|
44
|
-
color: {
|
|
45
|
-
range: palette
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
if (hasGroupField) {
|
|
50
|
-
encode = {
|
|
51
|
-
x: xField,
|
|
52
|
-
y: yField,
|
|
53
|
-
color: 'group'
|
|
54
|
-
};
|
|
55
|
-
} else {
|
|
56
|
-
encode = {
|
|
57
|
-
x: xField,
|
|
58
|
-
y: yField,
|
|
59
|
-
color: function color() {
|
|
60
|
-
return 'all';
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
return _objectSpread({
|
|
65
|
-
xField: xField,
|
|
66
|
-
yField: yField,
|
|
67
|
-
style: defaultStyle,
|
|
68
|
-
colorField: hasGroupField ? 'group' : undefined,
|
|
69
|
-
stack: hasGroupField,
|
|
70
|
-
// @ts-ignore
|
|
71
|
-
encode: encode,
|
|
72
|
-
legend: hasGroupField ? {} : false,
|
|
73
|
-
tooltip: function tooltip(d) {
|
|
74
|
-
var tooltipName = axisYTitle || d[xField];
|
|
75
|
-
return {
|
|
76
|
-
name: tooltipName,
|
|
77
|
-
value: d[yField]
|
|
78
|
-
};
|
|
79
|
-
},
|
|
80
|
-
scale: _objectSpread({
|
|
81
|
-
y: {
|
|
82
|
-
nice: true
|
|
83
|
-
}
|
|
84
|
-
}, paletteConfig),
|
|
85
|
-
line: _objectSpread({
|
|
86
|
-
encode: encode,
|
|
87
|
-
style: {
|
|
88
|
-
lineWidth: lineWidth,
|
|
89
|
-
strokeOpacity: 0.6
|
|
90
|
-
}
|
|
91
|
-
}, paletteConfig)
|
|
92
|
-
}, backgroundColor ? {
|
|
93
|
-
viewStyle: {
|
|
94
|
-
viewFill: backgroundColor
|
|
95
|
-
}
|
|
96
|
-
} : {
|
|
97
|
-
viewStyle: undefined
|
|
98
|
-
});
|
|
99
|
-
};
|
|
100
|
-
var Area = function Area(props) {
|
|
101
|
-
var _props$theme;
|
|
102
|
-
var themeConfig = THEME_MAP[(_props$theme = props.theme) !== null && _props$theme !== void 0 ? _props$theme : 'default'];
|
|
103
|
-
var config = usePlotConfig('Area', defaultConfig, _objectSpread(_objectSpread({}, props), {}, {
|
|
104
|
-
theme: themeConfig
|
|
105
|
-
}));
|
|
106
|
-
return /*#__PURE__*/React.createElement(ADCArea, config);
|
|
107
|
-
};
|
|
108
|
-
export default Area;
|
package/dist/esm/Bar/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { BarConfig } from '@ant-design/plots';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import type { BasePlotProps, Style, Theme } from '../types';
|
|
4
|
-
type BarDataItem = {
|
|
5
|
-
category: string;
|
|
6
|
-
value: number;
|
|
7
|
-
[key: string]: string | number;
|
|
8
|
-
};
|
|
9
|
-
export type BarProps = BasePlotProps<BarDataItem> & Partial<BarConfig> & Theme & Style & {
|
|
10
|
-
group?: boolean;
|
|
11
|
-
stack?: boolean;
|
|
12
|
-
};
|
|
13
|
-
declare const Bar: (props: BarProps) => React.JSX.Element;
|
|
14
|
-
export default Bar;
|
package/dist/esm/Bar/index.js
DELETED
|
@@ -1,92 +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 { Bar as ADCBar } from '@ant-design/plots';
|
|
8
|
-
import { get } from 'lodash';
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import { usePlotConfig } from "../ConfigProvider/hooks";
|
|
11
|
-
import { THEME_MAP } from "../theme";
|
|
12
|
-
var defaultConfig = function defaultConfig(props) {
|
|
13
|
-
var data = props.data,
|
|
14
|
-
_props$xField = props.xField,
|
|
15
|
-
xField = _props$xField === void 0 ? 'category' : _props$xField,
|
|
16
|
-
_props$yField = props.yField,
|
|
17
|
-
yField = _props$yField === void 0 ? 'value' : _props$yField,
|
|
18
|
-
_props$style = props.style,
|
|
19
|
-
style = _props$style === void 0 ? {} : _props$style,
|
|
20
|
-
_props$theme = props.theme,
|
|
21
|
-
theme = _props$theme === void 0 ? {} : _props$theme;
|
|
22
|
-
var backgroundColor = style.backgroundColor,
|
|
23
|
-
palette = style.palette;
|
|
24
|
-
var hasGroupField = get(data, '[0].group') !== undefined;
|
|
25
|
-
var axisYTitle = get(props, 'axis.y.title');
|
|
26
|
-
var hasPalette = !!(palette !== null && palette !== void 0 && palette[0]);
|
|
27
|
-
var paletteConfig = {
|
|
28
|
-
color: undefined
|
|
29
|
-
};
|
|
30
|
-
var radiusStyle = {
|
|
31
|
-
radiusTopLeft: 4,
|
|
32
|
-
radiusTopRight: 4
|
|
33
|
-
};
|
|
34
|
-
if ((theme === null || theme === void 0 ? void 0 : theme.type) === 'academy') {
|
|
35
|
-
radiusStyle = {
|
|
36
|
-
radiusTopLeft: 0,
|
|
37
|
-
radiusTopRight: 0
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
if (hasPalette) {
|
|
41
|
-
paletteConfig = {
|
|
42
|
-
color: {
|
|
43
|
-
range: palette
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
return _objectSpread(_objectSpread({
|
|
48
|
-
xField: xField,
|
|
49
|
-
yField: yField,
|
|
50
|
-
colorField: hasGroupField ? 'group' : xField,
|
|
51
|
-
tooltip: function tooltip(d) {
|
|
52
|
-
var tooltipName = hasGroupField ? d['group'] : axisYTitle || d[xField];
|
|
53
|
-
return {
|
|
54
|
-
name: tooltipName,
|
|
55
|
-
value: d[yField]
|
|
56
|
-
};
|
|
57
|
-
},
|
|
58
|
-
style: _objectSpread(_objectSpread({}, radiusStyle), {}, {
|
|
59
|
-
columnWidthRatio: 0.8
|
|
60
|
-
}),
|
|
61
|
-
scale: _objectSpread({
|
|
62
|
-
y: {
|
|
63
|
-
nice: true
|
|
64
|
-
}
|
|
65
|
-
}, paletteConfig)
|
|
66
|
-
}, backgroundColor ? {
|
|
67
|
-
viewStyle: {
|
|
68
|
-
viewFill: backgroundColor
|
|
69
|
-
}
|
|
70
|
-
} : {
|
|
71
|
-
viewStyle: undefined
|
|
72
|
-
}), {}, {
|
|
73
|
-
legend: hasGroupField ? {} : false
|
|
74
|
-
});
|
|
75
|
-
};
|
|
76
|
-
var Bar = function Bar(props) {
|
|
77
|
-
var _props$theme2;
|
|
78
|
-
var themeConfig = THEME_MAP[(_props$theme2 = props.theme) !== null && _props$theme2 !== void 0 ? _props$theme2 : 'default'];
|
|
79
|
-
var data = props.data,
|
|
80
|
-
_props$group = props.group,
|
|
81
|
-
group = _props$group === void 0 ? false : _props$group,
|
|
82
|
-
_props$stack = props.stack,
|
|
83
|
-
stack = _props$stack === void 0 ? false : _props$stack;
|
|
84
|
-
var hasGroupField = get(data, '[0].group') !== undefined;
|
|
85
|
-
var config = usePlotConfig('Bar', defaultConfig, _objectSpread(_objectSpread({}, props), {}, {
|
|
86
|
-
theme: themeConfig,
|
|
87
|
-
group: hasGroupField && group,
|
|
88
|
-
stack: hasGroupField && stack
|
|
89
|
-
}));
|
|
90
|
-
return /*#__PURE__*/React.createElement(ADCBar, config);
|
|
91
|
-
};
|
|
92
|
-
export default Bar;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { BoxConfig } from '@ant-design/plots';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import type { BasePlotProps, Style, Theme } from '../types';
|
|
4
|
-
type BoxplotDatum = {
|
|
5
|
-
category: string;
|
|
6
|
-
value: number;
|
|
7
|
-
group?: string;
|
|
8
|
-
};
|
|
9
|
-
export type BoxplotProps = BasePlotProps<BoxplotDatum> & Partial<BoxConfig> & Theme & Style;
|
|
10
|
-
declare const Boxplot: (props: BoxplotProps) => React.JSX.Element;
|
|
11
|
-
export default Boxplot;
|
|
@@ -1,86 +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 { Box as ADCBox } from '@ant-design/plots';
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import { usePlotConfig } from "../ConfigProvider/hooks";
|
|
10
|
-
import { THEME_MAP } from "../theme";
|
|
11
|
-
var defaultConfig = function defaultConfig(props) {
|
|
12
|
-
var _;
|
|
13
|
-
var data = props.data,
|
|
14
|
-
_props$style = props.style,
|
|
15
|
-
style = _props$style === void 0 ? {} : _props$style,
|
|
16
|
-
axisYTitle = props.axisYTitle,
|
|
17
|
-
axisXTitle = props.axisXTitle,
|
|
18
|
-
_props$xField = props.xField,
|
|
19
|
-
xField = _props$xField === void 0 ? 'category' : _props$xField,
|
|
20
|
-
_props$yField = props.yField,
|
|
21
|
-
yField = _props$yField === void 0 ? 'value' : _props$yField;
|
|
22
|
-
var backgroundColor = style.backgroundColor,
|
|
23
|
-
palette = style.palette,
|
|
24
|
-
_style$startAtZero = style.startAtZero,
|
|
25
|
-
startAtZero = _style$startAtZero === void 0 ? false : _style$startAtZero;
|
|
26
|
-
var hasGroupField = ((_ = (data || [])[0]) === null || _ === void 0 ? void 0 : _.group) !== undefined;
|
|
27
|
-
var paletteConfig = {
|
|
28
|
-
color: undefined
|
|
29
|
-
};
|
|
30
|
-
var hasPalette = !!(palette !== null && palette !== void 0 && palette[0]);
|
|
31
|
-
var colorField = hasGroupField ? 'group' : 'category';
|
|
32
|
-
var seriesField = hasGroupField ? 'group' : 'category';
|
|
33
|
-
if (hasPalette) {
|
|
34
|
-
paletteConfig = {
|
|
35
|
-
color: {
|
|
36
|
-
range: palette
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
return _objectSpread({
|
|
41
|
-
data: data,
|
|
42
|
-
boxType: 'boxplot',
|
|
43
|
-
xField: xField,
|
|
44
|
-
yField: yField,
|
|
45
|
-
colorField: colorField,
|
|
46
|
-
seriesField: seriesField,
|
|
47
|
-
axis: {
|
|
48
|
-
y: {
|
|
49
|
-
title: axisYTitle || false
|
|
50
|
-
},
|
|
51
|
-
x: {
|
|
52
|
-
title: axisXTitle || false
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
scale: _objectSpread({
|
|
56
|
-
x: {
|
|
57
|
-
paddingInner: 0.6,
|
|
58
|
-
paddingOuter: 0.3
|
|
59
|
-
},
|
|
60
|
-
series: {
|
|
61
|
-
paddingInner: 0.3,
|
|
62
|
-
paddingOuter: 0.1
|
|
63
|
-
},
|
|
64
|
-
y: {
|
|
65
|
-
nice: true,
|
|
66
|
-
zero: startAtZero
|
|
67
|
-
}
|
|
68
|
-
}, paletteConfig),
|
|
69
|
-
style: {
|
|
70
|
-
stroke: 'black'
|
|
71
|
-
}
|
|
72
|
-
}, backgroundColor ? {
|
|
73
|
-
viewStyle: {
|
|
74
|
-
viewFill: backgroundColor
|
|
75
|
-
}
|
|
76
|
-
} : {});
|
|
77
|
-
};
|
|
78
|
-
var Boxplot = function Boxplot(props) {
|
|
79
|
-
var _props$theme;
|
|
80
|
-
var themeConfig = THEME_MAP[(_props$theme = props.theme) !== null && _props$theme !== void 0 ? _props$theme : 'default'];
|
|
81
|
-
var config = usePlotConfig('Boxplot', defaultConfig, _objectSpread(_objectSpread({}, props), {}, {
|
|
82
|
-
theme: themeConfig
|
|
83
|
-
}));
|
|
84
|
-
return /*#__PURE__*/React.createElement(ADCBox, config);
|
|
85
|
-
};
|
|
86
|
-
export default Boxplot;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { LoadingOutlined } from '@ant-design/icons';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import styled from 'styled-components';
|
|
4
|
-
var StyledLoading = styled.div.withConfig({
|
|
5
|
-
displayName: "StyledLoading",
|
|
6
|
-
componentId: "gpt-vis-c7ef__sc-4x7w8p-0"
|
|
7
|
-
})(["display:flex;align-items:center;justify-content:center;flex-direction:column;height:300px;background-image:linear-gradient(135deg,#e3f3ff 0%,#f1eeff 100%);color:rgba(0,0,0,88%);&-icon{margin-bottom:6px;}"]);
|
|
8
|
-
var Loading = function Loading(_ref) {
|
|
9
|
-
var text = _ref.text;
|
|
10
|
-
return /*#__PURE__*/React.createElement(StyledLoading, {
|
|
11
|
-
className: "gpt-vis-loading"
|
|
12
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
13
|
-
className: "gpt-vis-loading-icon"
|
|
14
|
-
}, /*#__PURE__*/React.createElement(LoadingOutlined, {
|
|
15
|
-
style: {
|
|
16
|
-
fontSize: '24px',
|
|
17
|
-
color: 'rgb(56, 177, 246)'
|
|
18
|
-
}
|
|
19
|
-
})), /*#__PURE__*/React.createElement("p", null, text));
|
|
20
|
-
};
|
|
21
|
-
export default Loading;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ChartComponents, ComponentErrorRender, ErrorRender, TextLabels } from './type';
|
|
3
|
-
type RenderVisChartProps = {
|
|
4
|
-
content: string;
|
|
5
|
-
components: ChartComponents;
|
|
6
|
-
debug?: boolean;
|
|
7
|
-
loadingTimeout: number;
|
|
8
|
-
style?: React.CSSProperties;
|
|
9
|
-
componentErrorRender?: (errorInfo: ComponentErrorRender) => React.ReactElement;
|
|
10
|
-
errorRender?: (errorInfo: ErrorRender) => React.ReactElement;
|
|
11
|
-
showTabs?: boolean;
|
|
12
|
-
showCodeTab?: boolean;
|
|
13
|
-
showChartTab?: boolean;
|
|
14
|
-
defaultTab?: 'chart' | 'code';
|
|
15
|
-
textLabels?: TextLabels;
|
|
16
|
-
locale?: string;
|
|
17
|
-
};
|
|
18
|
-
export declare const RenderVisChart: React.FC<RenderVisChartProps>;
|
|
19
|
-
export {};
|