Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Kebsi

User
  • Registriert

  • Letzter Besuch

  1. Guten Tag, möchte gerne als kleine Nebenarbeit für meinen Vater ein Liniendiagramm aus Werten einer Datenbank erstellen. Mittels PHP haben ich bereits die Datenbank in meinem Skript eingebunden. Datenbank abfrage ist auch bereits gemacht und bekomm die Daten in ein Array zurück. datum = Datetime wert = Double Array ( [0] => 2018-12-27 08:00:00 [1] => 2018-12-27 08:05:00 [2] => 2018-12-27 08:10:00 [3] => 2018-12-27 08:15:00 ) Array ( [0] => 5 [1] => 6.2 [2] => 7.6 [3] => 8.5 ) Beim ausführen des Skriptes funktioniert alles. <?php // content="text/plain; charset=utf-8" require_once ('src/jpgraph.php'); require_once ('src/jpgraph_line.php'); require_once ('src/jpgraph_date.php'); //DB $db = mysqli_connect ( "localhost" , "root" , "", "test" ) or die("Keine Verbindung zur Datenbank!"); $sql = "SELECT * FROM temp"; $result = mysqli_query($db, $sql) OR die(mysql_error()); //Array $i=0; while ($array=mysqli_fetch_array($result)) { $datum[$i]= strtotime($array[0]); $betrag[$i]=$array[1]; $i++; //Graph erstellen $graph = new Graph(600,400); $graph->SetScale('datlin',5,20); $graph->xaxis->scale->SetDateFormat('d/m H:i'); $lineplot = new LinePlot($betrag, $datum); $lineplot->value-> Show(); $graph->xaxis->SetLabelAngle(90); $graph->SetMargin(40,40,30,130); $graph->legend->SetFrameWeight(1); $graph->Add($lineplot); // Graph ausgeben $graph->Stroke(); Doch wenn ich jetzt neue Daten hinzufüge, z.B. mit 1 Tag unterschied dann verzieht sich das Diagramm extrem Kann man das Diagramm auf einen Tag begrenzen? Oder dass es jeden Tag ein neues erstellt? Vielen Dank für eure Hilfe!

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.