#[SOLVED] D3 library randomly deciding to not load a data entry, giving rect NaN error

29 messages · Page 1 of 1 (latest)

dawn bough
#

could it be due to some values being string like 15.0?

nimble quartz
#

Oops, didnt even catch that

#

Are decimal fields output as a string?

dawn bough
#

AFAIK, yes

nimble quartz
#

Not the issue

#

Still the same error

#

This is the console log

#

for the output of my data

dawn bough
#

how do you initialize the chart?

nimble quartz
#
// Setup initial bars
    bar = eventContainer.selectAll()
        .data(dataSet)
        .enter()
        .append('rect')
        .call(move)
dawn bough
#

dataSet being your input, right?

nimble quartz
#

yes

dawn bough
#

try to manually provide dataset in its most basic form, see what happens

#

like {type: 1, y: 1, x: 1} etc

nimble quartz
#

Had that as a placeholder before I connected the database to the chart

#

It worked fine

dawn bough
#

then break down your input, this is why screenshots are not allowed in main channels, can't copy paste 🙂

nimble quartz
#

Why would I need to copy paste the errors?

dawn bough
#

try

[{nr: 3, type: 1, x: 0, y: 400, width: 40, durationType: 0, selected: 0, trainingPart: 2, theoreticalX: 0, grabX: 0}]
nimble quartz
#

ah you meant like that, sorry.

dawn bough
#

try minimizing the data or steps until its working

nimble quartz
#

I am so confused

#

It just works

#

now

#

I changed nothing

#

Thanks for the help good person

#

I'm gonna close this now

dawn bough
#

You can add [SOLVED] in thread subject