Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React from 'react'
import { Row, Col, Table, Alert, Icon } from 'antd';
import GM from 'g2-mobile';
GM.Global.pixelRatio = 2;
const Util = GM.Util;
import PanelBox from '../../components/PanelBox';
import createGM from '../../utils/gm';
import { chartData, pieData, barData } from '../../../fake/chart2.js';
import './index.less'
var Shape = GM.Shape;
var G = GM.G;
//自定义绘制数据的的形状
Shape.registShape('point', 'dashBoard', {
getShapePoints:function(cfg){
var x = cfg.x;
var y = cfg.y;
return [
{x: x, y: y},
{x: x, y: 0.5}
]
},
drawShape: function(cfg, canvas){
var point1 = cfg.points[0];
var point2 = cfg.points[1];
point1 = this.parsePoint(point1);
point2 = this.parsePoint(point2);
G.drawLines([point1, point2], canvas, {