echarts icon indicating copy to clipboard operation
echarts copied to clipboard

Feat/box plot labels

Open konrad-amtenbrink opened this issue 3 years ago • 9 comments

Brief Information

Box plot labels for all displayed values.

This pull request is in the type of:

  • [ ] bug fixing
  • [x] new feature
  • [ ] others

What does this PR do?

This PR implements labels for all visible/plotted values of the box plot (this also includes the whiskers).

Details

The box plot now utilises the basics of the label option (i.e. show, offset and formatter) to display labels for the values of each box of the box plot.

As the multiple labels are not supported for single series items - the setBoxLabels method was added to the BoxView. In order to custom calculate the positions and add the labels to the plot.

Document Info

One of the following should be checked.

  • [x] This PR doesn't relate to document changes
  • [ ] The document should be updated later
  • [ ] The document changes have been made in apache/echarts-doc#xxx

Example

Screenshot 2022-09-07 at 14 45 27

konrad-amtenbrink avatar Aug 26 '22 12:08 konrad-amtenbrink

Thanks for your contribution! The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

echarts-bot[bot] avatar Aug 26 '22 12:08 echarts-bot[bot]

I am happy to move the setBoxLabel logic to a different file or even abstract it further - I was just not sure where it would be best suitable.

konrad-amtenbrink avatar Aug 26 '22 13:08 konrad-amtenbrink

Can you provide an image to illustrate what this PR is about?

Ovilia avatar Sep 02 '22 07:09 Ovilia

@Ovilia Sure - I added it to the description.

konrad-amtenbrink avatar Sep 02 '22 07:09 konrad-amtenbrink

@Ovilia What do you mean by alignment of the labels? Also fixed the linting and added the test.

konrad-amtenbrink avatar Sep 07 '22 11:09 konrad-amtenbrink

There are five labels (numbers) for each boxplot item, three of which is on the left side and two right. But some developers may have different requirement like only displaying the middle value or display all values on the left. How can that be done?

Ovilia avatar Sep 08 '22 03:09 Ovilia

@Ovilia I would vote to not add an option to display for example all labels on one side because they most likely will overlap and I do not see a use case for that (if there is someone with that specific use case - we can always open up a follow-up) - I can however add an option to specify which labels should be displayed

konrad-amtenbrink avatar Sep 08 '22 08:09 konrad-amtenbrink

@Ovilia the user now has the option to set label.show to either all, iqr, median or whiskers to change what labels are displayed.

konrad-amtenbrink avatar Sep 08 '22 12:09 konrad-amtenbrink

Hey @Ovilia are there any updates on this - do you need further changes from my side? Thank you very much :)

konrad-amtenbrink avatar Sep 16 '22 12:09 konrad-amtenbrink

Hey, sorry to raise this again, but this would help us a lot. Are there any news on this?

DanielBogenrieder avatar Dec 12 '22 08:12 DanielBogenrieder

@DanielBogenrieder Sorry for late reply. I think this PR still need modification before merging.

Ovilia avatar Dec 16 '22 07:12 Ovilia

Hey @Ovilia, we still have some open questions to your comments. If you could clarify we could finish up the PR and get this merged?

Greetings and thanks, Daniel

DanielBogenrieder avatar Mar 03 '23 07:03 DanielBogenrieder

Hey @Ovilia, I left some questions on your comments because I am not sure if I understand them correctly - are there any updates on this?

Greetings and thanks, Konrad

konrad-amtenbrink avatar Apr 17 '23 14:04 konrad-amtenbrink

Hey @Ovilia, are there any updates on this PR?

Thanks, Konrad

konrad-amtenbrink avatar May 22 '23 13:05 konrad-amtenbrink

Any news on this? Anything we can do to get it merged?

DanielBogenrieder avatar Mar 12 '24 13:03 DanielBogenrieder