* Update category properties based on the unique values found for this dimension * @param {Object} dim * @param {UniqueInfo} uniqueInfoDim
(dim, uniqueInfoDim)
| 465 | * @param {UniqueInfo} uniqueInfoDim |
| 466 | */ |
| 467 | function validateCategoryProperties(dim, uniqueInfoDim) { |
| 468 | // Update categoryarray |
| 469 | dim._categoryarray = uniqueInfoDim.uniqueValues; |
| 470 | |
| 471 | // Handle ticktext |
| 472 | if(dim.ticktext === null || dim.ticktext === undefined) { |
| 473 | dim._ticktext = []; |
| 474 | } else { |
| 475 | // Shallow copy to avoid modifying input array |
| 476 | dim._ticktext = dim.ticktext.slice(); |
| 477 | } |
| 478 | |
| 479 | // Extend ticktext with elements from uniqueInfoDim.uniqueValues |
| 480 | for(var i = dim._ticktext.length; i < uniqueInfoDim.uniqueValues.length; i++) { |
| 481 | dim._ticktext.push(uniqueInfoDim.uniqueValues[i]); |
| 482 | } |
| 483 | } |
| 484 | |
| 485 | /** |
| 486 | * Determine whether an array contains a permutation of the integers from 0 to the array's length - 1 |
no outgoing calls
no test coverage detected
searching dependent graphs…