plotomics
    Preparing search index...

    Function fitZeroTicks

    • Round ticks from 0 that fit an axis lengthPx long: the most intervals, up to maxCount, whose labels keep a gap of at least minGapPx. When even the coarsest round step puts the labels closer, the axis keeps two labels, 0 and its round top, with that top as the step, when they keep endGapPx between them: two labels alone need only to stay clear of each other, so the label size and a px or two do (by default the axis asks minGapPx of them too). When those two do not fit either, it keeps the top alone, and no tick at all on an axis with no length. So no two labels ever come closer than minGapPx, or endGapPx for that pair.

      Parameters

      • max: number
      • lengthPx: number
      • opts: { endGapPx?: number; integer?: boolean; maxCount?: number; minGapPx?: number } = {}

      Returns { step: number; ticks: number[]; top: number }