function addLine(type, y, start, end)
        {
            var lines = linesByType[type];
            if (!lines) {
                lines = [];
                linesByType[type] = lines;
            }
            lines.push(y, start, end);
        }
@param {string} type
@param {number} y
@param {number} start
@param {number} end