MCPcopy
hub / github.com/palantir/plottable / renderImmediately

Method renderImmediately

src/axes/axis.ts:268–291  ·  view source on GitHub ↗

* Render tick marks, baseline, and annotations. Should be super called by subclasses and then overridden to draw * other relevant aspects of this Axis.

()

Source from the content-addressed store, hash-verified

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.

Callers 1

Calls 9

_getTickValuesMethod · 0.95
annotationsEnabledMethod · 0.95
_drawAnnotationsMethod · 0.95
_removeAnnotationsMethod · 0.95
dataMethod · 0.80
removeMethod · 0.65
appendMethod · 0.45

Tested by

no test coverage detected