Closed julien4215 closed 7 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 87.51%. Comparing base (
5a01893
) to head (d1041ff
). Report is 1 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
With alignment: Alignment.topLeft and direction: LabelDirection.vertical
, it draws outside of the chart
But with alignment: Alignment.topRight and direction: LabelDirection.vertical
it draws inside of the chart.
So I think we should draw it inside in either ways.
One question, does it make sense to have angle
instead of limited direction values? With angle, I think we are free to do anything. But I agree that it is more difficult and challenging to implement.
Please write some unit-tests
One question, does it make sense to have
angle
instead of limited direction values? With angle, I think we are free to do anything. But I agree that it is more difficult and challenging to implement.
It makes sense to have an angle parameter as the label could be displayed in each direction, however it would require a lot of effort for really rare use cases.
One question, does it make sense to have
angle
instead of limited direction values? With angle, I think we are free to do anything. But I agree that it is more difficult and challenging to implement.It makes sense to have an angle parameter as the label could be displayed in each direction, however it would require a lot of effort for really rare use cases.
You're right. Okay so let's stick to the current implementation and write some unit-tests please
Why are Mockito generated files not ignored ? Should I commit them ?
Please write some unit-tests
Done
With
alignment: Alignment.topLeft and direction: LabelDirection.vertical
, it draws outside of the chartBut with
alignment: Alignment.topRight and direction: LabelDirection.vertical
it draws inside of the chart. So I think we should draw it inside in either ways.
This behavior is the same for VerticalLineLabel
with direction: LabelDirection.horizontal
so it makes sense for me to keep the same logic.
With alignment: Alignment.bottomLeft
and direction: LabelDirection.horizontal`, it draws outside of the chart
With alignment: Alignment.topLeft
and direction: LabelDirection.horizontal`, it draws inside of the chart
With
alignment: Alignment.topLeft and direction: LabelDirection.vertical
, it draws outside of the chart But withalignment: Alignment.topRight and direction: LabelDirection.vertical
it draws inside of the chart. So I think we should draw it inside in either ways.This behavior is the same for
VerticalLineLabel
withdirection: LabelDirection.horizontal
so it makes sense for me to keep the same logic.With
alignment: Alignment.bottomLeft
and direction: LabelDirection.horizontal`, it draws outside of the chartWith
alignment: Alignment.topLeft
and direction: LabelDirection.horizontal`, it draws inside of the chart
I think the vertical one is a bug too. I mean we need to fix both of them. It would be nice if you can fix them here, otherwise I will do this in a separate PR. What do you think?
I think the vertical one is a bug too. I mean we need to fix both of them. It would be nice if you can fix them here, otherwise I will do this in a separate PR. What do you think ?
I agree that it would be better like this. I'll add a commit to this PR for both of them.
I agree that it would be better like this. I'll add a commit to this PR for both of them.
That would be wonderful
I agree that it would be better like this. I'll add a commit to this PR for both of them.
Done, it should be ready now.
It's ready to be merged after those minor changes. Thanks in advance!
Closes #1574.
The goal of this PR is give the option to display the text of the label vertically for the
VerticalLineLabel
andHorizontalLineLabel
(see the screenshot in the issue #1574).