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

xAxis render wrong when useHTML:true and change rotation #148

Open
wjhcc2018 opened this issue Feb 20, 2020 · 11 comments
Open

xAxis render wrong when useHTML:true and change rotation #148

wjhcc2018 opened this issue Feb 20, 2020 · 11 comments

Comments

@wjhcc2018
Copy link

Expected behaviour
xAxis can render correctly
QQ图片20200220160342
Actual behaviour
QQ图片20200220160414

Live demo with steps to reproduce
Live demo : https://jshare.com.cn/temp/SeGrWa
Product version
"highcharts": "8.0.0",
"highcharts-3d": "^0.1.7",
"highcharts-grouped-categories": "^1.1.3",
"highcharts-regression": "^2.0.1",
"highcharts-vue": "^1.3.5",

@KacperMadej
Copy link
Collaborator

Hi @wjhcc2018

Thank you for reporting the problem.

@wjhcc2018
Copy link
Author

@KacperMadej thanks for your reply ,is there a temporary solution, or to modify the source code?

@pawelfus
Copy link
Collaborator

I believe this is the same issue as #149 - rotation support was not implemented, neither tested.

@wjhcc2018
Copy link
Author

@pawelfus no it's no the same issue,this issue is when useHTML:true,labels render many times

@pawelfus
Copy link
Collaborator

pawelfus commented Feb 24, 2020

Ah, I see. It's important @wjhcc2018, to provide as detailed description as possible. "render correctly" is quite a vague description. I thought it's about overlapping labels and the grid. Thanks for the explanation!

@wjhcc2018
Copy link
Author

@pawelfus live demo https://jshare.com.cn/temp/SeGrWa i change the style , labels render many times

@wjhcc2018
Copy link
Author

@pawelfus Hello, is there any solution for this? This causes me many bugs, and I am eager to solve this problem

@pawelfus
Copy link
Collaborator

pawelfus commented Mar 5, 2020

The only solution I'm aware of is to set useHTML: false.

@wjhcc2018
Copy link
Author

@pawelfus Thank you very much for your reply. I would like to ask if there is any plan to release the new version

@pawelfus
Copy link
Collaborator

pawelfus commented Mar 6, 2020

No ETA for the next version, but I wouldn't expect anything in the next few weeks.

@ivan-nejezchleb
Copy link

@wjhcc2018
try this patch
if (axis.options.labels.useHTML) { tick.label.textPxLength = tick.label.htmlGetBBox().width; } else { tick.label.textPxLength = tick.label.getBBox().width; } in
// Override methods prototypes
tickProto.addLabel = function () {

instead of just
tick.label.textPxLength = tick.label.getBBox().width;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants