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

from functools import partial
from operator import is_not

class scalePoint:
    def __init__(self, content="scalePoint"):
        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 scalePoint(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.scalePoint().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/point#point_range>`_.
        """
        arguments = ", ".join(map(repr, filter(partial(is_not, None), (range,))))
        return scalePoint(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.scalePoint().rangeRound([0, 960]);

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

            point.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/point#point_rangeRound>`_.
        """
        arguments = ", ".join(map(repr, filter(partial(is_not, None), (range,))))
        return scalePoint(content=f"{self.content}.rangeRound({arguments})")


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

            const x = d3.scalePoint(["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 position of each point 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 point.align to specify how the leftover space is distributed.

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


    def padding(self, padding=None):
        """
        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].
        .. code:: javascript

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

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

            x.padding() // 0.1

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

        See more informations `here <https://d3js.org/d3-scale/point#point_padding>`_.
        """
        arguments = ", ".join(map(repr, filter(partial(is_not, None), (padding,))))
        return scalePoint(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].
        .. code:: javascript

            const x = d3.scalePoint(["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 any leftover unused space in the range is distributed. A
        value of 0.5 indicates that the leftover space should be equally distributed before the
        first point and after the last point; i.e., the points should be centered within the
        range. A value of 0 or 1 may be used to shift the points to one side, say to position
        them adjacent to an axis.

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


    def bandwidth(self):
        """
        Examples · Source · Returns zero.

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


    def step(self):
        """
        Examples · Source · Returns the distance between adjacent points.

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


    def copy(self):
        """
        Examples · Source · Returns an exact copy of this scale. Changes to this scale will not
        affect the returned scale, and vice versa.

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


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

