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

146
Views
Falta el gráfico de líneas de material de Google getChartLayoutInterface(), ¿cómo agregar imágenes a la línea de datos?

Tengo un gráfico de líneas de material de Google y necesito obtener la posición X e Y de algún punto de datos en el diseño para agregar una imagen al área del gráfico ... Pero la página web en el navegador dice:

 chart.getChartLayoutInterface is not a function

Encontré que no hay ningún método getChartLayoutInterface() en los gráficos de materiales de Google disponibles. Si cambio este código al código de "gráfico clásico" (comentario/descomentario) en el código, mi ejemplo funciona...

Ahí está mi código:

 var container = document.getElementById('chart_div'); var chart = new google.charts.Line(container); //If I Uncomment this line, google uses old "Classic" line graphs and that works... //var chart = new google.visualization.LineChart(container); google.visualization.events.addListener(chart, 'ready', function () { var layout = chart.getChartLayoutInterface(); var xPos = layout.getXLocation(data.getValue(210, 0)); var yPos = layout.getYLocation(data.getValue(210, 2)); var GameEvent = container.appendChild(document.createElement('img')); GameEvent.src = '/nuke.png'; GameEvent.style.top = (yPos -0) + 'px'; GameEvent.style.left = (xPos) + 'px'; } );

Pero necesito usar gráficos de materiales (funciona mejor en Google Chromecast como renderizador).

¿Puedes tener alguna solución para mí?

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!