How to use the bizcharts.PathUtil.pathToAbsolute function in bizcharts

To help you get started, we’ve selected a few bizcharts 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 alibaba / ice / react-materials / blocks / CustomBarChart / src / CustomBarChart.jsx View on Github external
Util.each(points, (point) => {
          if (
            !prePoint ||
            !(prePoint.x === point.x && prePoint.y === point.y)
          ) {
            data.push(point.x);
            data.push(point.y);
            prePoint = point;
          }
        });

        const spline = PathUtil.catmullRomToBezier(data, false, constaint);
        let path =
          'M' + first.x + ' ' + first.y + PathUtil.parsePathArray(spline);
        path = PathUtil.pathToAbsolute(path);
        path = this.parsePath(path, false);

        return container.addShape('path', {
          attrs: {
            fill: cfg.color || '#00D9DF',
            path: path,
          },
        });
      },
    });