Skip to content
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

Add label options to the Mapping dialog #8305

Merged
merged 8 commits into from May 18, 2023

Conversation

MeSophie
Copy link
Contributor

@MeSophie MeSophie commented May 3, 2023

Fixes partially #7695

@rdstern I corrected the error on label maping Dialog.

For the Label and Legend option can we add a check box Add Legend and Add Label? And please more information about the filter part will be very helpful. Thank you.

@rdstern
Copy link
Collaborator

rdstern commented May 6, 2023

@MeSophie I can now edit the labels, as you say.
But - oddly I can't change their size (or I think colour either).
Here is geom_label_repel
image

I think size and colour are geom parameters, but they seem not to be included in the list here. I will check, but I wonder also if we need all that are there, because the list is already long. OIf not, then perhaps include size and colour instead of max_time and max_iter which I think we are unlikely to need often.

If you make this change, can you do the same for geom_text_repel at the same time. In the dialogue I would like to be able to choose between the two.

Then I tried explaining the filter options in detail and it is going to become complicated to implement. So leave that for now.

So just add the option for now to use geom_text_repel or label_repel.

image

I suggest a box under the data selector shown above. It could be called Label Options: Inside, perhaps 3 options
a) Checkbox labelled Rectangle, defualt checked. (If checked, the geom-label repel, otherwise geom +text)repel.
b) Size, to be able to change the size of the labels, if works well. Up-dowen control as in the sub-dialogue.
c) Checkbox with label All Default unchecked. If checked then I think it is the Max Overlaps you can have as Inf and it then shows all of them? (Please check if I have this right.)

@MeSophie
Copy link
Contributor Author

@rdstern I'm done with improvements. Please can you check.
max.overlaps = Inf is working well I try it with this code in r.

- Without max.overlaps = Inf

image

- With max.overlaps = Inf

image

Copy link
Collaborator

@rdstern rdstern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MeSophie this is exciting. And looking great.
a) Change the Label Rectangle to Text and have it unchecked by default. It also doesn't remember the setting, so make it do that.
b) Have a checkbox, default unchecked for the Size option - as it is in the sub-dialogue. When checked make the default 5, (as for the nlabel and text geoms, in both the dialogue and the sub-dialogue.)
c) The Label All doesn't remember the previous setting. Make it do this.
d) The R-text calls the geom_label_repel twice. I think that may be resulting in the text option not working (ot always gives a label). And the size doesn't seem to work, from the main dialogue. It does work from the sub-dialogue.
e) Could you move the box up so it starts just below the data selector. That will give space for a 4th checkbox, with a copy of the Colour option from the sub-dialogue!

Copy link
Collaborator

@rdstern rdstern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MeSophie This is looking excellent now.
There are just some option settings to tweal a bit and then you are through!
a) The default is correctly with the Text unchecked, and therefore it should be a label - so with the box round the names. Currently the default (when it is unchecked) is now Text. I would like the user to have to check to get the text.
b) Then sometimes the Colour and size reset to their default of Black and 5. And sometimes they remember the previous setting. I think they may remember for text and not for label, but I am not sure?

@MeSophie
Copy link
Contributor Author

@rdstern Please can you check the new changes? Thank you.

@rdstern rdstern changed the title Correct the label error on Mapping Dialog. Add label options to the mapping dialog. May 17, 2023
Copy link
Collaborator

@rdstern rdstern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MeSophie very nice now. Many thanks. I hope @lloyddewit will like the code.

@lloyddewit lloyddewit changed the title Add label options to the mapping dialog. Add label options to the Mapping dialog May 18, 2023
@lloyddewit lloyddewit merged commit 162ca6b into IDEMSInternational:master May 18, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants