def draw_categories(self):
        """Draw the category labels on the Canvas"""
        for label in self._category_labels.values():
            label.destroy()
        self._category_labels.clear()
        canvas_width = 0
        for category in (sorted(self._categories.keys() if isinstance(self._categories, dict) else self._categories)
                         if not isinstance(self._categories, OrderedDict)
                         else self._categories):
            kwargs = self._categories[category] if isinstance(self._categories, dict) else {"text": category}
            kwargs["background"] = kwargs.get("background", self._background)
            kwargs["justify"] = kwargs.get("justify", tk.LEFT)
            label = ttk.Label(self._frame_categories, **kwargs)
            width = label.winfo_reqwidth()
            canvas_width = width if width > canvas_width else canvas_width
            self._category_labels[category] = label
        self._canvas_categories.create_window(0, 0, window=self._frame_categories, anchor=tk.NW)
        self._canvas_categories.config(width=canvas_width + 5, height=self._height)
Draw the category labels on the Canvas