blacklabel / grouped_categories

Grouped categories plugin for Highcharts by Black Label
http://blacklabel.github.io/grouped_categories/
Other
92 stars 74 forks source link

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

Open wjhcc2018 opened 4 years ago

wjhcc2018 commented 4 years ago

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 commented 4 years ago

Hi @wjhcc2018

Thank you for reporting the problem.

wjhcc2018 commented 4 years ago

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

pawelfus commented 4 years ago

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

wjhcc2018 commented 4 years ago

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

pawelfus commented 4 years ago

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 commented 4 years ago

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

wjhcc2018 commented 4 years ago

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

pawelfus commented 4 years ago

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

wjhcc2018 commented 4 years ago

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

pawelfus commented 4 years ago

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

ivan-nejezchleb commented 3 years ago

@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;