function makePtIndex2PtNumber(indexToPoints) {
    var ptIndex2ptNumber = {};
    for(var k in indexToPoints) {
        var pts = indexToPoints[k];
        for(var j = 0; j < pts.length; j++) {
            ptIndex2ptNumber[pts[j]] = +k;
        }
    }
    return ptIndex2ptNumber;
}
Extract option from calcdata item, correctly falling back to
 trace value if not found.

 @param {object} calcPt : calcdata[i][j] item
 @param {object} trace : (full) trace object
 @param {string} calcKey : calcdata key
 @param {string} traceKey : aka trace attribute string
 @return {any}