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

211
Views
How can I convert my code to get real time graph which get changes in different time interval

This is my code of dynamic graph, I am using apex chart library,

import React, { Component, useEffect, useState } from "react";

import Chart from "react-apexcharts";

import axios from "axios";

const App = () => {

useEffect(() => {

axios
  .get(`https://api.thingspeak.com/channels/1285233/fields/1.json`)
  .then((res) => {
    console.log("RESPONSE", res.data.feeds);
    setData(res.data);
  })
  .catch((error) => {
  });
}, []);


const [data, setData] = useState({});

let series = data.feeds?.map((x) => x.entry_id);
let xaxisdata = []
for(let i = 0; i >= 200 ; i++)
{
  xaxisdata.push(i)
}
console.log("SERIES", series);
const options = {
  chart: {
    id: "basic-bar",
  },
  xaxis: {
    categories: xaxisdata,
  },
  series: [
    {
      name: "series-1",
      data: series,
    },
  // {
  //   name: "series-2",
  //   data: [10, 80, 60, 75, 35, 72, 8, 42],
  // },
],
};


return (
  <div className="app">
  <div className="row">
    <div className="mixed-chart">
      <div className="chartPosition">
      <Chart
         options={options}
        series={options.series}
        type="line"
        width="1000"
      />
      </div>
    </div>
  </div>
</div>
);
};

export default App;

I want to convert my graph into real time changing graph just like the CPU usage graph in task manager it get changes in different time interval. I want that one graph

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!