You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.
In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.
If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to [email protected]. Please attach the issue link if it's a technical question.
If you are interested in the project, you may also subscribe our mailing list.
Compulsively set segmentation interval for axis.
As splitNumber is a recommendation value, the calculated tick may not be the same as expected. In this case, interval should be used along with min and max to compulsively set tickings.
Reacted by Camil Bradea, levitatejay, linxxx3, Gabriel Holoșpin, Georgi Lucas Edwin, Sebastian Gruia, Dani Pele, MadaRosu, vali-munteanu, DanaDrimba and 17 more
Reacted by Bogdan Cublesan, vali-munteanu, DanaDrimba, Sorin Guga, Ungureanu Alex Daniel, gshikhar94, Balslev, mochazzxx and Kevin
We'd like to use the upgraded version at GitLab however this bug is a blocker for us. I'd like to help and submit a PR. Is there any link to any discussion @pissang, where I could have more insight on where to look?
Seems like this happens mostly with the Time based labels and it seems like the day/month are not evenly spaced:
If you check here, the left space between July and 29 is not the same as July and 8 in the X axis. Can this be related?
The labelList parameters can be prepared by the helper function prepareLayoutList in the same file. What you need is to give a list with label and priority in each item. For better display. The priority of each label should be:
year > month > day > hour > minutes > second > millesecond
Feel free to ask in this thread if you have any more questions:)
Unfortunately there are not many examples in the codebase using these two helpers (only the LabelManager seems to use them), so a little help would be highly appreciated here 🙏
Activity
echarts-bot commentedon Feb 12, 2021
Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.
In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.
If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to [email protected]. Please attach the issue link if it's a technical question.
If you are interested in the project, you may also subscribe our mailing list.
Have a nice day! 🍵
qortex commentedon Feb 12, 2021
It looks like setting
splitNumberto 5 is a workaround as far as I can tell (even though it's supposed to be the default according to the doc?)tmtron commentedon Mar 10, 2021
Unfortunately the workaround (setting xAxis.splitNumber to 5) does not work for me: see this example echarts versin 5.2.0
Quote from the
splitNumberdocs:So I tried xAxis.interval:
But this does also not work
Also xAxis.axisLabel.interval had no effect.
Any idea why this is not working in my example?
pissang commentedon Mar 11, 2021
I think
intervalbreaks in the new time axis. We will fix it in the later versions.echarts-bot commentedon Mar 11, 2021
This issue is labeled with
priority: high, which means it's a frequently asked problem and we will fix it ASAP.szilard-dobai commentedon Jun 16, 2021
Any news on this bugfix? :)
svedova commentedon Aug 4, 2021
We'd like to use the upgraded version at GitLab however this bug is a blocker for us. I'd like to help and submit a PR. Is there any link to any discussion @pissang, where I could have more insight on where to look?
Seems like this happens mostly with the Time based labels and it seems like the day/month are not evenly spaced:
If you check here, the left space between
Julyand29is not the same asJulyand8in the X axis. Can this be related?pissang commentedon Aug 6, 2021
@svedova Hi, Thanks for helping fix it. There is a helper function that can hide the overlapped labels.
https://github.com/apache/echarts/blob/master/src/label/labelLayoutHelper.ts#L289
The
labelListparameters can be prepared by the helper functionprepareLayoutListin the same file. What you need is to give a list withlabelandpriorityin each item. For better display. The priority of each label should be:year > month > day > hour > minutes > second > millesecond
Feel free to ask in this thread if you have any more questions:)
svedova commentedon Aug 7, 2021
@pissang thanks for the help!
At which state am I supposed to use the
prepareLayoutListfunction?Initially I thought I would alter the
Time.tsfile but as far as I can tell, all it does is to return a list of string labels whengetLabelandgetFormattedLabelis called. When I trace the call stack, it seems likeAxisBuilder.tscreates a list ofZRTexts here: https://github.com/apache/echarts/blob/master/src/component/axis/AxisBuilder.ts#L342Is it a good place to use the
prepareLayoutListandhideOverlaphelpers?Another question,
prepareLayoutListexpects a few more properties thanlabelandpriority(ref: https://github.com/apache/echarts/blob/master/src/label/labelLayoutHelper.ts#L25). How do I populate the other properties?Unfortunately there are not many examples in the codebase using these two helpers (only the
LabelManagerseems to use them), so a little help would be highly appreciated here 🙏pissang commentedon Aug 16, 2021
@svedova Sorry for the late reply.
Usually,
prepareLayoutListandhideOverlapare called when all labels are created and prepared, prepared means all properties like transform, font are set so the method can get the correct oriented bounding rect. For axis, I think it can be https://github.com/apache/echarts/blob/master/src/component/axis/CartesianAxisView.ts#L102Some properties of
LabelLayoutListPrepareInputare optional. The type is a bit misleading, it should be:defaultAttr.ignorecan uselabel.ignorehere.viewer: a time axis draws its month labels over its day labels