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

Method styleBarLabelDominantBaseline

js/src/Bars.ts:669–675  ·  view source on GitHub ↗

* Determines the value of the dominant-base-line CSS attribute * @param d - Data point * @param i - Index number

(d: BarGroupValue)

Source from the content-addressed store, hash-verified

667 * @param i - Index number
668 */
669 private styleBarLabelDominantBaseline(d: BarGroupValue): string {
670 if (this.orientation === 'horizontal') {
671 return 'central';
672 } else {
673 return d.y <= this.baseLine ? 'text-after-edge' : 'text-before-edge';
674 }
675 }
676
677 /**
678 * Adds CSS styling to the bar labels

Callers 2

stackedBarLabelsMethod · 0.95
groupedBarLabelsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected