echarts icon indicating copy to clipboard operation
echarts copied to clipboard

feat(axis): provide splitLine.showMinLine and splitLine.showMaxLine. …

Open MeetzhDing opened this issue 3 years ago • 10 comments

Brief Information

This pull request is in the type of:

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

What does this PR do?

Resolves #16946

provide splitLine.showMinLine and splitLine.showMaxLine.

When using xAxis[type=time], it allow user hide first/last splitLine.

uplot style: uplot styles

After: How is it fixed in this PR?

Like showMinLabel/showMaxLabel, it add new option showMinLine adn showMaxLine.

Document Info

One of the following should be checked.

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

MeetzhDing avatar Apr 27 '22 06:04 MeetzhDing

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 Apr 27 '22 06:04 echarts-bot[bot]

Please don't commit the files in the dist folder

pissang avatar Apr 27 '22 07:04 pissang

I have some concern on this PR.

I think it may be a better idea to hide min/max line only if the first/last tick is not calculated by nice tick (which usually happens when the user deliberately sets a min/max value to the axis.

For example, in this demo, the min tick is -20 and it is expected to be displayed because -20 is a nice tick.

image

While in another case, the axis is set to have min: -22. In this case, the splitLine of -22 is expected to be hidden if showMinLine is set to be false.

image

I think this logic may make more sense. @pissang What do you think?

Ovilia avatar May 26 '22 08:05 Ovilia

@Ovilia @pissang how to judge whether it is nice tick? Or is this any plan yet?

MeetzhDing avatar Jul 01 '22 08:07 MeetzhDing

@MeetzhDing Sorry for the late reply. You can find the code here.

Ovilia avatar Jul 27 '22 04:07 Ovilia

@Ovilia showMinLine type is boolean | 'auto' now

    // null/undefined (true) | true | false | 'auto' (true when nick tick only)
    showMinLine?: boolean | 'auto',
    // null/undefined (true) | true | false | 'auto' (true when nick tick only)
    showMaxLine?: boolean | 'auto',

MeetzhDing avatar Aug 09 '22 04:08 MeetzhDing

@Ovilia please check pr again

MeetzhDing avatar Sep 30 '22 04:09 MeetzhDing

@Ovilia please check pr again

MeetzhDing avatar Oct 28 '22 08:10 MeetzhDing

image image

@Ovilia please check again

MeetzhDing avatar Nov 09 '22 16:11 MeetzhDing

Document changes are required in this PR. Please also make a PR to apache/echarts-doc for document changes and update the issue id in the PR description. When the doc PR is merged, the maintainers will remove the PR: awaiting doc label.

echarts-bot[bot] avatar Nov 15 '22 10:11 echarts-bot[bot]