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

317
Views
Estoy tratando de usar un archivo json para trazar con react-plotly.js pero no funciona
import React, { Component } from "react"; import Plot from "react-plotly.js"; import PostData from "./EngineData3D.json"; class EngineData3D extends Component { PostData = this.PostDataPostData.map((postDetail, index) => { return <div> x: {postDetail.AFR} y:{postDetail.engine_load} </div> } ) render() { return ( <div> <Plot /> data={ [ { type: 'bar', mode: 'lines', x: this.PostData(this.state.postDetail.AFR)['x'], y: this.PostData(this.state.postDetail.engine_load)['y'], marker: { color: 'pink' } } ] } layout ={{ width: 1000, height: 500, title: 'Engine Data' }} </div> ) } } export default EngineData3D

Y mi nombre de archivo Json es EngineData3D.json está en la misma carpeta con el archivo .js.

Estoy tratando de usar los datos en el archivo .json para visualizar datos para tener una trama usando react-plotly.js

Soy nuevo con plotly, les agradecería que me ayuden a corregir mi código .js.

about 4 years ago · Santiago Gelvez
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!