React-native-chart-kit: The graph is not accurate

Created on 3 Jan 2019  路  7Comments  路  Source: indiespirit/react-native-chart-kit

The graph is not accurate
screenshot 2018-11-29 at 15 31 55

This is the dataset
screenshot 2018-11-29 at 15 32 05

1st array is the red line,
2nd is the green line

_Originally posted by @BrightonWeBill in https://github.com/indiespirit/react-native-chart-kit/issues/37#issuecomment-442839205_

Most helpful comment

@mrfambo thanks for the quick response, note: if i used the example dataset for multiple graph lines :

const data = { labels: ['January', 'February', 'March', 'April', 'May', 'June'], datasets: [{ data: [ 50, 20, 2, 86, 71, 100 ] },{ data: [ 20, 10, 4, 56, 87, 90 ] },{ data: [ 30, 90, 67, 54, 10, 2 ] }] }

then it works, but when trying with the above datasets it doesnt work

All 7 comments

The graph is not accurate
captura de tela 2019-01-03 as 01 43 05
captura de tela 2019-01-03 as 01 44 41

Hi @medexsaude have you found the solution?

@medexsaude Are you trying to get multiple graph lines?

@medexsaude @rzdev If you both have any repository which i can clone and look into the details, it will be great. Otherwise please provide a reproduction of your issue somewhere. When i worked for multiple lines, i had the required results. I would love to solve if there is any issue i can work on.

@mrfambo i have created a simple application to replicate the issue, please clone the project here https://github.com/rzdev/line_chart

The chart data consists of 3 dataset :
const data = { labels: ['January', 'February', 'March', 'April', 'May', 'June'], datasets: [ { data: [ 50, 50, 50, 50, 50, 50 ] }, { data: [ 20, 20, 20, 20, 20, 20 ] }, { data: [ 60, 60, 60, 60, 60, 60 ] }] };

But it only show 1 line:

@rzdev Looking to it, will respond as soon as possible.

@mrfambo thanks for the quick response, note: if i used the example dataset for multiple graph lines :

const data = { labels: ['January', 'February', 'March', 'April', 'May', 'June'], datasets: [{ data: [ 50, 20, 2, 86, 71, 100 ] },{ data: [ 20, 10, 4, 56, 87, 90 ] },{ data: [ 30, 90, 67, 54, 10, 2 ] }] }

then it works, but when trying with the above datasets it doesnt work

Was this page helpful?
0 / 5 - 0 ratings

Related issues

violabg picture violabg  路  6Comments

azui007 picture azui007  路  6Comments

ighormartins picture ighormartins  路  3Comments

carlojesuscponti picture carlojesuscponti  路  6Comments

trungtin2202 picture trungtin2202  路  3Comments