소스 검색

refactor: validate y

pull/347/head
Shivam Mishra 4 년 전
부모
커밋
690a7f4467
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. +2
    -0
      src/js/utils/draw.js

+ 2
- 0
src/js/utils/draw.js 파일 보기

@@ -433,6 +433,8 @@ export function xLine(x, label, height, options = {}) {
}

export function yMarker(y, label, width, options = {}) {
if (!isValidNumber(y)) y = 0;

if (!options.labelPos) options.labelPos = 'right';
let x = options.labelPos === 'left' ? LABEL_MARGIN
: width - getStringWidth(label, 5) - LABEL_MARGIN;


불러오는 중...
취소
저장