(self, event=None)
| 745 | raise NotImplementedError('Must be implemented by subclasses.') |
| 746 | |
| 747 | def _toggle_controls(self, event=None): |
| 748 | # Control high-level parameters |
| 749 | visible = True |
| 750 | if event and event.new in ('table', 'dataset'): |
| 751 | parameters = ['kind', 'columns'] |
| 752 | visible = False |
| 753 | elif event and event.new in KINDS['2d']: |
| 754 | parameters = ['kind', 'x', 'y', 'by', 'groupby'] |
| 755 | elif event and event.new in ('hist', 'kde', 'density'): |
| 756 | self.x = None |
| 757 | parameters = ['kind', 'y_multi', 'by', 'groupby'] |
| 758 | else: |
| 759 | parameters = ['kind', 'x', 'y_multi', 'by', 'groupby'] |
| 760 | self._controls.parameters = parameters |
| 761 | # Control other tabs |
| 762 | tabs = [('Fields', self._controls)] |
| 763 | if visible: |
| 764 | tabs += [ |
| 765 | ('Axes', self.axes), |
| 766 | ('Labels', self.labels), |
| 767 | ('Style', self.style), |
| 768 | ('Operations', self.operations), |
| 769 | ('Geographic', self.geographic), |
| 770 | ('Advanced', self.advanced), |
| 771 | ] |
| 772 | if event and event.new not in ('area', 'kde', 'line', 'ohlc', 'rgb', 'step'): |
| 773 | tabs.insert(5, ('Colormapping', self.colormapping)) |
| 774 | self._control_tabs[:] = tabs |
| 775 | |
| 776 | def _check_y(self, event): |
| 777 | if len(event.new) > 1 and self.by: |
nothing calls this directly
no outgoing calls
no test coverage detected