import { Component, Input, ElementRef, HostListener, OnChanges } from '@angular/core';
import { BaseHighChart } from "./baseHighChart";
import { Portlet } from "../../portlet/portlet";
import { ScriptLoaderService } from '../../../library/script-loader.service';
declare const jQuery;
declare const Highcharts;
@Component({
selector: 'rd-highchart-sync',
template: `
`
})
export class SyncCharts extends BaseHighChart implements OnChanges {
constructor(element: ElementRef, portlet: Portlet, private script: ScriptLoaderService) {
super(element, portlet, script);
this.script.load([
"./assets/js/highcharts/highcharts.js",
"./assets/js/highcharts/data.js"
]);
Highcharts.Point.prototype.highlight = function (event) {
event = this.series.chart.pointer.normalize(event);
this.onMouseOver();
this.series.chart.tooltip.refresh(this);
this.series.chart.xAxis[0].drawCrosshair(event, this);
};
// Highcharts.Pointer.prototype.reset = function () {
// return undefined;
// };
}
@Input("rd-data") data: Array