diff --git a/package.json b/package.json index 23f89c46..10e51b68 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bizcharts", - "version": "4.1.12-beta.1", + "version": "4.1.12", "description": "bizcharts", "keywords": [ "bizcharts", diff --git a/src/core.ts b/src/core.ts index 1239fe09..67bf6a7a 100644 --- a/src/core.ts +++ b/src/core.ts @@ -4,7 +4,7 @@ import * as SVGEngine from '@antv/g-svg/lib'; import { registerEngine } from '@antv/g2/lib/core'; // 导出自定义比例尺的能力 export { registerScale, getScale, registerTickMethod } from '@antv/scale'; - +export { setGlobal, GLOBAL } from '@antv/g2Plot/lib/core/global'; import './extend/scale/scale'; // 动画 @@ -17,7 +17,7 @@ registerEngine('svg', SVGEngine); // @ts-ignore export * from '@antv/g2/lib/core'; -export const VERSION = '4.1.12-beta.1'; +export const VERSION = '4.1.12'; diff --git a/src/createPlot.tsx b/src/createPlot.tsx index 2a37e727..d642767a 100644 --- a/src/createPlot.tsx +++ b/src/createPlot.tsx @@ -23,6 +23,14 @@ import { import { debounce, isArray, isFunction, isNil } from '@antv/util'; import warn from 'warning'; +// 国际化处理 +import { registerLocale } from '@antv/g2Plot/lib/core/locale'; +import { EN_US_LOCALE } from '@antv/g2Plot/lib/locales/en_US'; +import { ZH_CN_LOCALE } from '@antv/g2Plot/lib/locales/zh_CN'; +/** default locale register */ +registerLocale('en-US', EN_US_LOCALE); +registerLocale('zh-CN', ZH_CN_LOCALE); + const DEFAULT_PLACEHOLDER = (