(self, x=None, y=None, kind=None, **kwds)
| 55 | self._metadata = metadata |
| 56 | |
| 57 | def __call__(self, x=None, y=None, kind=None, **kwds): |
| 58 | # Convert an array-like to a list |
| 59 | x = list(x) if is_list_like(x) else x |
| 60 | y = list(y) if is_list_like(y) else y |
| 61 | |
| 62 | if isinstance(kind, str) and kind not in self.__all__: |
| 63 | raise NotImplementedError(f"kind='{kind}' for data of type {type(self._data)}") |
| 64 | |
| 65 | if isinstance(kind, str) and kind == 'explorer': |
| 66 | return self.explorer(x=x, y=y, **kwds) |
| 67 | |
| 68 | if panel_available: |
| 69 | panel_args = ['widgets', 'widget_location', 'widget_layout', 'widget_type'] |
| 70 | panel_dict = {} |
| 71 | for k in panel_args: |
| 72 | if k in kwds: |
| 73 | panel_dict[k] = kwds.pop(k) |
| 74 | dynamic, arg_deps, arg_names = process_dynamic_args(x, y, kind, **kwds) |
| 75 | if dynamic or arg_deps: |
| 76 | |
| 77 | @pn.depends(*arg_deps, **dynamic) |
| 78 | def callback(*args, **dyn_kwds): |
| 79 | xd = dyn_kwds.pop('x', x) |
| 80 | yd = dyn_kwds.pop('y', y) |
| 81 | kindd = dyn_kwds.pop('kind', kind) |
| 82 | |
| 83 | combined_kwds = dict(kwds, **dyn_kwds) |
| 84 | fn_args = defaultdict(list) |
| 85 | for name, arg in zip(arg_names, args): |
| 86 | fn_args[(name, kwds[name])].append(arg) |
| 87 | for (name, fn), args in fn_args.items(): |
| 88 | combined_kwds[name] = fn(*args) |
| 89 | plot = self._get_converter(xd, yd, kindd, **combined_kwds)(kindd, xd, yd) |
| 90 | return pn.panel(plot, **panel_dict) |
| 91 | |
| 92 | return pn.panel(callback) |
| 93 | if panel_dict: |
| 94 | plot = self._get_converter(x, y, kind, **kwds)(kind, x, y) |
| 95 | return pn.panel(plot, **panel_dict) |
| 96 | |
| 97 | return self._get_converter(x, y, kind, **kwds)(kind, x, y) |
| 98 | |
| 99 | def _get_converter(self, x=None, y=None, kind=None, **kwds): |
| 100 | params = dict(self._metadata, **kwds) |
nothing calls this directly
no test coverage detected