Skip to content

slice

Slice data to get a subset. Similar to Array.prototype.slice.

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: 'slice',
        start: 1,
      },
    ],
  },
});

After the above example is processed, the data becomes:

[{ a: 4, b: 5, c: 6 }];

Options

Property Description Type Default
start Start index for slicing number 0
end End index for slicing number arr.length - 1
© Copyright 2026 Ant Group Co., Ltd..备案号:京ICP备15032932号-38
Site search
Documentation and examplesType to start searching

Search documentation, APIs, and examples

↑↓Select↵OpenEscClose