# Generated by detroit
# See https://github.com/bourbonut/detroit/tree/main/api_maker

from functools import partial
from operator import is_not

class scaleBand:
    def __init__(self, content="scaleBand"):
        self.content = content

    def __repr__(self):
        return self.content

    def __str__(self):
        return self.content

    def __call__(self, *args):
        arguments = ", ".join(map(repr, args))
        return f"{self}({arguments})"

    def domain(self, domain=None):
        """
        Auto generated method
        """
        arguments = ", ".join(map(repr, filter(partial(is_not, None), (domain,))))
        return scaleBand(content=f"{self.content}.domain({arguments})")


    def range(self, range=None):
        """
        Examples · Source · If range is specified, sets the scale’s range to the specified
        two-element array of numbers and returns this scale.
        .. code:: javascript

            const x = d3.scaleBand().range([0, 960]);

        If the elements in the given array are not numbers, they will be coerced to numbers. If
        range is not specified, returns the scale’s current range, which defaults to [0, 1].

        See more informations `here <https://d3js.org/d3-scale/band#band_range>`_.
        """
        arguments = ", ".join(map(repr, filter(partial(is_not, None), (range,))))
        return scaleBand(content=f"{self.content}.range({arguments})")


    def rangeRound(self, range=None):
        """
        Examples · Source · Sets the scale’s range to the specified two-element array of
        numbers while also enabling rounding; returns this scale.
        .. code:: javascript

            const x = d3.scaleBand().rangeRound([0, 960]);

        This is a convenience method equivalent to:
        .. code:: javascript

            band.range(range).round(true)

        Rounding is sometimes useful for avoiding antialiasing artifacts, though also consider
        the shape-rendering “crispEdges” styles.

        See more informations `here <https://d3js.org/d3-scale/band#band_rangeRound>`_.
        """
        arguments = ", ".join(map(repr, filter(partial(is_not, None), (range,))))
        return scaleBand(content=f"{self.content}.rangeRound({arguments})")


    def round(self, round=None):
        """
         Round: 
        Examples · Source · If round is specified, enables or disables rounding accordingly and
        returns this scale.
        .. code:: javascript

            const x = d3.scaleBand(["a", "b", "c"], [0, 960]).round(false);

        If round is not specified, returns whether rounding is enabled.
        .. code:: javascript

            x.round() // false

        If rounding is enabled, the start and stop of each band will be integers. Rounding is
        sometimes useful for avoiding antialiasing artifacts, though also consider the
        shape-rendering “crispEdges” styles. Note that if the width of the domain is not a
        multiple of the cardinality of the range, there may be leftover unused space, even
        without padding! Use band.align to specify how the leftover space is distributed.

        See more informations `here <https://d3js.org/d3-scale/band#band_round>`_.
        """
        arguments = ", ".join(map(repr, filter(partial(is_not, None), (round,))))
        return scaleBand(content=f"{self.content}.round({arguments})")


    def paddingInner(self, padding=None):
        """
        Inner padding:0.10
        Examples · Source · If padding is specified, sets the inner padding to the specified
        number which must be less than or equal to 1 and returns this scale.
        .. code:: javascript

            const x = d3.scaleBand(["a", "b", "c"], [0, 960]).paddingInner(0.1);

        If padding is not specified, returns the current inner padding which defaults to 0.
        .. code:: javascript

            x.paddingInner() // 0.1

        The inner padding specifies the proportion of the range that is reserved for blank
        space between bands; a value of 0 means no blank space between bands, and a value of 1
        means a bandwidth of zero.

        See more informations `here <https://d3js.org/d3-scale/band#band_paddingInner>`_.
        """
        arguments = ", ".join(map(repr, filter(partial(is_not, None), (padding,))))
        return scaleBand(content=f"{self.content}.paddingInner({arguments})")


    def paddingOuter(self, padding=None):
        """
        Outer padding:0.10
        Examples · Source · If padding is specified, sets the outer padding to the specified
        number which is typically in the range [0, 1] and returns this scale.
        .. code:: javascript

            const x = d3.scaleBand(["a", "b", "c"], [0, 960]).paddingOuter(0.1);

        If padding is not specified, returns the current outer padding which defaults to 0.
        .. code:: javascript

            x.paddingOuter() // 0.1

        The outer padding specifies the amount of blank space, in terms of multiples of the
        step, to reserve before the first band and after the last band.

        See more informations `here <https://d3js.org/d3-scale/band#band_paddingOuter>`_.
        """
        arguments = ", ".join(map(repr, filter(partial(is_not, None), (padding,))))
        return scaleBand(content=f"{self.content}.paddingOuter({arguments})")


    def padding(self, padding=None):
        """
        Padding:0.10
        Examples · Source · A convenience method for setting the inner and outer padding to the
        same padding value.
        .. code:: javascript

            const x = d3.scaleBand(["a", "b", "c"], [0, 960]).padding(0.1);

        If padding is not specified, returns the inner padding.
        .. code:: javascript

            x.padding() // 0.1


        See more informations `here <https://d3js.org/d3-scale/band#band_padding>`_.
        """
        arguments = ", ".join(map(repr, filter(partial(is_not, None), (padding,))))
        return scaleBand(content=f"{self.content}.padding({arguments})")


    def align(self, align=None):
        """
        Align:0.50
        Examples · Source · If align is specified, sets the alignment to the specified value
        which must be in the range [0, 1], and returns this scale.
        .. code:: javascript

            const x = d3.scaleBand(["a", "b", "c"], [0, 960]).align(0.5);

        If align is not specified, returns the current alignment which defaults to 0.5.
        .. code:: javascript

            x.align() // 0.5

        The alignment specifies how outer padding is distributed in the range. A value of 0.5
        indicates that the outer padding should be equally distributed before the first band
        and after the last band; i.e., the bands should be centered within the range. A value
        of 0 or 1 may be used to shift the bands to one side, say to position them adjacent to
        an axis. For more, see this explainer.

        See more informations `here <https://d3js.org/d3-scale/band#band_align>`_.
        """
        arguments = ", ".join(map(repr, filter(partial(is_not, None), (align,))))
        return scaleBand(content=f"{self.content}.align({arguments})")


    def bandwidth(self):
        """
        Examples · Source · Returns the width of each band.
        .. code:: javascript

            x.bandwidth() // 50.8235294117647


        See more informations `here <https://d3js.org/d3-scale/band#band_bandwidth>`_.
        """
        return scaleBand(content=f"{self.content}.bandwidth()")


    def step(self):
        """
        Examples · Source · Returns the distance between the starts of adjacent bands.
        .. code:: javascript

            x.step() // 63.529411764705884


        See more informations `here <https://d3js.org/d3-scale/band#band_step>`_.
        """
        return scaleBand(content=f"{self.content}.step()")


    def copy(self):
        """
        Examples · Source · Returns an exact copy of this scale.
        .. code:: javascript

            const x1 = d3.scaleBand(["a", "b", "c"], [0, 960]);
            const x2 = x1.copy();

        Changes to this scale will not affect the returned scale, and vice versa.

        See more informations `here <https://d3js.org/d3-scale/band#band_copy>`_.
        """
        return scaleBand(content=f"{self.content}.copy()")


    def nice(self):
        """
        Auto generated method
        """
        return scaleBand(content=f"{self.content}.nice()")

