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

241
Views
Loading data from file

Im trying to load informations from data.txt which has this files included.

<script>
      google.charts.load('current', {'packages':['corechart']});
      google.charts.setOnLoadCallback(drawChart);

      function drawChart() {
        var data = google.visualization.arrayToDataTable([
          ['Datum', 'E5 (SUPER)', 'E10 (SUPER)', 'B7 (DIESEL)'],
          ['01.11.2021', 1.12, 1.49, 1.50],
          ['02.11.2021', 1.18, 1.52, 1.55],
          ['03.11.2021', 1.22, 1.55, 1.70],
          ['04.11.2021', 1.25, 1.30, 1.75],
          ['05.11.2021', 1.26, 1.61, 1.79],
          ['06.11.2021', 1.30, 1.70, 1.85],
          ['07.11.2021', 1.40, 1.81, 1.95],
          ['08.11.2021', 1.45, 1.85, 1.99],
          ['09.11.2021', 1.53, 1.90, 2.00]
        ]);

        var options = {
          title: 'Preisentwicklung',
          hAxis: {title: '',  titleTextStyle: {color: '#333'}},
          vAxis: {minValue: 1.0}
        };

        var chart = new google.visualization.AreaChart(document.getElementById('chart_div'));
        chart.draw(data, options);
      }
</script>

Line 8-16 is in data.txt - What would be the best to replace it from the original file, and tell the script to load the information from data.txt?

I've tried something with from Google:

var url = "data.txt";
  var locations = JSON.parse("[" + this.responseText + "]");

But uff, i cant get it working

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!