Grial-UI-Kit-Support icon indicating copy to clipboard operation
Grial-UI-Kit-Support copied to clipboard

Incorrect Chart Plot Position

Open wesleyjayfrisby opened this issue 10 months ago • 2 comments

Description Category Chart (Bar and Line series) show the points incorrectly

Steps to Reproduce

  1. 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

Media (5)

wesleyjayfrisby avatar Apr 09 '24 12:04 wesleyjayfrisby

Update: Upgraded project to .net 8 and packages -> UxDivers.GrialMaui (4.2.110) and UXDivers.GrialMaui.Maps (4.1.105) and issue persists

wesleyjayfrisby avatar Apr 11 '24 14:04 wesleyjayfrisby

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).

dirivero avatar May 02 '24 14:05 dirivero