@antv/g2plot 2.4.15 → 2.4.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/g2plot.min.js +3 -17
- package/dist/g2plot.min.js.map +1 -1
- package/esm/adaptor/geometries/area.js +2 -1
- package/esm/adaptor/geometries/area.js.map +1 -1
- package/esm/adaptor/geometries/edge.js +2 -1
- package/esm/adaptor/geometries/edge.js.map +1 -1
- package/esm/adaptor/geometries/interval.js +9 -2
- package/esm/adaptor/geometries/interval.js.map +1 -1
- package/esm/adaptor/geometries/line.js +2 -2
- package/esm/adaptor/geometries/line.js.map +1 -1
- package/esm/adaptor/geometries/point.js +2 -1
- package/esm/adaptor/geometries/point.js.map +1 -1
- package/esm/adaptor/geometries/polygon.js +2 -1
- package/esm/adaptor/geometries/polygon.js.map +1 -1
- package/esm/adaptor/geometries/schema.js +2 -1
- package/esm/adaptor/geometries/schema.js.map +1 -1
- package/esm/adaptor/pattern.d.ts +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.js +1 -1
- package/esm/index.js.map +1 -1
- package/esm/types/common.d.ts +6 -0
- package/esm/types/common.js.map +1 -1
- package/lib/adaptor/geometries/area.js +2 -1
- package/lib/adaptor/geometries/area.js.map +1 -1
- package/lib/adaptor/geometries/edge.js +2 -1
- package/lib/adaptor/geometries/edge.js.map +1 -1
- package/lib/adaptor/geometries/interval.js +9 -2
- package/lib/adaptor/geometries/interval.js.map +1 -1
- package/lib/adaptor/geometries/line.js +2 -2
- package/lib/adaptor/geometries/line.js.map +1 -1
- package/lib/adaptor/geometries/point.js +2 -1
- package/lib/adaptor/geometries/point.js.map +1 -1
- package/lib/adaptor/geometries/polygon.js +2 -1
- package/lib/adaptor/geometries/polygon.js.map +1 -1
- package/lib/adaptor/geometries/schema.js +2 -1
- package/lib/adaptor/geometries/schema.js.map +1 -1
- package/lib/adaptor/pattern.d.ts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/types/common.d.ts +6 -0
- package/lib/types/common.js.map +1 -1
- package/package.json +2 -1
- package/src/adaptor/geometries/area.ts +2 -1
- package/src/adaptor/geometries/edge.ts +2 -1
- package/src/adaptor/geometries/interval.ts +9 -1
- package/src/adaptor/geometries/line.ts +2 -2
- package/src/adaptor/geometries/point.ts +2 -1
- package/src/adaptor/geometries/polygon.ts +2 -1
- package/src/adaptor/geometries/schema.ts +2 -1
- package/src/index.ts +1 -1
- package/src/types/common.ts +6 -0
- package/CHANGELOG.md +0 -1521
|
@@ -11,7 +11,7 @@ var base_1 = require("./base");
|
|
|
11
11
|
*/
|
|
12
12
|
function point(params) {
|
|
13
13
|
var options = params.options;
|
|
14
|
-
var point = options.point, xField = options.xField, yField = options.yField, seriesField = options.seriesField, sizeField = options.sizeField, shapeField = options.shapeField, tooltip = options.tooltip;
|
|
14
|
+
var point = options.point, xField = options.xField, yField = options.yField, seriesField = options.seriesField, sizeField = options.sizeField, shapeField = options.shapeField, tooltip = options.tooltip, useDeferredLabel = options.useDeferredLabel;
|
|
15
15
|
var _a = tooltip_1.getTooltipMapping(tooltip, [xField, yField, seriesField, sizeField, shapeField]), fields = _a.fields, formatter = _a.formatter;
|
|
16
16
|
return point
|
|
17
17
|
? base_1.geometry(utils_1.deepAssign({}, params, {
|
|
@@ -21,6 +21,7 @@ function point(params) {
|
|
|
21
21
|
shapeField: shapeField,
|
|
22
22
|
tooltipFields: fields,
|
|
23
23
|
mapping: tslib_1.__assign({ tooltip: formatter }, point),
|
|
24
|
+
args: { useDeferredLabel: useDeferredLabel },
|
|
24
25
|
},
|
|
25
26
|
}))
|
|
26
27
|
: params;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"point.js","sourceRoot":"","sources":["../../../src/adaptor/geometries/point.ts"],"names":[],"mappings":";;;;AACA,+CAAwD;AACxD,qCAAyC;AACzC,+BAAmE;AAiBnE;;;GAGG;AACH,SAAgB,KAAK,CAAiC,MAAiB;IAC7D,IAAA,OAAO,GAAK,MAAM,QAAX,CAAY;IACnB,IAAA,KAAK,
|
|
1
|
+
{"version":3,"file":"point.js","sourceRoot":"","sources":["../../../src/adaptor/geometries/point.ts"],"names":[],"mappings":";;;;AACA,+CAAwD;AACxD,qCAAyC;AACzC,+BAAmE;AAiBnE;;;GAGG;AACH,SAAgB,KAAK,CAAiC,MAAiB;IAC7D,IAAA,OAAO,GAAK,MAAM,QAAX,CAAY;IACnB,IAAA,KAAK,GAAoF,OAAO,MAA3F,EAAE,MAAM,GAA4E,OAAO,OAAnF,EAAE,MAAM,GAAoE,OAAO,OAA3E,EAAE,WAAW,GAAuD,OAAO,YAA9D,EAAE,SAAS,GAA4C,OAAO,UAAnD,EAAE,UAAU,GAAgC,OAAO,WAAvC,EAAE,OAAO,GAAuB,OAAO,QAA9B,EAAE,gBAAgB,GAAK,OAAO,iBAAZ,CAAa;IAEnG,IAAA,KAAwB,2BAAiB,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,EAAtG,MAAM,YAAA,EAAE,SAAS,eAAqF,CAAC;IAE/G,OAAO,KAAK;QACV,CAAC,CAAC,eAAQ,CACN,kBAAU,CAAC,EAAE,EAAE,MAAM,EAAE;YACrB,OAAO,EAAE;gBACP,IAAI,EAAE,OAAO;gBACb,UAAU,EAAE,WAAW;gBACvB,UAAU,EAAE,UAAU;gBACtB,aAAa,EAAE,MAAM;gBACrB,OAAO,qBACL,OAAO,EAAE,SAAS,IACf,KAAK,CACT;gBACD,IAAI,EAAE,EAAE,gBAAgB,kBAAA,EAAE;aAC3B;SACF,CAAC,CACH;QACH,CAAC,CAAC,MAAM,CAAC;AACb,CAAC;AAvBD,sBAuBC","sourcesContent":["import { Params } from '../../core/adaptor';\nimport { getTooltipMapping } from '../../utils/tooltip';\nimport { deepAssign } from '../../utils';\nimport { geometry, MappingOptions, GeometryOptions } from './base';\n\nexport interface PointGeometryOptions extends GeometryOptions {\n /** x 轴字段 */\n readonly xField?: string;\n /** y 轴字段 */\n readonly yField?: string;\n /** 分组字段 */\n readonly seriesField?: string;\n /** size 映射字段 */\n readonly sizeField?: string;\n /** shape 的映射字段 */\n readonly shapeField?: string;\n /** point 图形映射规则 */\n readonly point?: MappingOptions;\n}\n\n/**\n * point 辅助点的配置处理\n * @param params\n */\nexport function point<O extends PointGeometryOptions>(params: Params<O>): Params<O> {\n const { options } = params;\n const { point, xField, yField, seriesField, sizeField, shapeField, tooltip, useDeferredLabel } = options;\n\n const { fields, formatter } = getTooltipMapping(tooltip, [xField, yField, seriesField, sizeField, shapeField]);\n\n return point\n ? geometry(\n deepAssign({}, params, {\n options: {\n type: 'point',\n colorField: seriesField,\n shapeField: shapeField,\n tooltipFields: fields,\n mapping: {\n tooltip: formatter,\n ...point,\n },\n args: { useDeferredLabel },\n },\n })\n )\n : params;\n}\n"]}
|
|
@@ -11,7 +11,7 @@ var base_1 = require("./base");
|
|
|
11
11
|
*/
|
|
12
12
|
function polygon(params) {
|
|
13
13
|
var options = params.options;
|
|
14
|
-
var polygon = options.polygon, xField = options.xField, yField = options.yField, seriesField = options.seriesField, tooltip = options.tooltip;
|
|
14
|
+
var polygon = options.polygon, xField = options.xField, yField = options.yField, seriesField = options.seriesField, tooltip = options.tooltip, useDeferredLabel = options.useDeferredLabel;
|
|
15
15
|
var _a = tooltip_1.getTooltipMapping(tooltip, [xField, yField, seriesField]), fields = _a.fields, formatter = _a.formatter;
|
|
16
16
|
return polygon
|
|
17
17
|
? base_1.geometry(utils_1.deepAssign({}, params, {
|
|
@@ -20,6 +20,7 @@ function polygon(params) {
|
|
|
20
20
|
colorField: seriesField,
|
|
21
21
|
tooltipFields: fields,
|
|
22
22
|
mapping: tslib_1.__assign({ tooltip: formatter }, polygon),
|
|
23
|
+
args: { useDeferredLabel: useDeferredLabel },
|
|
23
24
|
},
|
|
24
25
|
}))
|
|
25
26
|
: params;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polygon.js","sourceRoot":"","sources":["../../../src/adaptor/geometries/polygon.ts"],"names":[],"mappings":";;;;AACA,+CAAwD;AACxD,qCAAyC;AACzC,+BAAmE;AAanE;;;GAGG;AACH,SAAgB,OAAO,CAAmC,MAAiB;IACjE,IAAA,OAAO,GAAK,MAAM,QAAX,CAAY;IACnB,IAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"polygon.js","sourceRoot":"","sources":["../../../src/adaptor/geometries/polygon.ts"],"names":[],"mappings":";;;;AACA,+CAAwD;AACxD,qCAAyC;AACzC,+BAAmE;AAanE;;;GAGG;AACH,SAAgB,OAAO,CAAmC,MAAiB;IACjE,IAAA,OAAO,GAAK,MAAM,QAAX,CAAY;IACnB,IAAA,OAAO,GAA6D,OAAO,QAApE,EAAE,MAAM,GAAqD,OAAO,OAA5D,EAAE,MAAM,GAA6C,OAAO,OAApD,EAAE,WAAW,GAAgC,OAAO,YAAvC,EAAE,OAAO,GAAuB,OAAO,QAA9B,EAAE,gBAAgB,GAAK,OAAO,iBAAZ,CAAa;IAE9E,IAAA,KAAwB,2BAAiB,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC,EAA/E,MAAM,YAAA,EAAE,SAAS,eAA8D,CAAC;IAExF,OAAO,OAAO;QACZ,CAAC,CAAC,eAAQ,CACN,kBAAU,CAAC,EAAE,EAAE,MAAM,EAAE;YACrB,OAAO,EAAE;gBACP,IAAI,EAAE,SAAS;gBACf,UAAU,EAAE,WAAW;gBACvB,aAAa,EAAE,MAAM;gBACrB,OAAO,qBACL,OAAO,EAAE,SAAS,IACf,OAAO,CACX;gBACD,IAAI,EAAE,EAAE,gBAAgB,kBAAA,EAAE;aAC3B;SACF,CAAC,CACH;QACH,CAAC,CAAC,MAAM,CAAC;AACb,CAAC;AAtBD,0BAsBC","sourcesContent":["import { Params } from '../../core/adaptor';\nimport { getTooltipMapping } from '../../utils/tooltip';\nimport { deepAssign } from '../../utils';\nimport { geometry, MappingOptions, GeometryOptions } from './base';\n\nexport interface PolygonGeometryOptions extends GeometryOptions {\n /** x 轴字段 */\n readonly xField?: string;\n /** y 轴字段 */\n readonly yField?: string;\n /** 分组字段 */\n readonly seriesField?: string;\n /** point 图形映射规则 */\n readonly polygon?: MappingOptions;\n}\n\n/**\n * polygon 的配置处理\n * @param params\n */\nexport function polygon<O extends PolygonGeometryOptions>(params: Params<O>): Params<O> {\n const { options } = params;\n const { polygon, xField, yField, seriesField, tooltip, useDeferredLabel } = options;\n\n const { fields, formatter } = getTooltipMapping(tooltip, [xField, yField, seriesField]);\n\n return polygon\n ? geometry(\n deepAssign({}, params, {\n options: {\n type: 'polygon',\n colorField: seriesField,\n tooltipFields: fields,\n mapping: {\n tooltip: formatter,\n ...polygon,\n },\n args: { useDeferredLabel },\n },\n })\n )\n : params;\n}\n"]}
|
|
@@ -11,7 +11,7 @@ var base_1 = require("./base");
|
|
|
11
11
|
*/
|
|
12
12
|
function schema(params) {
|
|
13
13
|
var options = params.options;
|
|
14
|
-
var schema = options.schema, xField = options.xField, yField = options.yField, seriesField = options.seriesField, tooltip = options.tooltip;
|
|
14
|
+
var schema = options.schema, xField = options.xField, yField = options.yField, seriesField = options.seriesField, tooltip = options.tooltip, useDeferredLabel = options.useDeferredLabel;
|
|
15
15
|
var _a = tooltip_1.getTooltipMapping(tooltip, [xField, yField, seriesField]), fields = _a.fields, formatter = _a.formatter;
|
|
16
16
|
return schema
|
|
17
17
|
? base_1.geometry(utils_1.deepAssign({}, params, {
|
|
@@ -20,6 +20,7 @@ function schema(params) {
|
|
|
20
20
|
colorField: seriesField,
|
|
21
21
|
tooltipFields: fields,
|
|
22
22
|
mapping: tslib_1.__assign({ tooltip: formatter }, schema),
|
|
23
|
+
args: { useDeferredLabel: useDeferredLabel },
|
|
23
24
|
},
|
|
24
25
|
}))
|
|
25
26
|
: params;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/adaptor/geometries/schema.ts"],"names":[],"mappings":";;;;AACA,+CAAwD;AACxD,qCAAyC;AACzC,+BAAmE;AAanE;;;GAGG;AACH,SAAgB,MAAM,CAAkC,MAAiB;IAC/D,IAAA,OAAO,GAAK,MAAM,QAAX,CAAY;IACnB,IAAA,MAAM,
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/adaptor/geometries/schema.ts"],"names":[],"mappings":";;;;AACA,+CAAwD;AACxD,qCAAyC;AACzC,+BAAmE;AAanE;;;GAGG;AACH,SAAgB,MAAM,CAAkC,MAAiB;IAC/D,IAAA,OAAO,GAAK,MAAM,QAAX,CAAY;IACnB,IAAA,MAAM,GAA6D,OAAO,OAApE,EAAE,MAAM,GAAqD,OAAO,OAA5D,EAAE,MAAM,GAA6C,OAAO,OAApD,EAAE,WAAW,GAAgC,OAAO,YAAvC,EAAE,OAAO,GAAuB,OAAO,QAA9B,EAAE,gBAAgB,GAAK,OAAO,iBAAZ,CAAa;IAE7E,IAAA,KAAwB,2BAAiB,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC,EAA/E,MAAM,YAAA,EAAE,SAAS,eAA8D,CAAC;IAExF,OAAO,MAAM;QACX,CAAC,CAAC,eAAQ,CACN,kBAAU,CAAC,EAAE,EAAE,MAAM,EAAE;YACrB,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE,WAAW;gBACvB,aAAa,EAAE,MAAM;gBACrB,OAAO,qBACL,OAAO,EAAE,SAAS,IACf,MAAM,CACV;gBACD,IAAI,EAAE,EAAE,gBAAgB,kBAAA,EAAE;aAC3B;SACF,CAAC,CACH;QACH,CAAC,CAAC,MAAM,CAAC;AACb,CAAC;AAtBD,wBAsBC","sourcesContent":["import { Params } from '../../core/adaptor';\nimport { getTooltipMapping } from '../../utils/tooltip';\nimport { deepAssign } from '../../utils';\nimport { geometry, MappingOptions, GeometryOptions } from './base';\n\nexport interface SchemaGeometryOptions extends GeometryOptions {\n /** x 轴字段 */\n readonly xField?: string;\n /** y 轴字段 */\n readonly yField?: string;\n /** 分组字段 */\n readonly seriesField?: string;\n /** point 图形映射规则 */\n readonly schema?: MappingOptions;\n}\n\n/**\n * schema 的配置处理\n * @param params\n */\nexport function schema<O extends SchemaGeometryOptions>(params: Params<O>): Params<O> {\n const { options } = params;\n const { schema, xField, yField, seriesField, tooltip, useDeferredLabel } = options;\n\n const { fields, formatter } = getTooltipMapping(tooltip, [xField, yField, seriesField]);\n\n return schema\n ? geometry(\n deepAssign({}, params, {\n options: {\n type: 'schema',\n colorField: seriesField,\n tooltipFields: fields,\n mapping: {\n tooltip: formatter,\n ...schema,\n },\n args: { useDeferredLabel },\n },\n })\n )\n : params;\n}\n"]}
|
package/lib/adaptor/pattern.d.ts
CHANGED
|
@@ -7,4 +7,4 @@ import { Options } from '../types';
|
|
|
7
7
|
* @param key key of style property
|
|
8
8
|
* @returns
|
|
9
9
|
*/
|
|
10
|
-
export declare function pattern(key: string): <O extends Pick<Options, "label" | "legend" | "meta" | "padding" | "animation" | "color" | "height" | "width" | "appendPadding" | "renderer" | "pixelRatio" | "autoFit" | "syncViewPadding" | "supportCSSTransform" | "limitInPlot" | "locale" | "defaultInteractions" | "localRefresh" | "theme" | "pattern" | "xAxis" | "yAxis" | "tooltip" | "slider" | "scrollbar" | "interactions" | "annotations" | "state"> = Pick<Options, "label" | "legend" | "meta" | "padding" | "animation" | "color" | "height" | "width" | "appendPadding" | "renderer" | "pixelRatio" | "autoFit" | "syncViewPadding" | "supportCSSTransform" | "limitInPlot" | "locale" | "defaultInteractions" | "localRefresh" | "theme" | "pattern" | "xAxis" | "yAxis" | "tooltip" | "slider" | "scrollbar" | "interactions" | "annotations" | "state">>(params: Params<O>) => Params<O>;
|
|
10
|
+
export declare function pattern(key: string): <O extends Pick<Options, "label" | "legend" | "meta" | "padding" | "animation" | "color" | "height" | "width" | "appendPadding" | "renderer" | "pixelRatio" | "autoFit" | "syncViewPadding" | "supportCSSTransform" | "limitInPlot" | "locale" | "defaultInteractions" | "localRefresh" | "useDeferredLabel" | "theme" | "pattern" | "xAxis" | "yAxis" | "tooltip" | "slider" | "scrollbar" | "interactions" | "annotations" | "state"> = Pick<Options, "label" | "legend" | "meta" | "padding" | "animation" | "color" | "height" | "width" | "appendPadding" | "renderer" | "pixelRatio" | "autoFit" | "syncViewPadding" | "supportCSSTransform" | "limitInPlot" | "locale" | "defaultInteractions" | "localRefresh" | "useDeferredLabel" | "theme" | "pattern" | "xAxis" | "yAxis" | "tooltip" | "slider" | "scrollbar" | "interactions" | "annotations" | "state">>(params: Params<O>) => Params<O>;
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.adaptors = exports.registerLocale = exports.G2 = exports.version = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
|
-
exports.version = '2.4.
|
|
5
|
+
exports.version = '2.4.16';
|
|
6
6
|
// G2 自定义能力透出
|
|
7
7
|
var G2 = tslib_1.__importStar(require("@antv/g2"));
|
|
8
8
|
exports.G2 = G2;
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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","sourcesContent":["export const version = '2.4.15';\n\n// G2 自定义能力透出\nimport * as G2 from '@antv/g2';\nexport { G2 };\n\n// 国际化处理\nimport { registerLocale } from './core/locale';\nimport { EN_US_LOCALE } from './locales/en_US';\nimport { ZH_CN_LOCALE } from './locales/zh_CN';\n/** default locale register */\nregisterLocale('en-US', EN_US_LOCALE);\nregisterLocale('zh-CN', ZH_CN_LOCALE);\n/** 透出 国际化 工具函数,便于使用 */\nexport { registerLocale };\n\n/** 全局变量 */\nexport { setGlobal } from './core/global';\n\n/** G2Plot 的 Plot 基类 */\nexport { Plot } from './core/plot';\n\n/** Adaptor 及其参数的类型定义 */\nexport type { Adaptor, Params } from './core/adaptor';\n\n// 类型定义导出\nexport * from './types';\n\n// 折线图及类型定义 | author by [hustcc](https://github.com/hustcc)\nexport { Line } from './plots/line';\nexport type { LineOptions } from './plots/line';\n\n// 面积图及类型定义 | author by [hustcc](https://github.com/hustcc)\nexport { Area } from './plots/area';\nexport type { AreaOptions } from './plots/area';\n\n// 柱形图及类型定义 | author by [zqlu](https://github.com/zqlu)\nexport { Column } from './plots/column';\nexport type { ColumnOptions } from './plots/column';\n\n// 条形图及类型定义 | author by [BBSQQ](https://github.com/BBSQQ)\nexport { Bar } from './plots/bar';\nexport type { BarOptions } from './plots/bar';\n\n// 饼图及类型定义 | author by [visiky](https://github.com/visiky)\nexport { Pie } from './plots/pie';\nexport type { PieOptions } from './plots/pie';\n\n// 玫瑰图及类型定义 | author by [zhangzhonghe](https://github.com/zhangzhonghe)\nexport { Rose } from './plots/rose';\nexport type { RoseOptions } from './plots/rose';\n\n// 词云图及类型定义 | author by [zhangzhonghe](https://github.com/zhangzhonghe)\nexport { WordCloud } from './plots/word-cloud';\nexport type { WordCloudOptions } from './plots/word-cloud';\n\n// 散点图及类型定义 | author by [lxfu1](https://github.com/lxfu1)\nexport { Scatter } from './plots/scatter';\nexport type { ScatterOptions } from './plots/scatter';\n\n// 雷达图及类型定义 | author by [visiky](https://github.com/visiky)\nexport { Radar } from './plots/radar';\nexport type { RadarOptions } from './plots/radar';\n\n// 混合图形 | author by [liuzhenying](https://github.com/liuzhenying)\nexport { DualAxes } from './plots/dual-axes';\nexport type { DualAxesOptions } from './plots/dual-axes';\n\n// 迷你折线图及类型定义 | author by [connono](https://github.com/connono)\nexport { TinyLine } from './plots/tiny-line';\nexport type { TinyLineOptions } from './plots/tiny-line';\n\n// 迷你柱形图及类型定义 | author by [connono](https://github.com/connono)\nexport { TinyColumn } from './plots/tiny-column';\nexport type { TinyColumnOptions } from './plots/tiny-column';\n\n// 迷你面积图及类型定义 | author by [connono](https://github.com/connono)\nexport { TinyArea } from './plots/tiny-area';\nexport type { TinyAreaOptions } from './plots/tiny-area';\n\n// 直方图及类型定义 | author by [arcsin1](https://github.com/arcsin1), [visiky](https://github.com/visiky)\nexport { Histogram } from './plots/histogram';\nexport type { HistogramOptions } from './plots/histogram';\n\n// 进度图及类型定义 | author by [connono](https://github.com/connono)\nexport { Progress } from './plots/progress';\nexport type { ProgressOptions } from './plots/progress';\n\n// 环形进度图及类型定义 | author by [connono](https://github.com/connono)\nexport { RingProgress } from './plots/ring-progress';\nexport type { RingProgressOptions } from './plots/ring-progress';\n\n// 热力图及类型定义 | author by [jiazhewang](https://github.com/jiazhewang)\nexport { Heatmap } from './plots/heatmap';\nexport type { HeatmapOptions } from './plots/heatmap';\n\n// 箱线图及类型定义 | author by [BBSQQ](https://github.com/BBSQQ), [visiky](https://github.com/visiky)\nexport { Box } from './plots/box';\nexport type { BoxOptions } from './plots/box';\n\n// 小提琴图及类型定义 | author by [YiSiWang](https://github.com/YiSiWang), [visiky](https://github.com/visiky)\nexport { Violin } from './plots/violin';\nexport type { ViolinOptions } from './plots/violin';\n\n// 韦恩图及类型定义 | author by [visiky](https://github.com/visiky)\nexport { Venn } from './plots/venn';\nexport type { VennOptions } from './plots/venn';\n\n// K线图及类型定义 | author by [jhwong](https://github.com/jinhuiWong), [visiky](https://github.com/visiky)\nexport { Stock } from './plots/stock';\nexport type { StockOptions } from './plots/stock';\n\n// 漏斗图及类型定义\nexport { Funnel, FUNNEL_CONVERSATION_FIELD } from './plots/funnel';\nexport type { FunnelOptions } from './plots/funnel';\n\n// 水波图及类型定义 | author by [CarisL](https://github.com/CarisL), [hustcc](https://github.com/hustcc), [pearmini](https://github.com/pearmini)\nexport { Liquid, addWaterWave } from './plots/liquid';\nexport type { LiquidOptions } from './plots/liquid';\n\n// 子弹图及类型定义 | author by [arcsin1](https://github.com/arcsin1)\nexport { Bullet } from './plots/bullet';\nexport type { BulletOptions } from './plots/bullet';\n\n// 旭日图及类型定义 | author by [lxfu1](https://github.com/lxfu1), [visiky](https://github.com/visiky)\nexport { Sunburst } from './plots/sunburst';\nexport type { SunburstOptions } from './plots/sunburst';\n\n// 仪表盘及类型定义 | author by [hustcc](https://github.com/hustcc)\nexport { Gauge } from './plots/gauge';\nexport type { GaugeOptions } from './plots/gauge';\n\n// 瀑布图 | author by [visiky](https://github.com/visiky)\nexport { Waterfall } from './plots/waterfall';\nexport type { WaterfallOptions } from './plots/waterfall';\n\n// 玉珏图 | author by [yujs](https://github.com/yujs) | updated by [visiky](https://github.com/visiky)\nexport { RadialBar } from './plots/radial-bar';\nexport type { RadialBarOptions } from './plots/radial-bar';\n\n// 对称条形图及类型定义 | author by [arcsin1](https://github.com/arcsin1)\nexport { BidirectionalBar } from './plots/bidirectional-bar';\nexport type { BidirectionalBarOptions } from './plots/bidirectional-bar';\n\n// 矩形树图\nexport { Treemap } from './plots/treemap';\nexport type { TreemapOptions } from './plots/treemap';\n\n// 桑基图及类型定义 | author by [hustcc](https://github.com/hustcc)\nexport { Sankey } from './plots/sankey';\nexport type { SankeyOptions } from './plots/sankey';\n\n// 弦图及类型定义 | author by [MrSmallLiu](https://github.com/MrSmallLiu), [visiky](https://github.com/visiky)\nexport { Chord } from './plots/chord';\nexport type { ChordOptions } from './plots/chord';\n\n// circle-packing 及类型定义 | author by [visiky](https://github.com/visiky), [Angeli](https://github.com/Angelii)\nexport { CirclePacking } from './plots/circle-packing';\nexport type { CirclePackingOptions } from './plots/circle-packing';\n\n// 以下开放自定义图表开发的能力(目前仅仅是孵化中)\n/** 所有开放图表都使用 G2Plot.P 作为入口开发,理论上官方的所有图表都可以走 G2Plot.P 的入口(暂时不处理) */\nexport { P } from './plugin';\n\n/** 开放 getCanvasPatterng 方法 */\nexport { getCanvasPattern } from './utils/pattern';\n\n// 已经废弃,更名为 Mix\nexport { Mix as MultiView } from './plots/mix';\nexport type { MixOptions as MultiViewOptions } from './plots/mix';\n/** 开放多图层图表 (mix) */\nexport { Mix as Mix } from './plots/mix';\nexport type { MixOptions } from './plots/mix';\n\n// 分面图及类型定义 | author by [visiky](https://github.com/visiky)\nexport { Facet } from './plots/facet';\nexport type { FacetOptions } from './plots/facet';\n\n/** 开发 adaptor 可能会用到的方法或一些工具方法,不强制使用 */\nexport { flow, measureTextWidth } from './utils';\n\n/** 各个 geometry 的 adaptor,可以让开发者更快的构造图形 */\nexport { line, interval, area, point, polygon, schema } from './adaptor/geometries';\nexport type {\n LineGeometryOptions,\n IntervalGeometryOptions,\n AreaGeometryOptions,\n PointGeometryOptions,\n PolygonGeometryOptions,\n SchemaGeometryOptions,\n} from './adaptor/geometries';\n/** 开放一些通用的 adaptor 通道方法,实验阶段:不保证稳定性 */\nimport { scale, legend, tooltip, annotation, interaction, theme, animation } from './adaptor/common';\nexport const adaptors = { scale, legend, tooltip, annotation, interaction, theme, animation };\n\n/** 对于没有开发完成的图表,可以暂时先放到 Lab 下面,先做体验,稳定后放到根 export */\nexport { Lab } from './lab';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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","sourcesContent":["export const version = '2.4.16';\n\n// G2 自定义能力透出\nimport * as G2 from '@antv/g2';\nexport { G2 };\n\n// 国际化处理\nimport { registerLocale } from './core/locale';\nimport { EN_US_LOCALE } from './locales/en_US';\nimport { ZH_CN_LOCALE } from './locales/zh_CN';\n/** default locale register */\nregisterLocale('en-US', EN_US_LOCALE);\nregisterLocale('zh-CN', ZH_CN_LOCALE);\n/** 透出 国际化 工具函数,便于使用 */\nexport { registerLocale };\n\n/** 全局变量 */\nexport { setGlobal } from './core/global';\n\n/** G2Plot 的 Plot 基类 */\nexport { Plot } from './core/plot';\n\n/** Adaptor 及其参数的类型定义 */\nexport type { Adaptor, Params } from './core/adaptor';\n\n// 类型定义导出\nexport * from './types';\n\n// 折线图及类型定义 | author by [hustcc](https://github.com/hustcc)\nexport { Line } from './plots/line';\nexport type { LineOptions } from './plots/line';\n\n// 面积图及类型定义 | author by [hustcc](https://github.com/hustcc)\nexport { Area } from './plots/area';\nexport type { AreaOptions } from './plots/area';\n\n// 柱形图及类型定义 | author by [zqlu](https://github.com/zqlu)\nexport { Column } from './plots/column';\nexport type { ColumnOptions } from './plots/column';\n\n// 条形图及类型定义 | author by [BBSQQ](https://github.com/BBSQQ)\nexport { Bar } from './plots/bar';\nexport type { BarOptions } from './plots/bar';\n\n// 饼图及类型定义 | author by [visiky](https://github.com/visiky)\nexport { Pie } from './plots/pie';\nexport type { PieOptions } from './plots/pie';\n\n// 玫瑰图及类型定义 | author by [zhangzhonghe](https://github.com/zhangzhonghe)\nexport { Rose } from './plots/rose';\nexport type { RoseOptions } from './plots/rose';\n\n// 词云图及类型定义 | author by [zhangzhonghe](https://github.com/zhangzhonghe)\nexport { WordCloud } from './plots/word-cloud';\nexport type { WordCloudOptions } from './plots/word-cloud';\n\n// 散点图及类型定义 | author by [lxfu1](https://github.com/lxfu1)\nexport { Scatter } from './plots/scatter';\nexport type { ScatterOptions } from './plots/scatter';\n\n// 雷达图及类型定义 | author by [visiky](https://github.com/visiky)\nexport { Radar } from './plots/radar';\nexport type { RadarOptions } from './plots/radar';\n\n// 混合图形 | author by [liuzhenying](https://github.com/liuzhenying)\nexport { DualAxes } from './plots/dual-axes';\nexport type { DualAxesOptions } from './plots/dual-axes';\n\n// 迷你折线图及类型定义 | author by [connono](https://github.com/connono)\nexport { TinyLine } from './plots/tiny-line';\nexport type { TinyLineOptions } from './plots/tiny-line';\n\n// 迷你柱形图及类型定义 | author by [connono](https://github.com/connono)\nexport { TinyColumn } from './plots/tiny-column';\nexport type { TinyColumnOptions } from './plots/tiny-column';\n\n// 迷你面积图及类型定义 | author by [connono](https://github.com/connono)\nexport { TinyArea } from './plots/tiny-area';\nexport type { TinyAreaOptions } from './plots/tiny-area';\n\n// 直方图及类型定义 | author by [arcsin1](https://github.com/arcsin1), [visiky](https://github.com/visiky)\nexport { Histogram } from './plots/histogram';\nexport type { HistogramOptions } from './plots/histogram';\n\n// 进度图及类型定义 | author by [connono](https://github.com/connono)\nexport { Progress } from './plots/progress';\nexport type { ProgressOptions } from './plots/progress';\n\n// 环形进度图及类型定义 | author by [connono](https://github.com/connono)\nexport { RingProgress } from './plots/ring-progress';\nexport type { RingProgressOptions } from './plots/ring-progress';\n\n// 热力图及类型定义 | author by [jiazhewang](https://github.com/jiazhewang)\nexport { Heatmap } from './plots/heatmap';\nexport type { HeatmapOptions } from './plots/heatmap';\n\n// 箱线图及类型定义 | author by [BBSQQ](https://github.com/BBSQQ), [visiky](https://github.com/visiky)\nexport { Box } from './plots/box';\nexport type { BoxOptions } from './plots/box';\n\n// 小提琴图及类型定义 | author by [YiSiWang](https://github.com/YiSiWang), [visiky](https://github.com/visiky)\nexport { Violin } from './plots/violin';\nexport type { ViolinOptions } from './plots/violin';\n\n// 韦恩图及类型定义 | author by [visiky](https://github.com/visiky)\nexport { Venn } from './plots/venn';\nexport type { VennOptions } from './plots/venn';\n\n// K线图及类型定义 | author by [jhwong](https://github.com/jinhuiWong), [visiky](https://github.com/visiky)\nexport { Stock } from './plots/stock';\nexport type { StockOptions } from './plots/stock';\n\n// 漏斗图及类型定义\nexport { Funnel, FUNNEL_CONVERSATION_FIELD } from './plots/funnel';\nexport type { FunnelOptions } from './plots/funnel';\n\n// 水波图及类型定义 | author by [CarisL](https://github.com/CarisL), [hustcc](https://github.com/hustcc), [pearmini](https://github.com/pearmini)\nexport { Liquid, addWaterWave } from './plots/liquid';\nexport type { LiquidOptions } from './plots/liquid';\n\n// 子弹图及类型定义 | author by [arcsin1](https://github.com/arcsin1)\nexport { Bullet } from './plots/bullet';\nexport type { BulletOptions } from './plots/bullet';\n\n// 旭日图及类型定义 | author by [lxfu1](https://github.com/lxfu1), [visiky](https://github.com/visiky)\nexport { Sunburst } from './plots/sunburst';\nexport type { SunburstOptions } from './plots/sunburst';\n\n// 仪表盘及类型定义 | author by [hustcc](https://github.com/hustcc)\nexport { Gauge } from './plots/gauge';\nexport type { GaugeOptions } from './plots/gauge';\n\n// 瀑布图 | author by [visiky](https://github.com/visiky)\nexport { Waterfall } from './plots/waterfall';\nexport type { WaterfallOptions } from './plots/waterfall';\n\n// 玉珏图 | author by [yujs](https://github.com/yujs) | updated by [visiky](https://github.com/visiky)\nexport { RadialBar } from './plots/radial-bar';\nexport type { RadialBarOptions } from './plots/radial-bar';\n\n// 对称条形图及类型定义 | author by [arcsin1](https://github.com/arcsin1)\nexport { BidirectionalBar } from './plots/bidirectional-bar';\nexport type { BidirectionalBarOptions } from './plots/bidirectional-bar';\n\n// 矩形树图\nexport { Treemap } from './plots/treemap';\nexport type { TreemapOptions } from './plots/treemap';\n\n// 桑基图及类型定义 | author by [hustcc](https://github.com/hustcc)\nexport { Sankey } from './plots/sankey';\nexport type { SankeyOptions } from './plots/sankey';\n\n// 弦图及类型定义 | author by [MrSmallLiu](https://github.com/MrSmallLiu), [visiky](https://github.com/visiky)\nexport { Chord } from './plots/chord';\nexport type { ChordOptions } from './plots/chord';\n\n// circle-packing 及类型定义 | author by [visiky](https://github.com/visiky), [Angeli](https://github.com/Angelii)\nexport { CirclePacking } from './plots/circle-packing';\nexport type { CirclePackingOptions } from './plots/circle-packing';\n\n// 以下开放自定义图表开发的能力(目前仅仅是孵化中)\n/** 所有开放图表都使用 G2Plot.P 作为入口开发,理论上官方的所有图表都可以走 G2Plot.P 的入口(暂时不处理) */\nexport { P } from './plugin';\n\n/** 开放 getCanvasPatterng 方法 */\nexport { getCanvasPattern } from './utils/pattern';\n\n// 已经废弃,更名为 Mix\nexport { Mix as MultiView } from './plots/mix';\nexport type { MixOptions as MultiViewOptions } from './plots/mix';\n/** 开放多图层图表 (mix) */\nexport { Mix as Mix } from './plots/mix';\nexport type { MixOptions } from './plots/mix';\n\n// 分面图及类型定义 | author by [visiky](https://github.com/visiky)\nexport { Facet } from './plots/facet';\nexport type { FacetOptions } from './plots/facet';\n\n/** 开发 adaptor 可能会用到的方法或一些工具方法,不强制使用 */\nexport { flow, measureTextWidth } from './utils';\n\n/** 各个 geometry 的 adaptor,可以让开发者更快的构造图形 */\nexport { line, interval, area, point, polygon, schema } from './adaptor/geometries';\nexport type {\n LineGeometryOptions,\n IntervalGeometryOptions,\n AreaGeometryOptions,\n PointGeometryOptions,\n PolygonGeometryOptions,\n SchemaGeometryOptions,\n} from './adaptor/geometries';\n/** 开放一些通用的 adaptor 通道方法,实验阶段:不保证稳定性 */\nimport { scale, legend, tooltip, annotation, interaction, theme, animation } from './adaptor/common';\nexport const adaptors = { scale, legend, tooltip, annotation, interaction, theme, animation };\n\n/** 对于没有开发完成的图表,可以暂时先放到 Lab 下面,先做体验,稳定后放到根 export */\nexport { Lab } from './lab';\n"]}
|
package/lib/types/common.d.ts
CHANGED
|
@@ -135,6 +135,12 @@ export declare type Options = {
|
|
|
135
135
|
* @default false
|
|
136
136
|
*/
|
|
137
137
|
readonly supportCSSTransform?: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* @title 是否开启 label 延迟渲染
|
|
140
|
+
* @description 开启后 label 渲染会在浏览器空闲时机执行。可制定具体 number 数值,来限定 timeout 时间 (建议开启时,指定 timeout 时间)
|
|
141
|
+
* @default false
|
|
142
|
+
*/
|
|
143
|
+
readonly useDeferredLabel?: boolean | number;
|
|
138
144
|
/**
|
|
139
145
|
* @title 数据
|
|
140
146
|
* @description 设置画布具体的数据
|
package/lib/types/common.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":"","sourcesContent":["import { Types } from '@antv/g2';\nimport { Axis } from './axis';\nimport { Label } from './label';\nimport { Tooltip } from './tooltip';\nimport { Legend } from './legend';\nimport { Interaction } from './interaction';\nimport { Animation } from './animation';\nimport { Annotation } from './annotation';\nimport { State } from './state';\nimport { Slider } from './slider';\nimport { Scrollbar } from './scrollbar';\nimport { ColorAttr, PatternAttr } from './attr';\nimport { Meta } from './meta';\n\n/** annotation position */\nexport type AnnotationPosition = Types.AnnotationPosition;\nexport type RegionPositionBaseOption = Types.RegionPositionBaseOption;\nexport type TextOption = Types.TextOption;\n\n/** 一条数据记录 */\nexport type Datum = Record<string, any>;\n\n/** 一个数据序列 */\nexport type Data = Datum[];\n\n/** 点位置信息 */\nexport type Point = {\n readonly x: number;\n readonly y: number;\n};\n\n/** 描述一个点 x y 位置 */\nexport type Position = [number, number];\n\n/** 一个区域描述 */\nexport type Region = {\n /**\n * @title 开始位置\n * @description the top-left corner of layer-range, range from 0 to 1, relative to parent layer's range\n */\n readonly start: Point;\n /**\n * @title 结束位置\n * @description the bottom-right corner of layer-range, range from 0 to 1, relative to parent layer's range\n */\n readonly end: Point;\n};\n\n/** 位置 */\nexport type BBox = {\n readonly x: number;\n readonly y: number;\n readonly width: number;\n readonly height: number;\n};\n\n/** 文字 */\nexport type TextStyle = {\n /**\n * @title 文本大小\n */\n readonly fontSize?: number;\n /**\n * @title 字体系列\n */\n readonly fontFamily?: string;\n /**\n * @title 文本粗细\n */\n readonly fontWeight?: number;\n /**\n * @title 文本行高\n */\n readonly lineHeight?: number;\n /**\n * @title 文本对齐方式\n */\n readonly textAlign?: 'center' | 'left' | 'right';\n /**\n * @title 文本基线\n */\n readonly textBaseline?: 'middle' | 'top' | 'bottom';\n};\n\nexport type Size = {\n readonly width: number;\n readonly height: number;\n};\n\n/** 基础的 Options 配置 */\nexport type Options = {\n /**\n * @title 画布宽度\n */\n readonly width?: number;\n /**\n * @title 画布高度\n */\n readonly height?: number;\n /**\n * @title 自适应\n * @description 画布是否自动适配容器大小,默认为 true\n */\n readonly autoFit?: boolean;\n /**\n * @title 内填充\n * @description 画布的 padding 值,或者开启 'auto'\n */\n readonly padding?: number[] | number | 'auto';\n /**\n * @title 画布宽度\n * @description 额外怎加的 padding 值\n */\n readonly appendPadding?: number[] | number;\n /**\n * @title 额外填充\n * @description 是否同步子 view 的 padding\n */\n readonly syncViewPadding?: boolean | Types.SyncViewPaddingFn;\n\n /**\n * @title 国际化\n * @description 语言配置\n */\n readonly locale?: string;\n\n /**\n * @title 渲染引擎\n * @description 设置渲染引擎,'svg' | 'canvas'\n * @default \"canvas\"\n */\n readonly renderer?: 'svg' | 'canvas';\n /**\n * @title 屏幕像素比\n * @description 默认为 window.devicePixelRatio\n */\n readonly pixelRatio?: number;\n /**\n * @title 是否启局部渲染\n * @description 是否开启局部渲染,默认为 true\n * @default true\n */\n readonly localRefresh?: boolean;\n /**\n * @title 是否支持 CSS transform\n * @description 开启后图表的交互以及事件将在页面设置了 css transform 属性时生效,默认关闭。\n * @default false\n */\n readonly supportCSSTransform?: boolean;\n\n /**\n * @title 数据\n * @description 设置画布具体的数据\n */\n readonly data: Record<string, any>[];\n /**\n * @title 数据字段元信息\n * @description 设置数据字段元信息\n */\n readonly meta?: Record<string, Meta>;\n\n // G2 相关\n /**\n * @title 主题\n * @description G2 主题,字符串或者 theme object\n * @default \"light\"\n */\n readonly theme?: string | object;\n /**\n * @title 颜色色板\n * @description 设置颜色色板\n */\n readonly color?: ColorAttr;\n /**\n * @title pattern 配置\n * @description 设置图表 pattern\n */\n readonly pattern?: PatternAttr;\n /**\n * @title 横坐标\n * @description 设置画布横坐标的配置项\n */\n readonly xAxis?: Axis;\n /**\n * @title 纵坐标\n * @description 设置画布纵坐标的配置项\n */\n readonly yAxis?: Axis;\n /**\n * @title 数据标签\n * @description 设置数据标签\n */\n readonly label?: Label;\n /**\n * @title tooltip 提示\n * @description 设置画布 tooltip 的配置项\n */\n readonly tooltip?: Tooltip;\n /**\n * @title 图例\n * @description 设置画布图例 legend 的配置项\n */\n readonly legend?: Legend;\n /**\n * @title 缩略轴\n * @description 设置缩略轴 slider 的配置项\n */\n readonly slider?: Slider;\n /**\n * @title 滚动条\n * @description 设置画布缩略轴 scrollbar 的配置项\n */\n readonly scrollbar?: Scrollbar;\n /**\n * @title 动画\n * @description 设置图表动画\n */\n readonly animation?: Animation;\n /**\n * @title 交互\n * @description 设置画布交互行为\n */\n readonly interactions?: Interaction[];\n /**\n * @title 注解\n * @description 设置画布注解\n */\n readonly annotations?: Annotation[];\n /**\n * @title 图表状态\n * @description 设置画布配置 active,inactive,selected 三种状态的样式,也可在 Theme 主题中配置\n */\n readonly state?: State;\n /**\n * @title 是否裁剪\n * @description 是否对超出坐标系范围的 Geometry 进行剪切\n */\n readonly limitInPlot?: boolean;\n /**\n * @title 内置交互\n * @description 内置注册的交互\n * @deprecated false\n */\n readonly defaultInteractions?: string[];\n};\n"]}
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":"","sourcesContent":["import { Types } from '@antv/g2';\nimport { Axis } from './axis';\nimport { Label } from './label';\nimport { Tooltip } from './tooltip';\nimport { Legend } from './legend';\nimport { Interaction } from './interaction';\nimport { Animation } from './animation';\nimport { Annotation } from './annotation';\nimport { State } from './state';\nimport { Slider } from './slider';\nimport { Scrollbar } from './scrollbar';\nimport { ColorAttr, PatternAttr } from './attr';\nimport { Meta } from './meta';\n\n/** annotation position */\nexport type AnnotationPosition = Types.AnnotationPosition;\nexport type RegionPositionBaseOption = Types.RegionPositionBaseOption;\nexport type TextOption = Types.TextOption;\n\n/** 一条数据记录 */\nexport type Datum = Record<string, any>;\n\n/** 一个数据序列 */\nexport type Data = Datum[];\n\n/** 点位置信息 */\nexport type Point = {\n readonly x: number;\n readonly y: number;\n};\n\n/** 描述一个点 x y 位置 */\nexport type Position = [number, number];\n\n/** 一个区域描述 */\nexport type Region = {\n /**\n * @title 开始位置\n * @description the top-left corner of layer-range, range from 0 to 1, relative to parent layer's range\n */\n readonly start: Point;\n /**\n * @title 结束位置\n * @description the bottom-right corner of layer-range, range from 0 to 1, relative to parent layer's range\n */\n readonly end: Point;\n};\n\n/** 位置 */\nexport type BBox = {\n readonly x: number;\n readonly y: number;\n readonly width: number;\n readonly height: number;\n};\n\n/** 文字 */\nexport type TextStyle = {\n /**\n * @title 文本大小\n */\n readonly fontSize?: number;\n /**\n * @title 字体系列\n */\n readonly fontFamily?: string;\n /**\n * @title 文本粗细\n */\n readonly fontWeight?: number;\n /**\n * @title 文本行高\n */\n readonly lineHeight?: number;\n /**\n * @title 文本对齐方式\n */\n readonly textAlign?: 'center' | 'left' | 'right';\n /**\n * @title 文本基线\n */\n readonly textBaseline?: 'middle' | 'top' | 'bottom';\n};\n\nexport type Size = {\n readonly width: number;\n readonly height: number;\n};\n\n/** 基础的 Options 配置 */\nexport type Options = {\n /**\n * @title 画布宽度\n */\n readonly width?: number;\n /**\n * @title 画布高度\n */\n readonly height?: number;\n /**\n * @title 自适应\n * @description 画布是否自动适配容器大小,默认为 true\n */\n readonly autoFit?: boolean;\n /**\n * @title 内填充\n * @description 画布的 padding 值,或者开启 'auto'\n */\n readonly padding?: number[] | number | 'auto';\n /**\n * @title 画布宽度\n * @description 额外怎加的 padding 值\n */\n readonly appendPadding?: number[] | number;\n /**\n * @title 额外填充\n * @description 是否同步子 view 的 padding\n */\n readonly syncViewPadding?: boolean | Types.SyncViewPaddingFn;\n\n /**\n * @title 国际化\n * @description 语言配置\n */\n readonly locale?: string;\n\n /**\n * @title 渲染引擎\n * @description 设置渲染引擎,'svg' | 'canvas'\n * @default \"canvas\"\n */\n readonly renderer?: 'svg' | 'canvas';\n /**\n * @title 屏幕像素比\n * @description 默认为 window.devicePixelRatio\n */\n readonly pixelRatio?: number;\n /**\n * @title 是否启局部渲染\n * @description 是否开启局部渲染,默认为 true\n * @default true\n */\n readonly localRefresh?: boolean;\n /**\n * @title 是否支持 CSS transform\n * @description 开启后图表的交互以及事件将在页面设置了 css transform 属性时生效,默认关闭。\n * @default false\n */\n readonly supportCSSTransform?: boolean;\n /**\n * @title 是否开启 label 延迟渲染\n * @description 开启后 label 渲染会在浏览器空闲时机执行。可制定具体 number 数值,来限定 timeout 时间 (建议开启时,指定 timeout 时间)\n * @default false\n */\n readonly useDeferredLabel?: boolean | number;\n\n /**\n * @title 数据\n * @description 设置画布具体的数据\n */\n readonly data: Record<string, any>[];\n /**\n * @title 数据字段元信息\n * @description 设置数据字段元信息\n */\n readonly meta?: Record<string, Meta>;\n\n // G2 相关\n /**\n * @title 主题\n * @description G2 主题,字符串或者 theme object\n * @default \"light\"\n */\n readonly theme?: string | object;\n /**\n * @title 颜色色板\n * @description 设置颜色色板\n */\n readonly color?: ColorAttr;\n /**\n * @title pattern 配置\n * @description 设置图表 pattern\n */\n readonly pattern?: PatternAttr;\n /**\n * @title 横坐标\n * @description 设置画布横坐标的配置项\n */\n readonly xAxis?: Axis;\n /**\n * @title 纵坐标\n * @description 设置画布纵坐标的配置项\n */\n readonly yAxis?: Axis;\n /**\n * @title 数据标签\n * @description 设置数据标签\n */\n readonly label?: Label;\n /**\n * @title tooltip 提示\n * @description 设置画布 tooltip 的配置项\n */\n readonly tooltip?: Tooltip;\n /**\n * @title 图例\n * @description 设置画布图例 legend 的配置项\n */\n readonly legend?: Legend;\n /**\n * @title 缩略轴\n * @description 设置缩略轴 slider 的配置项\n */\n readonly slider?: Slider;\n /**\n * @title 滚动条\n * @description 设置画布缩略轴 scrollbar 的配置项\n */\n readonly scrollbar?: Scrollbar;\n /**\n * @title 动画\n * @description 设置图表动画\n */\n readonly animation?: Animation;\n /**\n * @title 交互\n * @description 设置画布交互行为\n */\n readonly interactions?: Interaction[];\n /**\n * @title 注解\n * @description 设置画布注解\n */\n readonly annotations?: Annotation[];\n /**\n * @title 图表状态\n * @description 设置画布配置 active,inactive,selected 三种状态的样式,也可在 Theme 主题中配置\n */\n readonly state?: State;\n /**\n * @title 是否裁剪\n * @description 是否对超出坐标系范围的 Geometry 进行剪切\n */\n readonly limitInPlot?: boolean;\n /**\n * @title 内置交互\n * @description 内置注册的交互\n * @deprecated false\n */\n readonly defaultInteractions?: string[];\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/g2plot",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.16",
|
|
4
4
|
"description": "An interactive and responsive charting library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chart",
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"eslint-plugin-import": "^2.22.0",
|
|
88
88
|
"eslint-plugin-prettier": "^3.1.0",
|
|
89
89
|
"gatsby": "^2.24.63",
|
|
90
|
+
"gatsby-plugin-webpack-bundle-analyser-v2": "^1.1.27",
|
|
90
91
|
"generate-changelog": "^1.8.0",
|
|
91
92
|
"gh-pages": "^3.1.0",
|
|
92
93
|
"husky": "^4.2.3",
|
|
@@ -22,7 +22,7 @@ export interface AreaGeometryOptions extends GeometryOptions {
|
|
|
22
22
|
*/
|
|
23
23
|
export function area<O extends AreaGeometryOptions>(params: Params<O>): Params<O> {
|
|
24
24
|
const { options } = params;
|
|
25
|
-
const { area, xField, yField, seriesField, smooth, tooltip } = options;
|
|
25
|
+
const { area, xField, yField, seriesField, smooth, tooltip, useDeferredLabel } = options;
|
|
26
26
|
|
|
27
27
|
const { fields, formatter } = getTooltipMapping(tooltip, [xField, yField, seriesField]);
|
|
28
28
|
|
|
@@ -39,6 +39,7 @@ export function area<O extends AreaGeometryOptions>(params: Params<O>): Params<O
|
|
|
39
39
|
tooltip: formatter,
|
|
40
40
|
...area,
|
|
41
41
|
},
|
|
42
|
+
args: { useDeferredLabel },
|
|
42
43
|
},
|
|
43
44
|
})
|
|
44
45
|
)
|
|
@@ -20,7 +20,7 @@ export interface EdgeGeometryOptions extends GeometryOptions {
|
|
|
20
20
|
*/
|
|
21
21
|
export function edge<O extends EdgeGeometryOptions>(params: Params<O>): Params<O> {
|
|
22
22
|
const { options } = params;
|
|
23
|
-
const { edge, xField, yField, seriesField, tooltip } = options;
|
|
23
|
+
const { edge, xField, yField, seriesField, tooltip, useDeferredLabel } = options;
|
|
24
24
|
|
|
25
25
|
const { fields, formatter } = getTooltipMapping(tooltip, [xField, yField, seriesField]);
|
|
26
26
|
|
|
@@ -35,6 +35,7 @@ export function edge<O extends EdgeGeometryOptions>(params: Params<O>): Params<O
|
|
|
35
35
|
tooltip: formatter,
|
|
36
36
|
...edge,
|
|
37
37
|
},
|
|
38
|
+
args: { useDeferredLabel },
|
|
38
39
|
},
|
|
39
40
|
})
|
|
40
41
|
)
|
|
@@ -97,6 +97,7 @@ export function interval<O extends IntervalGeometryOptions>(params: Params<O>):
|
|
|
97
97
|
columnBackground,
|
|
98
98
|
dodgePadding,
|
|
99
99
|
intervalPadding,
|
|
100
|
+
useDeferredLabel,
|
|
100
101
|
} = options;
|
|
101
102
|
|
|
102
103
|
const { fields, formatter } = getTooltipMapping(tooltip, [xField, yField, seriesField]);
|
|
@@ -113,7 +114,14 @@ export function interval<O extends IntervalGeometryOptions>(params: Params<O>):
|
|
|
113
114
|
tooltip: formatter,
|
|
114
115
|
...interval,
|
|
115
116
|
},
|
|
116
|
-
args: {
|
|
117
|
+
args: {
|
|
118
|
+
dodgePadding,
|
|
119
|
+
intervalPadding,
|
|
120
|
+
minColumnWidth,
|
|
121
|
+
maxColumnWidth,
|
|
122
|
+
background: columnBackground,
|
|
123
|
+
useDeferredLabel,
|
|
124
|
+
},
|
|
117
125
|
},
|
|
118
126
|
})
|
|
119
127
|
)
|
|
@@ -27,7 +27,7 @@ export interface LineGeometryOptions extends GeometryOptions {
|
|
|
27
27
|
*/
|
|
28
28
|
export function line<O extends LineGeometryOptions>(params: Params<O>): Params<O> {
|
|
29
29
|
const { options } = params;
|
|
30
|
-
const { line, stepType, xField, yField, seriesField, smooth, connectNulls, tooltip } = options;
|
|
30
|
+
const { line, stepType, xField, yField, seriesField, smooth, connectNulls, tooltip, useDeferredLabel } = options;
|
|
31
31
|
|
|
32
32
|
const { fields, formatter } = getTooltipMapping(tooltip, [xField, yField, seriesField]);
|
|
33
33
|
|
|
@@ -46,7 +46,7 @@ export function line<O extends LineGeometryOptions>(params: Params<O>): Params<O
|
|
|
46
46
|
},
|
|
47
47
|
line
|
|
48
48
|
),
|
|
49
|
-
args: { connectNulls },
|
|
49
|
+
args: { connectNulls, useDeferredLabel },
|
|
50
50
|
},
|
|
51
51
|
})
|
|
52
52
|
)
|
|
@@ -24,7 +24,7 @@ export interface PointGeometryOptions extends GeometryOptions {
|
|
|
24
24
|
*/
|
|
25
25
|
export function point<O extends PointGeometryOptions>(params: Params<O>): Params<O> {
|
|
26
26
|
const { options } = params;
|
|
27
|
-
const { point, xField, yField, seriesField, sizeField, shapeField, tooltip } = options;
|
|
27
|
+
const { point, xField, yField, seriesField, sizeField, shapeField, tooltip, useDeferredLabel } = options;
|
|
28
28
|
|
|
29
29
|
const { fields, formatter } = getTooltipMapping(tooltip, [xField, yField, seriesField, sizeField, shapeField]);
|
|
30
30
|
|
|
@@ -40,6 +40,7 @@ export function point<O extends PointGeometryOptions>(params: Params<O>): Params
|
|
|
40
40
|
tooltip: formatter,
|
|
41
41
|
...point,
|
|
42
42
|
},
|
|
43
|
+
args: { useDeferredLabel },
|
|
43
44
|
},
|
|
44
45
|
})
|
|
45
46
|
)
|
|
@@ -20,7 +20,7 @@ export interface PolygonGeometryOptions extends GeometryOptions {
|
|
|
20
20
|
*/
|
|
21
21
|
export function polygon<O extends PolygonGeometryOptions>(params: Params<O>): Params<O> {
|
|
22
22
|
const { options } = params;
|
|
23
|
-
const { polygon, xField, yField, seriesField, tooltip } = options;
|
|
23
|
+
const { polygon, xField, yField, seriesField, tooltip, useDeferredLabel } = options;
|
|
24
24
|
|
|
25
25
|
const { fields, formatter } = getTooltipMapping(tooltip, [xField, yField, seriesField]);
|
|
26
26
|
|
|
@@ -35,6 +35,7 @@ export function polygon<O extends PolygonGeometryOptions>(params: Params<O>): Pa
|
|
|
35
35
|
tooltip: formatter,
|
|
36
36
|
...polygon,
|
|
37
37
|
},
|
|
38
|
+
args: { useDeferredLabel },
|
|
38
39
|
},
|
|
39
40
|
})
|
|
40
41
|
)
|
|
@@ -20,7 +20,7 @@ export interface SchemaGeometryOptions extends GeometryOptions {
|
|
|
20
20
|
*/
|
|
21
21
|
export function schema<O extends SchemaGeometryOptions>(params: Params<O>): Params<O> {
|
|
22
22
|
const { options } = params;
|
|
23
|
-
const { schema, xField, yField, seriesField, tooltip } = options;
|
|
23
|
+
const { schema, xField, yField, seriesField, tooltip, useDeferredLabel } = options;
|
|
24
24
|
|
|
25
25
|
const { fields, formatter } = getTooltipMapping(tooltip, [xField, yField, seriesField]);
|
|
26
26
|
|
|
@@ -35,6 +35,7 @@ export function schema<O extends SchemaGeometryOptions>(params: Params<O>): Para
|
|
|
35
35
|
tooltip: formatter,
|
|
36
36
|
...schema,
|
|
37
37
|
},
|
|
38
|
+
args: { useDeferredLabel },
|
|
38
39
|
},
|
|
39
40
|
})
|
|
40
41
|
)
|
package/src/index.ts
CHANGED
package/src/types/common.ts
CHANGED
|
@@ -147,6 +147,12 @@ export type Options = {
|
|
|
147
147
|
* @default false
|
|
148
148
|
*/
|
|
149
149
|
readonly supportCSSTransform?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* @title 是否开启 label 延迟渲染
|
|
152
|
+
* @description 开启后 label 渲染会在浏览器空闲时机执行。可制定具体 number 数值,来限定 timeout 时间 (建议开启时,指定 timeout 时间)
|
|
153
|
+
* @default false
|
|
154
|
+
*/
|
|
155
|
+
readonly useDeferredLabel?: boolean | number;
|
|
150
156
|
|
|
151
157
|
/**
|
|
152
158
|
* @title 数据
|