MPAndroidChart icon indicating copy to clipboard operation
MPAndroidChart copied to clipboard

line not drawing between 2 points if I pas NAN value in an entry.

Open shwetaBorade opened this issue 1 year ago • 0 comments

I have added NAN value for 26sep but it is not loading lines between 27th and 28th sep. Please check attach video image

Code:

        selectedDomains.forEachIndexed { domainIndex, _ ->
            entity3 = arrayListOf()
            chartList.forEachIndexed { index, it ->
                val domain =
                    it.graphDBDatas.filter { data -> data.childDomainId == selectedDomains[domainIndex].id }
                if (domain.isNotEmpty()) {
                    if (domain[0].score != null) {
                        entity3.add(
                            Entry(
                                index.toFloat(), domain[0].score?.toFloat() ?: 0f
                            )
                        )
                    } else {
                        entity3.add(Entry(index.toFloat(), Float.NaN))
                    }
                }
            }

shwetaBorade avatar Oct 04 '24 12:10 shwetaBorade