|
|
|
@ -75,8 +75,9 @@ export class ChartwerkBarPod extends ChartwerkPod<BarSerie, BarOptions> {
|
|
|
|
|
.attr('width', this.barWidth) |
|
|
|
|
.attr('height', (val: number) => this.getBarHeight(val)) |
|
|
|
|
.on('contextmenu', this.contextMenu.bind(this)) |
|
|
|
|
.on('mouseover', (e) => { this.overlay.node().dispatchEvent(new MouseEvent(d3.event.type, d3.event)); }) |
|
|
|
|
.on('mousemove', (e) => { this.overlay.node().dispatchEvent(new MouseEvent(d3.event.type, d3.event)); }) |
|
|
|
|
.on('mouseover', () => { this.overlay.node().dispatchEvent(new MouseEvent(d3.event.type, d3.event)); }) |
|
|
|
|
.on('mousemove', () => { this.overlay.node().dispatchEvent(new MouseEvent(d3.event.type, d3.event)); }) |
|
|
|
|
.on('mouseout', () => { this.overlay.node().dispatchEvent(new MouseEvent(d3.event.type, d3.event)); }) |
|
|
|
|
.on('mousedown', () => { d3.event.stopPropagation(); }); |
|
|
|
|
|
|
|
|
|
// render bar annotations, its all hardcoded
|
|
|
|
@ -104,8 +105,9 @@ export class ChartwerkBarPod extends ChartwerkPod<BarSerie, BarOptions> {
|
|
|
|
|
return this.getTrianglePath(x, y, this.barWidth, options); |
|
|
|
|
}) |
|
|
|
|
.attr('fill', annotation.color) |
|
|
|
|
.on('mouseover', (e) => { this.overlay.node().dispatchEvent(new MouseEvent(d3.event.type, d3.event)); }) |
|
|
|
|
.on('mousemove', (e) => { this.overlay.node().dispatchEvent(new MouseEvent(d3.event.type, d3.event)); }) |
|
|
|
|
.on('mouseover', () => { this.overlay.node().dispatchEvent(new MouseEvent(d3.event.type, d3.event)); }) |
|
|
|
|
.on('mousemove', () => { this.overlay.node().dispatchEvent(new MouseEvent(d3.event.type, d3.event)); }) |
|
|
|
|
.on('mouseout', () => { this.overlay.node().dispatchEvent(new MouseEvent(d3.event.type, d3.event)); }) |
|
|
|
|
.on('mousedown', () => { d3.event.stopPropagation(); }); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|