def redraw(self):
        """
        Process data from store and prefer to draw.
        :return:
        """
        today = date.today()
        plotd = defaultdict(list)
        x_ticks = []

        tick_step_size = constants.HISTORIC_DAYS_N / 6
        # Pre-process data into lists of x, y values
        for n, data in enumerate(self.data):
            if data:
                for currency, v in data.items():
                    plotd[currency].append((-n, v))

            when = today - timedelta(days=n)
            if (n - tick_step_size // 2) % tick_step_size == 0:
                x_ticks.append((-n, when.strftime("%d-%m")))

        # Update the plot
        keys = sorted(plotd.keys())
        y_min, y_max = sys.maxsize, 0

        for currency in keys:
            x, y = zip(*plotd[currency])

            if currency in self._data_visible:
                y_min = min(y_min, *y)
                y_max = max(y_max, *y)
            else:
                x, y = [], []

            if currency in self._data_lines:
                self._data_lines[currency].setData(x, y)
            else:
                self._data_lines[currency] = self.ax.plot(
                    x,
                    y,  # Unpack a list of tuples into two lists, passed as individual args.
                    pen=pg.mkPen(self.get_currency_color(currency), width=2),
                )

        self.ax.setLimits(yMin=y_min * 0.9, yMax=y_max * 1.1)
        self.ax.getAxis("bottom").setTicks([x_ticks, []])

        Process data from store and prefer to draw.
        :return:
        
pyqt6/demos/currency/main.py