Closed ucffool closed 6 years ago
yMarkers: [ { label: "Average", value: 20, type: 'dashed', pos: 'left' } ]
no effect
It looks like inside draw.js the x position is determined by x: width - getStringWidth(label, 5) - LABEL_MARGIN. I'm possibly not looking at the right place, but it seems this is fixing it to right alignment no matter what.
x: width - getStringWidth(label, 5) - LABEL_MARGIN
As a side note, ChartCompenents.js there is this:
yMarker(marker.position, marker.label, this.constants.width, {pos:'right', mode: 'span', lineType: 'dashed'})
Which is what led me to believe there was a way to change the position by passing a value.
Frappé Charts version: 1.0.0
You can as of v1.1.0 add a options: { labelPos: 'left' } to a yMarker property:
options: { labelPos: 'left' }
yMarkers: [{ label: "Marker", value: 70, options: { labelPos: 'left' }}]
Cheers!
Expected Behaviour
Actual Behaviour
no effect
Code Effect
It looks like inside draw.js the x position is determined by
x: width - getStringWidth(label, 5) - LABEL_MARGIN
. I'm possibly not looking at the right place, but it seems this is fixing it to right alignment no matter what.As a side note, ChartCompenents.js there is this:
Which is what led me to believe there was a way to change the position by passing a value.
Frappé Charts version: 1.0.0