How to grab angular component
on onClick function of a ChartJs function? is there a way? as this
is the Chart, self
the window...
My chart is added like that into the some.component.ts
@ViewChild(Chart) mainChart: Chart // declaration on public variables on component.ts
// construction of chart on API call result
this.mainChart = new Chart(MeasureUnitMonthlyComponent.CHART_ID, {
type: 'bar',
data: {
labels: aChartLabelsArray,
datasets: aDatasetsArray
},
options: {
onClick: this.onChartClicked,
legend: {
display: true
},
....