How to use the @antv/my-f2.Shape 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 / gauge / index.js View on Github external
function drawChart(canvas, width, height) {
  const Shape = F2.Shape;
  const data = [
    { pointer: '当前收益', value: 5, length: 2, y: 1.05 }
  ];
  //自定义绘制数据的的形状
  Shape.registerShape('point', 'dashBoard', {
    getPoints: function (cfg) {
      const x = cfg.x;
      const y = cfg.y;

      return [
        { x: x, y: y },
        { x: x, y: 0.4 }
      ];
    },
    draw: function (cfg, container) {
      let point1 = cfg.points[0];
github antvis / mini-program-f2-demos / my-charts / pages / charts / gauge / index.js View on Github external
function drawChart(canvas, width, height) {
  const Shape = F2.Shape;
  const data = [
    { pointer: '当前收益', value: 5, length: 2, y: 1.05 }
  ];
  //自定义绘制数据的的形状
  Shape.registerShape('point', 'dashBoard', {
    getPoints: function (cfg) {
      const x = cfg.x;
      const y = cfg.y;

      return [
        { x: x, y: y },
        { x: x, y: 0.4 }
      ];
    },
    draw: function (cfg, container) {
      let point1 = cfg.points[0];