Skip to content

Commit 37d2379

Browse files
committed
feat: Add hook for declaring column widths in TimeSeriesDataUIManager
1 parent fe01976 commit 37d2379

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

dvue/tsdataui.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,19 @@ def get_time_range(self, dfcat):
330330
def get_table_filters(self):
331331
raise NotImplementedError("Method get_table_filters not implemented")
332332

333+
def _get_table_column_width_map(self) -> dict:
334+
"""Hook for subclasses to declare column widths.
335+
336+
The default ``get_table_schema()`` implementation calls this method
337+
to seed the ``column_widths`` in the schema. Subclasses that override
338+
``get_table_schema()`` directly do not need to implement this hook.
339+
Subclasses that only want to declare widths without overriding the full
340+
schema may override this method instead.
341+
342+
Returns an empty dict by default (no widths declared).
343+
"""
344+
return {}
345+
333346
def is_irregular(self, r):
334347
raise NotImplementedError("Method is_irregular not implemented")
335348

0 commit comments

Comments
 (0)