indratrisnar / d_chart

Apache License 2.0
32 stars 18 forks source link

BoxConstraints has NaN values in minHeight and maxHeight #36

Closed jesselpereira closed 33 minutes ago

jesselpereira commented 4 hours ago

image

I get this whenever my values ​​are zero.

           Expanded(
              child: AspectRatio(
                aspectRatio: 16 / 9,
                child: DChartBarCustom(
                  listData: [
                    DChartBarDataCustom(
                      value: 0,
                      label: 'entradas',
                      color: kGreen500,
                    ),
                    DChartBarDataCustom(
                      value: 0,
                      label: 'saídas',
                      color: kRed500,
                    ),
                  ],
                ),
              ),
            ),
indratrisnar commented 3 hours ago

I'm trying to find a solution for this issue, meanwhile you can try the solution from here: https://stackoverflow.com/questions/74071645/fluttererror-boxconstraints-has-nan-values-in-minheight-and-maxheight

indratrisnar commented 2 hours ago

try first solution with github package version:

if this way solve this issue, i will update d_chart package with new version.

Note: when you add github package version, you also have to check to your flutter local pub cache, is there any change in d_chart package

indratrisnar commented 2 hours ago

for specific commit reference: image

jesselpereira commented 1 hour ago

try first solution with github package version:

  • use github package, like this: image
  • restart / re-run again your code

if this way solve this issue, i will update d_chart package with new version.

Note: when you add github package version, you also have to check to your flutter local pub cache, is there any change in d_chart package

Thank you very much, it worked perfectly. The error is gone.

image image
indratrisnar commented 33 minutes ago

now you can use d_chart 2.9.1 version on pub.dev to solve this issue