How to use the @antv/my-f2.Util function in @antv/my-f2

To help you get started, we’ve selected a few @antv/my-f2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ant-mini-program / mini-chart / components / bubble / index.js View on Github external
// 开始配置坐标轴
  chart.axis('key', {
    label: function label(text) {
      return {
        text: text + ' ' + series[0].xExtAlias, // 格式化坐标轴显示文本
      };
    },
    grid: grid ? {
      stroke: '#d9d9d9',
      lineWidth: 1,
      lineDash: [2, 2],
    } : null
  });
  chart.axis('value', {
    line: F2.Util.mix({}, F2.Global._defaultAxis.line, {
      top: false
    }),
    label: function label(text) {
      if (text > 0) {
        return {
          text: text + ' ' + series[0].yExtAlias,
        };
      }
    }
  });

  //配置坐标轴的伸长比
  if (xAxis) {
    if(xAxis.htAlign) {
      xAxis.label = util.label;
    }