round property

bool get round

Whether or not the scale currently rounds the edges of the bands.

final x = ScalePoint(
  domain: ["a", "b", "c"],
  range: [0, 960],
)..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 align to specify how the leftover space is distributed.

Implementation

bool get round => _round;
set round (bool round)

Implementation

set round(bool round) {
  _round = round;
  _rescale();
}