* Adds CSS styling to the bar labels
()
| 678 | * Adds CSS styling to the bar labels |
| 679 | */ |
| 680 | private updateBarLabelsStyle(): void { |
| 681 | const displayFormatStr = this.model.get('label_display_format'); |
| 682 | const displayFormat = displayFormatStr ? d3.format(displayFormatStr) : null; |
| 683 | |
| 684 | let fonts = this.d3el |
| 685 | .selectAll('.bar_label') |
| 686 | .text((d: any, i) => (displayFormat ? displayFormat(d.y) : null)); |
| 687 | |
| 688 | const fontStyle = this.model.get('label_font_style'); |
| 689 | |
| 690 | for (const styleKey in fontStyle) { |
| 691 | fonts = fonts.style(styleKey, fontStyle[styleKey]); |
| 692 | } |
| 693 | } |
| 694 | |
| 695 | private updateType() { |
| 696 | // We need to update domains here as the y_domain needs to be |