I am using highstock charts for stock charts. In my charts i have a buttons like 1D,5D, 6M, 3YR, 10YR and YTD. When i resize the chart (ipad portrait mode), 3yr,10yr and YTD buttons are coming out of the chart. there is no enough room for buttons in chart.So i need to disable few buttons and show only 1D,5D and YTD buttons in chart.
on desktop mode:

On ipad portrait mode:

Can you suggest me how to do this?
Thanks in Advance.
To disable the range selector, you can use this code:
rangeSelector: {
enabled: false
}
and to modify it's buttons, you can use this code;
rangeSelector: {
buttons: [{
type: 'day',
count: 3,
text: '3d'
}, {
type: 'week',
count: 1,
text: '1w'
}, {
type: 'month',
count: 1,
text: '1m'
}, {
type: 'year',
count: 1,
text: '1y'
}, {
type: 'all',
text: 'All'
}],
selected: 3
}
Maybe less number of buttons can resolve your issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With