* Render tick marks, baseline, and annotations. Should be super called by subclasses and then overridden to draw * other relevant aspects of this Axis.
()
| 266 | * other relevant aspects of this Axis. |
| 267 | */ |
| 268 | public renderImmediately() { |
| 269 | const tickMarkValues = this._getTickValues(); |
| 270 | const tickMarksUpdate = this._tickMarkContainer.selectAll("." + Axis.TICK_MARK_CLASS).data(tickMarkValues); |
| 271 | const tickMarks = |
| 272 | tickMarksUpdate |
| 273 | .enter() |
| 274 | .append("line") |
| 275 | .classed(Axis.TICK_MARK_CLASS, true) |
| 276 | .merge(tickMarksUpdate); |
| 277 | |
| 278 | tickMarks.attrs(this._generateTickMarkAttrHash()); |
| 279 | d3.select(tickMarks.nodes()[0]).classed(Axis.END_TICK_MARK_CLASS, true) |
| 280 | .attrs(this._generateTickMarkAttrHash(true)); |
| 281 | d3.select(tickMarks.nodes()[tickMarkValues.length - 1]).classed(Axis.END_TICK_MARK_CLASS, true) |
| 282 | .attrs(this._generateTickMarkAttrHash(true)); |
| 283 | tickMarksUpdate.exit().remove(); |
| 284 | this._baseline.attrs(this._generateBaselineAttrHash()); |
| 285 | if (this.annotationsEnabled()) { |
| 286 | this._drawAnnotations(); |
| 287 | } else { |
| 288 | this._removeAnnotations(); |
| 289 | } |
| 290 | return this; |
| 291 | } |
| 292 | |
| 293 | /** |
| 294 | * Gets the annotated ticks. |
no test coverage detected