Skip to content

rename

Rename some fields in the data.

Getting Started

const data = [
  { a: 1, b: 2, c: 3 },
  { a: 4, b: 5, c: 6 },
];

chart.options({
  type: 'view',
  data: {
    type: 'inline',
    value: data,
    transform: [
      {
        type: 'rename',
        a: 'x',
        b: 'y',
      },
    ],
  },
});

After the above example is processed, the data becomes:

[
  { x: 1, y: 2, c: 3 },
  { x: 4, y: 5, c: 6 },
];

Options

Property Description Type Default
[key] Rename the field [key] in the data to the specified name string
© Copyright 2026 Ant Group Co., Ltd..备案号:京ICP备15032932号-38
Site search
Documentation and examplesType to start searching

Search documentation, APIs, and examples

↑↓Select↵OpenEscClose