How to use the @antv/my-f2/lib/core.Chart 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 antvis / mini-program-f2-demos / pages / charts / line / index.js View on Github external
{ date: "2017-07-11", value: 92 },
    { date: "2017-07-12", value: 113 },
    { date: "2017-07-13", value: 107 },
    { date: "2017-07-14", value: 131 },
    { date: "2017-07-15", value: 111 },
    { date: "2017-07-16", value: 64 },
    { date: "2017-07-17", value: 69 },
    { date: "2017-07-18", value: 88 },
    { date: "2017-07-19", value: 77 },
    { date: "2017-07-20", value: 83 },
    { date: "2017-07-21", value: 111 },
    { date: "2017-07-22", value: 57 },
    { date: "2017-07-23", value: 55 },
    { date: "2017-07-24", value: 60 }
  ];
  chart = new F2.Chart({
    el: canvas,
    width,
    height,
    plugins: Tooltip
  });

  chart.source(data, {
    value: {
      tickCount: 5,
      min: 0
    },
    date: {
      type: 'timeCat',
      range: [ 0, 1 ],
      tickCount: 3
    }