1.0.0 • Published 4 years ago

@ali-i18n-fe/intl-comp-g2-chart-instance v1.0.0

Weekly downloads
4
License
-
Repository
-
Last release
4 years ago

G2ChartInstance

Usage

  1. add chartType in props
  2. add options in props
  3. move options.data to props.data

Formatter

推荐 1. 使用 JSFunction

{
  "type": "JSFunction",
  "value": "function (val, record, index){return val}"
}

会被注入 numeral: "value": "function (val, record, index){return numeral(val).add(0.2).value()}"

不推荐 2. 使用 JSExpression

{
  "type": "JSExpression",
  "value": "`${val}个`"
}
formatter 可用参数
pathparams
label.formatterval, record, index, numeral
yAxis.label.formatterval, record, index, numeral
yAxis.leftConfig.label.formatterval, record, index, numeral
yAxis.rightConfig.label.formatterval, record, index, numeral
meta.*.formatterval, numeral
tooltip.formatterx, y, type, numeral
legend.text.formattertext, cfg, numeral

!DOCS_ALL-自动生成,请勿修改

Development

install

yarn

start project

yarn start

build npm package

yarn babel

build umd package

yarn build