def set_margin(self, top=40, bottom=30, left=50, right=10, buffer_size=8):
        """Set margin of the chart.

            Args:
                top (int): size of top margin in pixels.
                bottom (int): size of bottom margin in pixels.
                left (int): size of left margin in pixels.
                right (int): size of right margin in pixels.
                buffer_size (int): buffer size in pixels between the chart and margins.

        """
        self.set_integer("top", top)
        self.set_integer("bottom", bottom)
        self.set_integer("left", left)
        self.set_integer("right", right)
        self.set_integer("buffer", buffer_size)
Set margin of the chart.

            Args:
                top (int): size of top margin in pixels.
                bottom (int): size of bottom margin in pixels.
                left (int): size of left margin in pixels.
                right (int): size of right margin in pixels.
                buffer_size (int): buffer size in pixels between the chart and margins.