example/timeline-notches/main.js
function primaryLabelInterval(pxPerSec) {
    var retval = 1;
    if (pxPerSec >= 25 * 100) {
        retval = 10;
    } else if (pxPerSec >= 25 * 40) {
        retval = 4;
    } else if (pxPerSec >= 25 * 10) {
        retval = 10;
    } else if (pxPerSec >= 25 * 4) {
        retval = 4;
    } else if (pxPerSec >= 25) {
        retval = 1;
    } else if (pxPerSec * 5 >= 25) {
        retval = 5;
    } else if (pxPerSec * 15 >= 25) {
        retval = 15;
    } else {
        retval = Math.ceil(0.5 / pxPerSec) * 60;
    }
    return retval;
}
function primaryLabelInterval(pxPerSec) {
    var retval = 1;
    if (pxPerSec >= 25 * 100) {
        retval = 10;
    } else if (pxPerSec >= 25 * 40) {
        retval = 4;
    } else if (pxPerSec >= 25 * 10) {
        retval = 10;
    } else if (pxPerSec >= 25 * 4) {
        retval = 4;
    } else if (pxPerSec >= 25) {
        retval = 1;
    } else if (pxPerSec * 5 >= 25) {
        retval = 5;
    } else if (pxPerSec * 15 >= 25) {
        retval = 15;
    } else {
        retval = Math.ceil(0.5 / pxPerSec) * 60;
    }
    return retval;
}
function primaryLabelInterval ( pxPerSec ) { var retval = 1 ; if ( pxPerSec >= 25 * 100 ) { retval = 10 ; } else if ( pxPerSec >= 25 * 40 ) { retval = 4 ; } else if ( pxPerSec >= 25 * 10 ) { retval = 10 ; } else if ( pxPerSec >= 25 * 4 ) { retval = 4 ; } else if ( pxPerSec >= 25 ) { retval = 1 ; } else if ( pxPerSec * 5 >= 25 ) { retval = 5 ; } else if ( pxPerSec * 15 >= 25 ) { retval = 15 ; } else { retval = Math . ceil ( 0.5 / pxPerSec ) * 60 ; } return retval ; }
Return the cadence of notches that get labels in the primary color.
EG, return 2 if every 2nd notch should be labeled,
return 10 if every 10th notch should be labeled, etc.

Note that if you override the default function, you'll almost
certainly want to override formatTimeCallback, primaryLabelInterval
and/or secondaryLabelInterval so they all work together.

@param pxPerSec
Return the cadence of notches that get labels in the primary color . EG return 2 if every 2nd notch should be labeled return 10 if every 10th notch should be labeled etc .