Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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];
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];