D3.js have reading attradasa?

0

Good afternoon, I'm doing a project in which I use d3.js, for this I have a TSV file with my data, however I have it when I do the following:

console.log(this.maximo) //impressão 1
  acharMaximo
consol.log(this.maximo) //impressão 2

Within the function find maximum I have:

let formatData = (d, _, columns) => {
  ...
}
let render = (error, data)=> {
  ... //acha o valor maximo
  console.log(this.maximo) //impressão 3
  ...
}
d3.tsv(Arquivo.tsv,formatData,render)

I numbered the prints to make it easier to read. When passing the code by deBug, I saw that the code passes through impression 1, it enters the "acharMax", but inside the Max find, it only executes the d3.tsv line, without entering the functions, leaves the function, 2. Only after passing through the main script, it passes in the formatData and render function, and executes the print 3

But this generates a big error in my code, since I need a result found inside the render function. Would anyone know how to help me with this? maybe a fix, or maybe a way to read without using d3.TSV?

    
asked by anonymous 06.02.2018 / 13:24

0 answers