* Make a container for collecting subplots we need to display. * * Finds all subplot types we need to enumerate once and caches it, * but makes a new output object each time. * Single-trace subplots (which have no `id`) such as pie, table, etc * do not need to be collected because we just draw
()
| 602 | * do not need to be collected because we just draw all visible traces. |
| 603 | */ |
| 604 | function emptySubplotLists() { |
| 605 | var collectableSubplotTypes = Registry.collectableSubplotTypes; |
| 606 | var out = {}; |
| 607 | var i, j; |
| 608 | |
| 609 | if(!collectableSubplotTypes) { |
| 610 | collectableSubplotTypes = []; |
| 611 | |
| 612 | var subplotsRegistry = Registry.subplotsRegistry; |
| 613 | |
| 614 | for(var subplotType in subplotsRegistry) { |
| 615 | var subplotModule = subplotsRegistry[subplotType]; |
| 616 | var subplotAttr = subplotModule.attr; |
| 617 | |
| 618 | if(subplotAttr) { |
| 619 | collectableSubplotTypes.push(subplotType); |
| 620 | |
| 621 | // special case, currently just for cartesian: |
| 622 | // we need to enumerate axes, not just subplots |
| 623 | if(Array.isArray(subplotAttr)) { |
| 624 | for(j = 0; j < subplotAttr.length; j++) { |
| 625 | Lib.pushUnique(collectableSubplotTypes, subplotAttr[j]); |
| 626 | } |
| 627 | } |
| 628 | } |
| 629 | } |
| 630 | } |
| 631 | |
| 632 | for(i = 0; i < collectableSubplotTypes.length; i++) { |
| 633 | out[collectableSubplotTypes[i]] = []; |
| 634 | } |
| 635 | return out; |
| 636 | } |
| 637 | |
| 638 | /** |
| 639 | * getFormatObj: use _context to get the format object from locale. |
no outgoing calls
no test coverage detected
searching dependent graphs…