Skip to content

Commit 3e0d98d

Browse files
committed
fixed bug with labels not correctly applying formatting.
1 parent ff2ce2d commit 3e0d98d

4 files changed

Lines changed: 5 additions & 11 deletions

File tree

NuGet/Package.Forms.nuspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package >
33
<metadata>
44
<id>Microcharts.Forms</id>
5-
<version>0.9.5.5</version>
5+
<version>0.9.5.6</version>
66
<title>Microcharts for Xamarin.Forms</title>
77
<authors>Aloïs Deniel, Ed Lomonaco</authors>
88
<owners>Aloïs Deniel, Ed Lomonaco</owners>
@@ -14,7 +14,7 @@
1414
<tags>xamarin.forms chart skia</tags>
1515
<dependencies>
1616
<group targetFramework="netstandard2.0">
17-
<dependency id="Microcharts" version="0.9.5.5" />
17+
<dependency id="Microcharts" version="0.9.5.6" />
1818
<dependency id="SkiaSharp" version="2.80.1" />
1919
<dependency id="SkiaSharp.Views.Forms" version="2.80.1" />
2020
<dependency id="System.ValueTuple" version="4.5.0" />

NuGet/Package.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package >
33
<metadata>
44
<id>Microcharts</id>
5-
<version>0.9.5.5</version>
5+
<version>0.9.5.6</version>
66
<title>Microcharts</title>
77
<authors>Aloïs Deniel, Ed Lomonaco</authors>
88
<owners>Aloïs Deniel, Ed Lomonaco</owners>

Sources/Microcharts/Charts/PointChart.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,10 +280,7 @@ protected void DrawLabels(SKCanvas canvas, string[] texts, SKPoint[] points, SKR
280280
canvas.Translate(point.X - (bounds.Width / 2), y);
281281
}
282282

283-
var rs = new RichString(text)
284-
.FontSize(LabelTextSize)
285-
.TextColor(colors[i])
286-
.TextDirection(TextDirection);
283+
var rs = new RichString().Add(text, fontSize: LabelTextSize, textColor: colors[i], textDirection: TextDirection);
287284

288285
rs.Paint(canvas, new TextPaintOptions
289286
{

Sources/Microcharts/Extensions/CanvasExtensions.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,7 @@ public static void DrawCaptionLabels(this SKCanvas canvas, string label, SKColor
3939

4040
var y = point.Y - ((bounds.Top + bounds.Bottom) / 2) - space;
4141

42-
var rs = new RichString(text)
43-
.FontSize(textSize)
44-
.TextColor(labelColor)
45-
.TextDirection(textDirection);
42+
var rs = new RichString().Add(text, fontSize: textSize, textColor: labelColor, textDirection: textDirection);
4643

4744
rs.Paint(canvas, new SKPoint(point.X, y), new TextPaintOptions
4845
{

0 commit comments

Comments
 (0)