New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable line annotation using two scales #305
Conversation
This comment has been minimized.
This comment has been minimized.
@kurkle thank you very much! |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I have already done :D. See my previous note in the review close to the code. |
Pr #282 solved this issue recalculating the label position in order to stay inside the chart area. I know that it's not so simple (that's why I added chart reference into element in that PR). Removing the cliparea could be configurable in order to address the issue #258 as well, something like that: label: {
clipEnabled: false, // <-- defaults to true
position: 'start',
rotation: -45,
backgroundColor: 'red',
content: 'This is a long test label',
enabled: true
}, In this way you can delegate the user to have enough space for the label. To change the scales limits (as is done now for the values) could be a solution but this could change the chart going to a picture that probably you don't like with additional space in chart area that you want to avoid. |
Other feedback (not so important). All samples are still using the previous |
Found only one sample using that. And it turs out it does not work correctly with this PR: |
@kurkle It seems that |
Not sure if it could be correct but the return could be return w > h ? x : y; if width of line if greater than height means that the line is horizontal |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't notice anything wrong. is the change to start
, center
, end
considered breaking?
@etimberg in my opinion, yes. You don't have errors because if the position is not start or end it will use center, without any issue. |
@etimberg thats the reason I labeled this breaking. |
@kurkle apologize for delay of my feedback but I had other stuff to do it. |
Changes:
position
: 'start', 'end' or 'center'line
annotationt
forpointInLine