Grial-UI-Kit-Support
Grial-UI-Kit-Support copied to clipboard
Incorrect Chart Plot Position
Description Category Chart (Bar and Line series) show the points incorrectly
Steps to Reproduce
-
Create a CategoryChart with the following xaml and data: <grial:CategoryChart Margin="-16,0,-16,0" AxisLinesColor="#E0E3EC" BackgroundColor="{ DynamicResource BasePageColor }" CategoryLabels="{ Binding Data.Labels }" DisplayLabels="True" LabelFontColor="{ DynamicResource BaseLightTextColor }" DisplayReferenceAxis="True" AxisFontColor="{ DynamicResource BaseLightTextColor }" AxisFontMargin="0" DisplayReferenceGridLines="True" DisplayValues="True" DisplayValuesGridLines="True" GridDashPattern="0" HasSelection="False" HeightRequest="300" LabelFontSize="10">
<grial:LineSeries CurveFactor=".6" FillPoints="False" IsStacked="False" Title="Move Ins" ItemsSource="{ Binding Data.MoveIns }" PointSize="3" LineStrokeSize="1.5" Color="{ DynamicResource OkColor }" />
<grial:LineSeries CurveFactor=".6" FillPoints="False" IsStacked="False" ItemsSource="{ Binding Data.MoveOuts }" PointSize="3" Title="Move Outs" LineStrokeSize="1.5" Color="{ DynamicResource ErrorColor }" />
</grial:CategoryChart>
"Data": { "Labels": [ "Nov-2023", "Dec-2023", "Jan-2024", "Feb-2024", "Mar-2024", "Apr-2024" ], "MoveIns": [ 1, 0, 3, 3, 0, 0 ], "MoveOuts": [ 1, 4, 2, 0, 1, 0 ] }
Expected Behavior
If the value is 3 the dot should be exactly on 3 not above it
Actual Behavior
The dot is above the 3 even though the value is exactly 3
Basic Information
- Version with issue (.NET Maui or Xamarin.Forms?): .Net Maui
- IDE: Visual Studio 2022
- Platform Target Frameworks:
- Android: 13 -> Edit: Upgraded to 14 and same issue
- Nuget Packages: UXDivers.Grial.Maui (4.0.92) --> Edit: same issue on UXDivers.Grial.Maui (4.2.110)
- Affected Devices: S22 Ultra running android 14
Screenshots
Update: Upgraded project to .net 8 and packages -> UxDivers.GrialMaui (4.2.110) and UXDivers.GrialMaui.Maps (4.1.105) and issue persists
This should be fixed in version 4.2.114. We also included two new properties to control how the reference axis labels are shown:
-
ReferenceCount
(defines the number of labels in the reference axis) -
ReferenceValueFormatter
(to turn numbers into any string format you may want to display in that axis).