-
Notifications
You must be signed in to change notification settings - Fork 1.3k
TimeSeriesChart domainAxis ViewPort not being accepted #134
Comments
Having a same issue here.
|
any news on this issue? |
This is because of the autoViewport setting in the Axis class (charts_common/lib/src/chart/cartesian/axis/axis.dart). You have to set axis.autoViewport = false in the DateTimeAxisSpec.configure method. This also allows the viewport to be changed dynamically. |
Posting a reply from a similar issue (#287) : This is because of the autoViewport setting in the Axis class (charts_common/lib/src/chart/cartesian/axis/axis.dart). You have to set axis.autoViewport = false in the DateTimeAxisSpec.configure method. This also allows the PanAndZoomBehavior to operate correctly. You're right. So, to fix that, the workaround is to create a class which extends DateTimeAxisSpec of charts_flutter and override the configure method like that : class DateTimeAxisSpecWorkaround extends DateTimeAxisSpec { const DateTimeAxisSpecWorkaround ({ @OverRide |
Example:
The X axis won't show the 3 days but the min (being minimum element from seriesList) and max (being the maximum element from seriesList - in my example, this is set for today's date 18:00).
Diagram is not stretched on 3 days.
The text was updated successfully, but these errors were encountered: