自定义提示

源码
import { Chart } from '@antv/g2';

const chart = new Chart({
  container: 'container',
  inset: 6,
});

chart.options({
  type: 'boxplot',
  data: {
    type: 'fetch',
    value: 'https://assets.antv.antgroup.com/g2/morley.json',
  },
  encode: { x: 'Expt', y: 'Speed' },
  tooltip: {
    items: [
      { name: 'min', channel: 'y' },
      { name: 'q1', channel: 'y1' },
      { name: 'q2', channel: 'y2' },
      { name: 'q3', channel: 'y3' },
      { name: 'max', color: 'red', channel: 'y4' },
    ],
  },
});

chart.render();
全站搜索
文档与示例输入关键词开始搜索

输入关键词,查找文档、API 与示例

选择打开Esc关闭