MCPcopy Index your code
hub / github.com/bqplot/bqplot / styleBarLabelTextAnchor

Method styleBarLabelTextAnchor

js/src/Bars.ts:656–662  ·  view source on GitHub ↗

* Determines the value of the text-anchor CSS attribute * @param d - Data point * @param i - Index number

(d: BarGroupValue)

Source from the content-addressed store, hash-verified

654 * @param i - Index number
655 */
656 private styleBarLabelTextAnchor(d: BarGroupValue): string {
657 if (this.orientation === 'horizontal') {
658 return d.y <= this.baseLine ? 'start' : 'end';
659 } else {
660 return 'middle';
661 }
662 }
663
664 /**
665 * Determines the value of the dominant-base-line CSS attribute

Callers 2

stackedBarLabelsMethod · 0.95
groupedBarLabelsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected