meo-canvas
    Preparing search index...

    Function linePoints

    • Where each point of a line series sits, as fractions of the plot.

      x = index / (labels - 1)
      y = 1 - value / maxValue
      

      Points span edge to edge, where bars are centred in slots, so the first and last points sit on the plot's edges. A single label has no span to divide, and its point sits at the left edge.

      Parameters

      • labels: number
      • values: readonly number[]
      • maxValue: number

      Returns { x: number; y: number }[]

      • x: number

        Distance across the plot, as a fraction of its width.

      • y: number

        Distance down the plot, as a fraction of its height.

        Inverted from the value: 0 is the top of the plot and 1 the bottom, so a point can be placed without the caller flipping it. A maximum of zero puts every point on the floor rather than dividing by it.