diff --git a/lumen/dashboard.py b/lumen/dashboard.py index 0a6606f21..a8c8e814a 100644 --- a/lumen/dashboard.py +++ b/lumen/dashboard.py @@ -279,6 +279,8 @@ def _load_target(self, target_spec): if 'reloadable' not in target_spec: target_spec['reloadable'] = self.config.reloadable target = Target.from_spec(target_spec, application=self) + if isinstance(self._layout, pn.Tabs): + target.show_title = False target.start() return target diff --git a/lumen/target.py b/lumen/target.py index 9e9a88606..7ca5d6b09 100644 --- a/lumen/target.py +++ b/lumen/target.py @@ -219,6 +219,9 @@ class Target(param.Parameterized): reloadable = param.Boolean(default=True, doc=""" Whether to allow reloading data target's source using a button.""") + show_title = param.Boolean(default=True, doc=""" + Whether to show the title in Card headers.""") + title = param.String(doc="A title for this Target.") refresh_rate = param.Integer(default=None, doc=""" @@ -598,6 +601,8 @@ def panels(self): kwargs['ncols'] = 3 if self._cards: content = self._cards + if len(self._cards) == 1 and not self.show_title: + self._cards[0].hide_header = True else: content = ( pn.pane.Alert(