Skip to content

Commit

Permalink
fix: typo for label.
Browse files Browse the repository at this point in the history
  • Loading branch information
dan12411 committed Jul 15, 2024
1 parent 1ab014a commit 6ded506
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions lib/src/guide/axis/horizontal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,20 @@ List<MarkElement>? renderHorizontalAxis(
style: tick.tickLine!.style));
}
if (tick.haveLabel) {
final babel = LabelElement(
final label = LabelElement(
text: tick.text!,
anchor: Offset(x, y),
defaultAlign: flip ? Alignment.topCenter : Alignment.bottomCenter,
style: tick.label!);

if (tick.haveLabelBackground) {
rst.add(RectElement(
rect: babel.getBlock(),
rect: label.getBlock(),
style: tick.labelBackground!,
));
}

rst.add(babel);
rst.add(label);
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions lib/src/guide/axis/radial.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,20 +92,20 @@ List<MarkElement>? renderRadialAxis(
final labelAlign = radialLabelAlign(featureOffset) * flipSign;
for (var index in labelAnchors.keys) {
final tick = ticks[index];
final babel = LabelElement(
final label = LabelElement(
text: tick.text!,
anchor: labelAnchors[index]!,
defaultAlign: labelAlign,
style: tick.label!);

if (tick.haveLabelBackground) {
rst.add(RectElement(
rect: babel.getBlock(),
rect: label.getBlock(),
style: tick.labelBackground!,
));
}

rst.add(babel);
rst.add(label);
}

return rst.isEmpty ? null : rst;
Expand Down
6 changes: 3 additions & 3 deletions lib/src/guide/axis/vertical.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,20 @@ List<MarkElement>? renderVerticalAxis(
style: tick.tickLine!.style));
}
if (tick.haveLabel) {
final babel = LabelElement(
final label = LabelElement(
text: tick.text!,
anchor: Offset(x, y),
defaultAlign: flip ? Alignment.centerRight : Alignment.centerLeft,
style: tick.label!);

if (tick.haveLabelBackground) {
rst.add(RectElement(
rect: babel.getBlock(),
rect: label.getBlock(),
style: tick.labelBackground!,
));
}

rst.add(babel);
rst.add(label);
}
}
}
Expand Down

0 comments on commit 6ded506

Please sign in to comment.