Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
series: this._currentSeries[index],
});
}
});
addHighchartsEvent(series, 'show', () => {
if (this._currentSeries) {
this.seriesVisibilityChange.emit({
source: this,
visible: true,
series: this._currentSeries[index],
});
}
});
});
addHighchartsEvent(this._chartObject, 'redraw', () => {
this._notifyAfterRender();
});
// adds event-listener to highcharts custom event for tooltip closed
addHighchartsEvent(this._chartObject, 'tooltipClosed', () => {
this._highChartsTooltipClosed$.next();
});
// Adds event-listener to highcharts custom event for tooltip refreshed closed */
// We cannot type the event param, because the types for highcharts are incorrect
// tslint:disable-next-line:no-any
addHighchartsEvent(this._chartObject, 'tooltipRefreshed', (event: any) => {
this._highChartsTooltipDataChanged$.next({
data: (event as DtHcTooltipEventPayload).data,
chart: this._chartObject!,
});
});
series: this._currentSeries[index],
});
}
});
addHighchartsEvent(series, 'show', () => {
if (this._currentSeries) {
this.seriesVisibilityChange.emit({
source: this,
visible: true,
series: this._currentSeries[index],
});
}
});
});
addHighchartsEvent(this._chartObject, 'redraw', () => {
this._notifyAfterRender();
});
// adds event-listener to highcharts custom event for tooltip closed
addHighchartsEvent(this._chartObject, 'tooltipClosed', () => {
this._isTooltipOpen = false;
this.tooltipOpenChange.emit(false);
this._tooltipRefreshed.next(null);
});
// Adds event-listener to highcharts custom event for tooltip refreshed closed */
// We cannot type the event param, because the types for highcharts are incorrect
// tslint:disable-next-line:no-any
addHighchartsEvent(this._chartObject, 'tooltipRefreshed', (event: any) => {
if (!this._isTooltipOpen) {
this._isTooltipOpen = true;
this.tooltipOpenChange.emit(true);
if (this._currentSeries) {
this.seriesVisibilityChange.emit({
source: this,
visible: true,
series: this._currentSeries[index],
});
}
});
});
addHighchartsEvent(this._chartObject, 'redraw', () => {
this._notifyAfterRender();
});
// adds event-listener to highcharts custom event for tooltip closed
addHighchartsEvent(this._chartObject, 'tooltipClosed', () => {
this._isTooltipOpen = false;
this.tooltipOpenChange.emit(false);
this._tooltipRefreshed.next(null);
});
// Adds event-listener to highcharts custom event for tooltip refreshed closed */
// We cannot type the event param, because the types for highcharts are incorrect
// tslint:disable-next-line:no-any
addHighchartsEvent(this._chartObject, 'tooltipRefreshed', (event: any) => {
if (!this._isTooltipOpen) {
this._isTooltipOpen = true;
this.tooltipOpenChange.emit(true);
}
this._tooltipRefreshed.next({
data: (event as DtHcTooltipEventPayload).data,
chart: this._chartObject!,
});
}
});
});
addHighchartsEvent(this._chartObject, 'redraw', () => {
this._notifyAfterRender();
});
// adds event-listener to highcharts custom event for tooltip closed
addHighchartsEvent(this._chartObject, 'tooltipClosed', () => {
this._highChartsTooltipClosed$.next();
});
// Adds event-listener to highcharts custom event for tooltip refreshed closed */
// We cannot type the event param, because the types for highcharts are incorrect
// tslint:disable-next-line:no-any
addHighchartsEvent(this._chartObject, 'tooltipRefreshed', (event: any) => {
this._highChartsTooltipDataChanged$.next({
data: (event as DtHcTooltipEventPayload).data,
chart: this._chartObject!,
});
});
this._notifyAfterRender();
}
this._chartObject.series.forEach((series, index) => {
addHighchartsEvent(series, 'hide', () => {
if (this._currentSeries) {
this.seriesVisibilityChange.emit({
source: this,
visible: false,
series: this._currentSeries[index],
});
}
});
addHighchartsEvent(series, 'show', () => {
if (this._currentSeries) {
this.seriesVisibilityChange.emit({
source: this,
visible: true,
series: this._currentSeries[index],
});
}
});
});
}
}, undefined, undefined, false);
}
function unbindAll() {
handlers.forEach(function (unbind) {
if (unbind) {
unbind();
}
});
handlers.length = 0;
}
handlers.push(Highcharts.addEvent(document, 'mousemove', drag));
handlers.push(Highcharts.addEvent(document, 'touchmove', drag));
handlers.push(Highcharts.addEvent(document, 'mouseup', unbindAll));
handlers.push(Highcharts.addEvent(document, 'touchend', unbindAll));
};
beta: beta + (posX - e.chartX) / sensitivity
}
}
}, undefined, undefined, false);
}
function unbindAll() {
handlers.forEach(function (unbind) {
if (unbind) {
unbind();
}
});
handlers.length = 0;
}
handlers.push(Highcharts.addEvent(document, 'mousemove', drag));
handlers.push(Highcharts.addEvent(document, 'touchmove', drag));
handlers.push(Highcharts.addEvent(document, 'mouseup', unbindAll));
handlers.push(Highcharts.addEvent(document, 'touchend', unbindAll));
};