title: Unable to use Dynamic data into react-native-chart-kit
body: <p>I tried to render fetched data from the firestore and display them into react-native-chart-kit. However, I always face the below error:</p>
  <blockquote>
  <p>invalidNumber: M0,0 L-Infinity,181 L64,181</p>
  </blockquote>
  <p>I got data correctly from the database by this function:</p>
  <pre><code>const getweight = () =&gt;
      firebase
        .firestore()
        .collection(&quot;weights&quot;)
        .orderBy(&quot;time&quot;)
        .where(&quot;user&quot;, &quot;==&quot;, &quot;1&quot;)
    .get()
    .then((querySnapshot) =&gt; {
      let result = [0];
      querySnapshot.forEach((doc) =&gt; {
        result.push(+doc.data().Weight);      
      });
  
      setDateTracker(date);
      if (result.length) {
        setWeighTracker(result);
      }
    });
  </code></pre>
  <p>so, I got the array with the right data.</p>
  <p>Then, I push data to the state below:</p>
  <pre><code>  const [weightTracker, setWeighTracker] = useState([0]);
  </code></pre>
  <p>when I try to display data to the chart like below, I got error of invalid number</p>
  <pre><code>&lt;LineChart
              data={{
                datasets: [
                  {
                    data: weightTracker.map((item) =&gt; {
                      return item.Weight;
                    }),
                  },
                ],
              }}
              width={Dimensions.get(&quot;window&quot;).width} // from react-native
              height={220}
              yAxisLabel=&quot; KG &quot;
              //withVerticalLabels={false}
              chartConfig={{
                backgroundColor: &quot;#e26a00&quot;,
                backgroundGradientFrom: &quot;#fb8c00&quot;,
                backgroundGradientTo: &quot;#ffa726&quot;,
                decimalPlaces: 0, // optional, defaults to 2dp
                color: (opacity = 1) =&gt; `rgba(255, 255, 255, ${opacity})`,
                style: {
                  borderRadius: 1,
                },
              }}
              bezier
              style={{
                marginVertical: 8,
                borderRadius: 16,
              }}
            /&gt;
    
  </code></pre>