Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/**
* @fileOverview the radius axis of polar coordinate and axis of cartesian coordinate
* @author sima.zhang
*/
const Base = require('./base');
const Util = require('../../util');
const { MatrixUtil } = require('@antv/g');
const vec2 = MatrixUtil.vec2;
class Line extends Base {
getDefaultCfg() {
const cfg = super.getDefaultCfg();
return Util.mix({}, cfg, {
x: null, // @type {Number} 距离初始位置的x轴偏移量,仅对于左侧、右侧的纵向坐标有效
y: null, // @type {Number} 距离初始位置的y轴偏移量,仅对顶部、底部的横向坐标轴有效
line: { // @type {Attrs} 坐标轴线的图形属性,如果设置成null,则不显示轴线
lineWidth: 1,
stroke: '#C0D0E0'
},
tickLine: { // @type {Attrs} 标注坐标线的图形属性
lineWidth: 1,
stroke: '#C0D0E0',
length: 5
},
/**
* @fileOverview the helix axis of helix coordinate
* @author sima.zhang
*/
const Util = require('../../util');
const Base = require('./base');
const { MatrixUtil, PathUtil } = require('@antv/g');
const vec2 = MatrixUtil.vec2;
class Helix extends Base {
getDefaultCfg() {
const cfg = super.getDefaultCfg();
return Util.mix({}, cfg, {
type: 'helix',
line: { // @type {Attrs} 坐标轴线的图形属性,如果设置成null,则不显示轴线
lineWidth: 1,
stroke: '#C0D0E0'
},
tickLine: { // @type {Attrs} 标注坐标线的图形属性
lineWidth: 1,
stroke: '#C0D0E0',
length: 5
},
/**
* @fileOverview the axis of map coodinate
* @author sima.zhang
*/
const Util = require('../../util');
const Base = require('./base');
const { MatrixUtil, PathUtil } = require('@antv/g');
const vec2 = MatrixUtil.vec2;
class Polyline extends Base {
getDefaultCfg() {
const cfg = super.getDefaultCfg();
return Util.mix({}, cfg, {
type: 'polyline'
});
}
getLinePath() {
const self = this;
const tickPoints = self.get('tickPoints');
const start = self.get('start');
const end = self.get('end');
const points = [];
/**
* @fileOverview the class of Helix Coordinate
* @author sima.zhang
*/
const Util = require('../util');
const Base = require('./base');
const MatrixUtil = require('@antv/g').MatrixUtil;
const vec2 = MatrixUtil.vec2;
class Helix extends Base {
getDefaultCfg() {
const cfg = super.getDefaultCfg();
return Util.mix({}, cfg, {
startAngle: 1.25 * Math.PI,
endAngle: 7.25 * Math.PI,
innerRadius: 0,
type: 'helix',
isHelix: true
});
}
constructor(cfg) {
super(cfg);