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

StockChart set rangeSelector: enabled: false, navigator Left a small gap #17212

Closed
Caesar454905970 opened this issue Apr 24, 2022 · 9 comments · Fixed by #19699
Closed

StockChart set rangeSelector: enabled: false, navigator Left a small gap #17212

Caesar454905970 opened this issue Apr 24, 2022 · 9 comments · Fixed by #19699

Comments

@Caesar454905970
Copy link

$.getJSON('https://data.jianshukeji.com/stock/history/000001', function (data) {
if(data.code !== 1) {
alert('读取股票数据失败!');
return false;
}
data = data.data;
// 去掉多余的数据
Highcharts.each(data, function(d) {
d.length = 2;
});
Highcharts.stockChart('container', {
rangeSelector: {
enabled: false
},
title: {
text: '平安银行历史股价'
},
plotOptions: {
series: {
showInLegend: true
}
},
xAxis: {
min:data[0][0],
max:data[0][0]+10000000000,
},
tooltip: {
split: false,
shared: true
},
series: [{
// type: 'line',
id: '000001',
name: '平安银行',
data: data
}]
});
});
image

@pawellysy
Copy link
Member

hello, @Caesar454905970, thanks for creating the issue.
I am not quite sure what you mean. What small gap do you mean?
I tried to reproduce both charts with and without the rangeSelector, and they both look the same to me.
https://jsfiddle.net/BlackLabel/023ckqjL/

Could you please try to reproduce your example in the demo I shared above?

@Caesar454905970
Copy link
Author

thank you! ;
https://jsfiddle.net/Caesar454905970/pew9fhd4/3/;
I can drag it to the left by default;I don't think he's far left
My screen is 1920*1080;scaling is 100%;

@Caesar454905970
Copy link
Author

@pawellysy

@pawellysy
Copy link
Member

@Caesar454905970, why did you close the ticket? Is it no longer viable for me to look at?
Apart from that, I don't quite understand what you mean by 'it' and 'he' in the message above. Do you refer to the navigator handles?
Sorry, but I don't see much difference between the example I shared and yours. Could you pinpoint the differences, please?

@Caesar454905970
Copy link
Author

In my case,scrollbar can drag it to the left;
but,The effect I want is the starting point and cannot move to the left;
vsxkk-luuml

@Caesar454905970
Copy link
Author

@pawellysy

@Caesar454905970
Copy link
Author

@pawellysy,Sorry, I made a mistake,I turned it back on,My answer is up there

@pawellysy
Copy link
Member

Hi, @Caesar454905970 sorry that I took so long to reply.
simplified demo: https://jsfiddle.net/BlackLabel/odsqvp8x/4/

Internal Note:

The dataMin property of the navigator xAxis is wrongly calculated at the first render.

Workaround:

You can call chart.reflow() after the chart is loaded to make the chart calculate the dataMin value of the Navigator axis one more time.
https://jsfiddle.net/BlackLabel/odsqvp8x/5/

@kamil-musialowski
Copy link
Contributor

Internal note: Possible regression, last good tag - v9.0.1, first bad tag - v9.1.0.
Unfortunately, I wasn't able to bisect it due to some git bisect and utils bisect problems.

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

Successfully merging a pull request may close this issue.

3 participants