@visactor/react-vchart 2.0.14 → 2.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +41 -22
- package/build/index.min.js +3 -3
- package/cjs/components/tooltip/util.js +15 -5
- package/cjs/components/tooltip/util.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/esm/components/tooltip/util.js +15 -5
- package/esm/components/tooltip/util.js.map +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.js +1 -1
- package/esm/index.js.map +1 -1
- package/package.json +5 -5
|
@@ -11,19 +11,29 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
11
11
|
}), exports.initCustomTooltip = void 0;
|
|
12
12
|
|
|
13
13
|
const react_1 = __importDefault(require("react")), constant_1 = require("./constant"), react_dom_1 = require("react-dom"), initCustomTooltip = (setTooltipNode, props, spec) => {
|
|
14
|
+
var _a, _b, _c;
|
|
15
|
+
const nextSpec = Object.assign({}, null != spec ? spec : {});
|
|
14
16
|
let render;
|
|
15
17
|
if ((null == spec ? void 0 : spec.tooltipRender) ? (render = spec.tooltipRender,
|
|
16
|
-
delete
|
|
18
|
+
delete nextSpec.tooltipRender) : props.tooltipRender && (render = props.tooltipRender),
|
|
17
19
|
render) {
|
|
18
20
|
let reserve;
|
|
19
|
-
|
|
20
|
-
delete
|
|
21
|
+
if ((null == spec ? void 0 : spec.reserveDefaultTooltip) ? (reserve = spec.reserveDefaultTooltip,
|
|
22
|
+
delete nextSpec.reserveDefaultTooltip) : reserve = props.reserveDefaultTooltip,
|
|
23
|
+
!reserve) {
|
|
24
|
+
const panelStyle = Object.assign({}, null !== (_b = null === (_a = nextSpec.style) || void 0 === _a ? void 0 : _a.panel) && void 0 !== _b ? _b : {});
|
|
25
|
+
panelStyle.padding = 0, panelStyle.border = Object.assign(Object.assign({}, panelStyle.border), {
|
|
26
|
+
radius: 0
|
|
27
|
+
}), panelStyle.backgroundColor = "unset", nextSpec.style = Object.assign(Object.assign({}, null !== (_c = nextSpec.style) && void 0 !== _c ? _c : {}), {
|
|
28
|
+
panel: panelStyle
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
return Object.assign(Object.assign({}, nextSpec), {
|
|
21
32
|
updateElement: (el, actualTooltip, params) => {
|
|
22
33
|
const {changePositionOnly: changePositionOnly} = params;
|
|
23
34
|
if (!changePositionOnly) {
|
|
24
35
|
if (!reserve) {
|
|
25
|
-
el.style.width = "auto", el.style.height = "auto", el.style.minHeight = "auto"
|
|
26
|
-
el.style.padding = "0px";
|
|
36
|
+
el.style.width = "auto", el.style.height = "auto", el.style.minHeight = "auto";
|
|
27
37
|
for (let i = 0; i < el.children.length; i++) {
|
|
28
38
|
const childNode = el.children[i];
|
|
29
39
|
childNode.className !== constant_1.REACT_TOOLTIP_ClASS_NAME && "none" !== childNode.style.display && (childNode.style.display = "none");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/tooltip/util.tsx"],"names":[],"mappings":";;;;;;AACA,kDAA0B;AAI1B,yCAAsD;AACtD,yCAAyC;AAGlC,MAAM,iBAAiB,GAAG,CAC/B,cAAqE,EACrE,KAAqB,EACrB,IAAmB,EACnB,EAAE
|
|
1
|
+
{"version":3,"sources":["../src/components/tooltip/util.tsx"],"names":[],"mappings":";;;;;;AACA,kDAA0B;AAI1B,yCAAsD;AACtD,yCAAyC;AAGlC,MAAM,iBAAiB,GAAG,CAC/B,cAAqE,EACrE,KAAqB,EACrB,IAAmB,EACnB,EAAE;;IACF,MAAM,QAAQ,GAAG,kBAAK,CAAC,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,CAAC,CAAkB,CAAC;IACrD,IAAI,MAAqB,CAAC;IAC1B,IAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,aAAa,EAAE;QACvB,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC;QAC5B,OAAO,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AE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;wBAC3C,MAAM,SAAS,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAgB,CAAC;wBAChD,IAAI,SAAS,CAAC,SAAS,KAAK,mCAAwB,IAAI,SAAS,CAAC,KAAK,CAAC,OAAO,KAAK,MAAM,EAAE;4BAC1F,SAAS,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;yBAClC;qBACF;iBACF;gBAED,cAAc,CACZ,IAAA,wBAAY,EAAC,uCAAK,SAAS,EAAE,mCAAwB,IAAG,MAAM,CAAC,EAAE,EAAE,aAAa,EAAE,MAAM,CAAC,CAAO,EAAE,EAAE,CAAC,CACtG,CAAC;YACJ,CAAC,GACc,CAAC;KACnB;IAED,OAAO,IAAoB,CAAC;AAC9B,CAAC,CAAC;AA9DW,QAAA,iBAAiB,qBA8D5B","file":"util.js","sourcesContent":["// eslint-disable-next-line @typescript-eslint/consistent-type-imports\nimport React from 'react';\nimport type { BaseChartProps } from '../../charts/BaseChart';\nimport type { TooltipProps, TooltipRender } from './interface';\nimport type { ITooltipSpec } from '@visactor/vchart';\nimport { REACT_TOOLTIP_ClASS_NAME } from './constant';\nimport { createPortal } from 'react-dom';\n\n/** tooltip 自定义插槽 */\nexport const initCustomTooltip = (\n setTooltipNode: React.Dispatch<React.SetStateAction<React.ReactNode>>,\n props: BaseChartProps,\n spec?: TooltipProps\n) => {\n const nextSpec = { ...(spec ?? {}) } as TooltipProps;\n let render: TooltipRender;\n if (spec?.tooltipRender) {\n render = spec.tooltipRender;\n delete nextSpec.tooltipRender;\n } else if (props.tooltipRender) {\n render = props.tooltipRender;\n }\n\n if (render) {\n let reserve: boolean;\n if (spec?.reserveDefaultTooltip) {\n reserve = spec.reserveDefaultTooltip;\n delete nextSpec.reserveDefaultTooltip;\n } else {\n reserve = props.reserveDefaultTooltip;\n }\n if (!reserve) {\n const panelStyle = { ...(nextSpec.style?.panel ?? {}) };\n panelStyle.padding = 0;\n panelStyle.border = {\n ...panelStyle.border,\n radius: 0\n };\n panelStyle.backgroundColor = 'unset';\n nextSpec.style = {\n ...(nextSpec.style ?? {}),\n panel: panelStyle\n };\n }\n return {\n ...nextSpec,\n updateElement: (el, actualTooltip, params) => {\n const { changePositionOnly } = params;\n if (changePositionOnly) {\n return;\n }\n if (!reserve) {\n el.style.width = 'auto';\n el.style.height = 'auto';\n el.style.minHeight = 'auto';\n for (let i = 0; i < el.children.length; i++) {\n const childNode = el.children[i] as HTMLElement;\n if (childNode.className !== REACT_TOOLTIP_ClASS_NAME && childNode.style.display !== 'none') {\n childNode.style.display = 'none';\n }\n }\n }\n\n setTooltipNode(\n createPortal(<div className={REACT_TOOLTIP_ClASS_NAME}>{render(el, actualTooltip, params)}</div>, el)\n );\n }\n } as ITooltipSpec;\n }\n\n return spec as ITooltipSpec;\n};\n"]}
|
package/cjs/index.d.ts
CHANGED
|
@@ -5,6 +5,6 @@ export * from './VChart';
|
|
|
5
5
|
export * from './VChartSimple';
|
|
6
6
|
export * from './register';
|
|
7
7
|
export { VChart as VChartCore } from '@visactor/vchart';
|
|
8
|
-
export declare const version = "2.0.
|
|
8
|
+
export declare const version = "2.0.15";
|
|
9
9
|
export type { IAreaChartSpec, IBarChartSpec, IBoxPlotChartSpec, ICirclePackingChartSpec, ICommonChartSpec, IFunnelChartSpec, IGaugeChartSpec, IHeatmapChartSpec, IHistogramChartSpec, ILineChartSpec, IMapChartSpec, IPieChartSpec, ICircularProgressChartSpec, ILinearProgressChartSpec, IRadarChartSpec, IRangeColumnChartSpec, IRangeAreaChartSpec, IRoseChartSpec, IScatterChartSpec, ISankeyChartSpec, ISequenceChartSpec, ISunburstChartSpec, ITreemapChartSpec, IWaterfallChartSpec, ICorrelationChartSpec, ILiquidChartSpec, IWordCloudChartSpec, IPolarChartSpec, ICartesianChartSpec, ITheme, IInitOption, ISpec, IVChart } from '@visactor/vchart';
|
|
10
10
|
export type { IBar3dChartSpec, IFunnel3dChartSpec, IHistogram3dChartSpec, IPie3dChartSpec, IRangeColumn3dChartSpec, IWordCloud3dChartSpec } from '@visactor/vchart-extension';
|
package/cjs/index.js
CHANGED
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB;AACzB,+CAA6B;AAC7B,2CAAyB;AACzB,iDAA+B;AAC/B,6CAA2B;AAC3B,2CAAwD;AAA/C,oGAAA,MAAM,OAAc;AAGhB,QAAA,OAAO,GAAG,QAAQ,CAAC","file":"index.js","sourcesContent":["export * from './charts';\nexport * from './series';\nexport * from './components';\nexport * from './VChart';\nexport * from './VChartSimple';\nexport * from './register';\nexport { VChart as VChartCore } from '@visactor/vchart';\n\n// export the version, since @1.8.3\nexport const version = \"2.0.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB;AACzB,+CAA6B;AAC7B,2CAAyB;AACzB,iDAA+B;AAC/B,6CAA2B;AAC3B,2CAAwD;AAA/C,oGAAA,MAAM,OAAc;AAGhB,QAAA,OAAO,GAAG,QAAQ,CAAC","file":"index.js","sourcesContent":["export * from './charts';\nexport * from './series';\nexport * from './components';\nexport * from './VChart';\nexport * from './VChartSimple';\nexport * from './register';\nexport { VChart as VChartCore } from '@visactor/vchart';\n\n// export the version, since @1.8.3\nexport const version = \"2.0.15\";\n\nexport type {\n IAreaChartSpec,\n IBarChartSpec,\n IBoxPlotChartSpec,\n ICirclePackingChartSpec,\n ICommonChartSpec,\n IFunnelChartSpec,\n IGaugeChartSpec,\n IHeatmapChartSpec,\n IHistogramChartSpec,\n ILineChartSpec,\n IMapChartSpec,\n IPieChartSpec,\n ICircularProgressChartSpec,\n ILinearProgressChartSpec,\n IRadarChartSpec,\n IRangeColumnChartSpec,\n IRangeAreaChartSpec,\n IRoseChartSpec,\n IScatterChartSpec,\n ISankeyChartSpec,\n ISequenceChartSpec,\n ISunburstChartSpec,\n ITreemapChartSpec,\n IWaterfallChartSpec,\n ICorrelationChartSpec,\n ILiquidChartSpec,\n IWordCloudChartSpec,\n IPolarChartSpec,\n ICartesianChartSpec,\n ITheme,\n IInitOption,\n ISpec,\n IVChart\n} from '@visactor/vchart';\n\nexport type {\n IBar3dChartSpec,\n IFunnel3dChartSpec,\n IHistogram3dChartSpec,\n IPie3dChartSpec,\n IRangeColumn3dChartSpec,\n IWordCloud3dChartSpec\n} from '@visactor/vchart-extension';\n"]}
|
|
@@ -5,19 +5,29 @@ import { REACT_TOOLTIP_ClASS_NAME } from "./constant";
|
|
|
5
5
|
import { createPortal } from "react-dom";
|
|
6
6
|
|
|
7
7
|
export const initCustomTooltip = (setTooltipNode, props, spec) => {
|
|
8
|
+
var _a, _b, _c;
|
|
9
|
+
const nextSpec = Object.assign({}, null != spec ? spec : {});
|
|
8
10
|
let render;
|
|
9
11
|
if ((null == spec ? void 0 : spec.tooltipRender) ? (render = spec.tooltipRender,
|
|
10
|
-
delete
|
|
12
|
+
delete nextSpec.tooltipRender) : props.tooltipRender && (render = props.tooltipRender),
|
|
11
13
|
render) {
|
|
12
14
|
let reserve;
|
|
13
|
-
|
|
14
|
-
delete
|
|
15
|
+
if ((null == spec ? void 0 : spec.reserveDefaultTooltip) ? (reserve = spec.reserveDefaultTooltip,
|
|
16
|
+
delete nextSpec.reserveDefaultTooltip) : reserve = props.reserveDefaultTooltip,
|
|
17
|
+
!reserve) {
|
|
18
|
+
const panelStyle = Object.assign({}, null !== (_b = null === (_a = nextSpec.style) || void 0 === _a ? void 0 : _a.panel) && void 0 !== _b ? _b : {});
|
|
19
|
+
panelStyle.padding = 0, panelStyle.border = Object.assign(Object.assign({}, panelStyle.border), {
|
|
20
|
+
radius: 0
|
|
21
|
+
}), panelStyle.backgroundColor = "unset", nextSpec.style = Object.assign(Object.assign({}, null !== (_c = nextSpec.style) && void 0 !== _c ? _c : {}), {
|
|
22
|
+
panel: panelStyle
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return Object.assign(Object.assign({}, nextSpec), {
|
|
15
26
|
updateElement: (el, actualTooltip, params) => {
|
|
16
27
|
const {changePositionOnly: changePositionOnly} = params;
|
|
17
28
|
if (!changePositionOnly) {
|
|
18
29
|
if (!reserve) {
|
|
19
|
-
el.style.width = "auto", el.style.height = "auto", el.style.minHeight = "auto"
|
|
20
|
-
el.style.padding = "0px";
|
|
30
|
+
el.style.width = "auto", el.style.height = "auto", el.style.minHeight = "auto";
|
|
21
31
|
for (let i = 0; i < el.children.length; i++) {
|
|
22
32
|
const childNode = el.children[i];
|
|
23
33
|
childNode.className !== REACT_TOOLTIP_ClASS_NAME && "none" !== childNode.style.display && (childNode.style.display = "none");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/tooltip/util.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAGzC,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,cAAqE,EACrE,KAAqB,EACrB,IAAmB,EACnB,EAAE
|
|
1
|
+
{"version":3,"sources":["../src/components/tooltip/util.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAGzC,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,cAAqE,EACrE,KAAqB,EACrB,IAAmB,EACnB,EAAE;;IACF,MAAM,QAAQ,GAAG,kBAAK,CAAC,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,CAAC,CAAkB,CAAC;IACrD,IAAI,MAA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AK,CAAC,MAAM,GAAG,MAAM,CAAC;oBACzB,EAAE,CAAC,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC;oBAC5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;wBAC3C,MAAM,SAAS,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAgB,CAAC;wBAChD,IAAI,SAAS,CAAC,SAAS,KAAK,wBAAwB,IAAI,SAAS,CAAC,KAAK,CAAC,OAAO,KAAK,MAAM,EAAE;4BAC1F,SAAS,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;yBAClC;qBACF;iBACF;gBAED,cAAc,CACZ,YAAY,CAAC,6BAAK,SAAS,EAAE,wBAAwB,IAAG,MAAM,CAAC,EAAE,EAAE,aAAa,EAAE,MAAM,CAAC,CAAO,EAAE,EAAE,CAAC,CACtG,CAAC;YACJ,CAAC,GACc,CAAC;KACnB;IAED,OAAO,IAAoB,CAAC;AAC9B,CAAC,CAAC","file":"util.js","sourcesContent":["// eslint-disable-next-line @typescript-eslint/consistent-type-imports\nimport React from 'react';\nimport type { BaseChartProps } from '../../charts/BaseChart';\nimport type { TooltipProps, TooltipRender } from './interface';\nimport type { ITooltipSpec } from '@visactor/vchart';\nimport { REACT_TOOLTIP_ClASS_NAME } from './constant';\nimport { createPortal } from 'react-dom';\n\n/** tooltip 自定义插槽 */\nexport const initCustomTooltip = (\n setTooltipNode: React.Dispatch<React.SetStateAction<React.ReactNode>>,\n props: BaseChartProps,\n spec?: TooltipProps\n) => {\n const nextSpec = { ...(spec ?? {}) } as TooltipProps;\n let render: TooltipRender;\n if (spec?.tooltipRender) {\n render = spec.tooltipRender;\n delete nextSpec.tooltipRender;\n } else if (props.tooltipRender) {\n render = props.tooltipRender;\n }\n\n if (render) {\n let reserve: boolean;\n if (spec?.reserveDefaultTooltip) {\n reserve = spec.reserveDefaultTooltip;\n delete nextSpec.reserveDefaultTooltip;\n } else {\n reserve = props.reserveDefaultTooltip;\n }\n if (!reserve) {\n const panelStyle = { ...(nextSpec.style?.panel ?? {}) };\n panelStyle.padding = 0;\n panelStyle.border = {\n ...panelStyle.border,\n radius: 0\n };\n panelStyle.backgroundColor = 'unset';\n nextSpec.style = {\n ...(nextSpec.style ?? {}),\n panel: panelStyle\n };\n }\n return {\n ...nextSpec,\n updateElement: (el, actualTooltip, params) => {\n const { changePositionOnly } = params;\n if (changePositionOnly) {\n return;\n }\n if (!reserve) {\n el.style.width = 'auto';\n el.style.height = 'auto';\n el.style.minHeight = 'auto';\n for (let i = 0; i < el.children.length; i++) {\n const childNode = el.children[i] as HTMLElement;\n if (childNode.className !== REACT_TOOLTIP_ClASS_NAME && childNode.style.display !== 'none') {\n childNode.style.display = 'none';\n }\n }\n }\n\n setTooltipNode(\n createPortal(<div className={REACT_TOOLTIP_ClASS_NAME}>{render(el, actualTooltip, params)}</div>, el)\n );\n }\n } as ITooltipSpec;\n }\n\n return spec as ITooltipSpec;\n};\n"]}
|
package/esm/index.d.ts
CHANGED
|
@@ -5,6 +5,6 @@ export * from './VChart';
|
|
|
5
5
|
export * from './VChartSimple';
|
|
6
6
|
export * from './register';
|
|
7
7
|
export { VChart as VChartCore } from '@visactor/vchart';
|
|
8
|
-
export declare const version = "2.0.
|
|
8
|
+
export declare const version = "2.0.15";
|
|
9
9
|
export type { IAreaChartSpec, IBarChartSpec, IBoxPlotChartSpec, ICirclePackingChartSpec, ICommonChartSpec, IFunnelChartSpec, IGaugeChartSpec, IHeatmapChartSpec, IHistogramChartSpec, ILineChartSpec, IMapChartSpec, IPieChartSpec, ICircularProgressChartSpec, ILinearProgressChartSpec, IRadarChartSpec, IRangeColumnChartSpec, IRangeAreaChartSpec, IRoseChartSpec, IScatterChartSpec, ISankeyChartSpec, ISequenceChartSpec, ISunburstChartSpec, ITreemapChartSpec, IWaterfallChartSpec, ICorrelationChartSpec, ILiquidChartSpec, IWordCloudChartSpec, IPolarChartSpec, ICartesianChartSpec, ITheme, IInitOption, ISpec, IVChart } from '@visactor/vchart';
|
|
10
10
|
export type { IBar3dChartSpec, IFunnel3dChartSpec, IHistogram3dChartSpec, IPie3dChartSpec, IRangeColumn3dChartSpec, IWordCloud3dChartSpec } from '@visactor/vchart-extension';
|
package/esm/index.js
CHANGED
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGxD,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC","file":"index.js","sourcesContent":["export * from './charts';\nexport * from './series';\nexport * from './components';\nexport * from './VChart';\nexport * from './VChartSimple';\nexport * from './register';\nexport { VChart as VChartCore } from '@visactor/vchart';\n\n// export the version, since @1.8.3\nexport const version = \"2.0.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGxD,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC","file":"index.js","sourcesContent":["export * from './charts';\nexport * from './series';\nexport * from './components';\nexport * from './VChart';\nexport * from './VChartSimple';\nexport * from './register';\nexport { VChart as VChartCore } from '@visactor/vchart';\n\n// export the version, since @1.8.3\nexport const version = \"2.0.15\";\n\nexport type {\n IAreaChartSpec,\n IBarChartSpec,\n IBoxPlotChartSpec,\n ICirclePackingChartSpec,\n ICommonChartSpec,\n IFunnelChartSpec,\n IGaugeChartSpec,\n IHeatmapChartSpec,\n IHistogramChartSpec,\n ILineChartSpec,\n IMapChartSpec,\n IPieChartSpec,\n ICircularProgressChartSpec,\n ILinearProgressChartSpec,\n IRadarChartSpec,\n IRangeColumnChartSpec,\n IRangeAreaChartSpec,\n IRoseChartSpec,\n IScatterChartSpec,\n ISankeyChartSpec,\n ISequenceChartSpec,\n ISunburstChartSpec,\n ITreemapChartSpec,\n IWaterfallChartSpec,\n ICorrelationChartSpec,\n ILiquidChartSpec,\n IWordCloudChartSpec,\n IPolarChartSpec,\n ICartesianChartSpec,\n ITheme,\n IInitOption,\n ISpec,\n IVChart\n} from '@visactor/vchart';\n\nexport type {\n IBar3dChartSpec,\n IFunnel3dChartSpec,\n IHistogram3dChartSpec,\n IPie3dChartSpec,\n IRangeColumn3dChartSpec,\n IWordCloud3dChartSpec\n} from '@visactor/vchart-extension';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visactor/react-vchart",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.15",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"description": "The react version of VChart 4.x",
|
|
6
6
|
"keywords": [
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"build"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@visactor/vchart": "2.0.
|
|
27
|
-
"@visactor/vchart-extension": "2.0.
|
|
26
|
+
"@visactor/vchart": "2.0.15",
|
|
27
|
+
"@visactor/vchart-extension": "2.0.15",
|
|
28
28
|
"@visactor/vutils": "~1.0.12",
|
|
29
|
-
"@visactor/vrender-core": "~1.0.
|
|
30
|
-
"@visactor/vrender-kits": "~1.0.
|
|
29
|
+
"@visactor/vrender-core": "~1.0.40",
|
|
30
|
+
"@visactor/vrender-kits": "~1.0.40",
|
|
31
31
|
"react-is": "^18.2.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|