feat: allow setting lineType for yMarker
This commit is contained in:
parent
067f5ea7f8
commit
d8984ec5ae
@ -187,7 +187,7 @@ let componentConfigs = {
|
||||
makeElements(data) {
|
||||
return data.map(m =>
|
||||
yMarker(m.position, m.label, this.constants.width,
|
||||
{ labelPos: m.options.labelPos, stroke: m.options.stroke, mode: 'span', lineType: 'dashed' })
|
||||
{ labelPos: m.options.labelPos, stroke: m.options.stroke, mode: 'span', lineType: m.options.lineType })
|
||||
);
|
||||
},
|
||||
animateElements(newData) {
|
||||
|
||||
@ -433,6 +433,7 @@ export function yMarker(y, label, width, options = {}) {
|
||||
if (!isValidNumber(y)) y = 0;
|
||||
|
||||
if (!options.labelPos) options.labelPos = 'right';
|
||||
if (!options.lineType) options.lineType = 'dashed';
|
||||
let x = options.labelPos === 'left' ? LABEL_MARGIN
|
||||
: width - getStringWidth(label, 5) - LABEL_MARGIN;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user