I am using https://www.npmjs.com/package/highcharts-angular to produce highcharts in Angular.
When I set the xAxis min,max and zoom, the points disappear. When I do not set the min,max, the points do not disappear on zoom.
Here is my chart options for highcharts.
this._chartOptions= {
title: { text: "highcharts" },
plotOptions: {
series: {
states: {
hover: {
enabled: false // hover
},
},
gapSize: 2,
}
},
series:[
{
data: [x,y],
name: "name",
allowPointSelect: false,
step: false
} ...
],
rangeSelector: {
enabled: true,
inputEnabled: true,
buttons: [
{
type: 'hour',
count: 24,
text: '1d',
dataGrouping: {
forced: true,
units: [['hour', [1]]]
}
},
{
type: 'day',
count: 7,
text: '1w',
dataGrouping: {
forced: true,
units: [['day', [1]]]
}
},
{
type: 'week',
count: 4,
text: '1m',
dataGrouping: {
forced: true,
units: [['week', [1]]]
}
},
{
type: 'month',
count: 3,
text: '1y',
dataGrouping: {
forced: true,
units: [['month', [1]]]
}
},
{
type: 'all',
text: 'All',
}
]
},
xAxis: {
min: new Date(this._fromDate + timezoneOffset) ,
max: new Date(this._toDate + timezoneOffset),
type: 'datetime',
},
chart: {
zoomType: 'x',
}
},
},
function (chart) {
// apply the date pickers
setTimeout(function () {
$('input.highcharts-range-selector', $('#' + chart.options.chart.renderTo)).datepicker()
}, 0)
};
break;
}
Here is snapshot of the highcharts