|
|
@@ -324,7 +324,13 @@ function makeVertLine(x, label, y1, y2, options = {}) { |
|
|
|
|
|
|
|
function makeHoriLine(y, label, x1, x2, options = {}) { |
|
|
|
if (!options.lineType) options.lineType = ''; |
|
|
|
if (options.shortenNumbers) label = shortenLargeNumber(label); |
|
|
|
if (options.shortenNumbers) { |
|
|
|
if (options.numberFormatter) { |
|
|
|
label = options.numberFormatter(label); |
|
|
|
} else { |
|
|
|
label = shortenLargeNumber(label); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
let className = 'line-horizontal ' + options.className + |
|
|
|
(options.lineType === "dashed" ? "dashed" : ""); |
|
|
@@ -391,7 +397,8 @@ export function yLine(y, label, width, options = {}) { |
|
|
|
return makeHoriLine(y, label, x1, x2, { |
|
|
|
className: options.className, |
|
|
|
lineType: options.lineType, |
|
|
|
shortenNumbers: options.shortenNumbers |
|
|
|
shortenNumbers: options.shortenNumbers, |
|
|
|
numberFormatter: options.numberFormatter, |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|