I'm using a charting library and it either doesn't function as I expect it to or has a bug (or both...) and I'm curious if I can simply disable some functionality by overriding a binding or something. I'm not sure if its fundamentally an angular question or a javascript one.
In this definition below, for example, I'm not satisfied with how (activate) and (deactivate) are working.
<svg:g
*ngFor="let group of results; let index = index; trackBy:trackBy"
[@animationState]="'active'"
[attr.transform]="groupTransform(group)">
<svg:g ngx-charts-series-vertical
type="stacked"
[xScale]="xScale"
[yScale]="yScale"
[activeEntries]="activeEntries"
[colors]="colors"
[series]="group.series"
[dims]="dims"
[gradient]="gradient"
[tooltipDisabled]="tooltipDisabled"
[tooltipTemplate]="tooltipTemplate"
[showDataLabel]="showDataLabel"
[dataLabelFormatting]="dataLabelFormatting"
[seriesName]="group.name"
[animations]="animations"
(select)="onClick($event, group)"
(activate)="onActivate($event, group)"
(deactivate)="onDeactivate($event, group)"
(dataLabelHeightChanged)="onDataLabelMaxHeightChanged($event, index)"
/>
I tried to extend the component so I could override that functionality but when I start the application up I get the especially unhelpful error in the browser "Cannot GET/" and no output in the server debug log to tell me what is incorrect, it simply says "i 「wdm」: Failed to compile." This happens if include the component in my app declarations at all, even if it's not referenced anywhere.
import { Component } from '@angular/core';
import { StackedBarViewComponent } from './stackedbarview.component';
import { BarVerticalStackedComponent } from '@swimlane/ngx-charts';
@Component({
selector: 'verticalstackedbarchartca',
templateUrl: './verticalstackedbarchartca.component.html',
styleUrls: ['./verticalstackedbarchartca.component.css']
})
export class VerticalStackedBarChartCustomActivenessComponent extends BarVerticalStackedComponent {
onActivate(event, group?) {
console.log('custom onActivate(' + event + "," + group + ")");
}
onDeactivate(event, group?) {
console.log('custom onDeactivate(' + event + "," + group + ")");
}
}
This is in Visual Studio 2017.