Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

129
Views
d3.select().append().attr().style() devuelve TypeError: no se pueden leer las propiedades de nulo (leyendo 'estilo')

Dentro de ngOnInit de un componente angular, tenga el siguiente código:

 var root = d3.select('#chart') .append('svg') .attr({ 'width': width, 'height': height, }) .style('border', '1px solid black');

El archivo de plantilla vinculado tiene simplemente: <div id="chart"></div>

Sin embargo, una vez cargado en la página, obtenga angular.js?17fa:15635 TypeError: Cannot read properties of null (reading 'style') , apuntando a la línea .style .

El d3 ya verificado se importa correctamente, la plantilla muestra elementos de lo contrario y puede usar el selector d3 (en otros ejemplos).

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!