PSD-Tutorials.de
Forum für Design, Fotografie & Bildbearbeitung
Tutkit
Agentur
Hilfe
Kontakt
Start
Forum
Aktuelles
Besonderer Inhalt
Foren durchsuchen
Tutorials
News
Anmelden
Kostenlos registrieren
Aktuelles
Suche
Suche
Nur Titel durchsuchen
Von:
Menü
Anmelden
Kostenlos registrieren
App installieren
Installieren
JavaScript ist deaktiviert. Für eine bessere Darstellung aktiviere bitte JavaScript in deinem Browser, bevor du fortfährst.
Du verwendest einen veralteten Browser. Es ist möglich, dass diese oder andere Websites nicht korrekt angezeigt werden.
Du solltest ein Upgrade durchführen oder einen
alternativen Browser
verwenden.
Antworten auf deine Fragen:
Neues Thema erstellen
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
PHP, Javascript, jQuery, Ajax, nodeJS, MySQL...
Tutorial Liniendiagramm
Beitrag
<blockquote data-quote="redbull2906" data-source="post: 1459594" data-attributes="member: 121682"><p><strong>AW: Tutorial Liniendiagramm</strong></p><p></p><p>ach ja natrülich - hatte die Glaskugel vergessen <img src="/styles/default/xenforo/smilies/zwinker.gif" class="smilie" loading="lazy" alt=";)" title="Wink ;)" data-shortname=";)" /></p><p> </p><p>Hier mal der gesamte Code</p><p> </p><p>[PHP]</p><p><?php</p><p>//include charts.php to access the SendChartData function</p><p>include "charts.php";</p><p>//change the chart to a bar chart</p><p>$chart [ 'chart_type' ] = "line";</p><p>//the chart's data</p><p>$chart [ 'chart_data' ] = array ( array ( "", "1", "2", "3", "4", '5', '6', '7', '8', '9', '10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34' ));</p><p>include('var.inc.php');</p><p>$abfrage ="SELECT id, vorname, nachname FROM user ORDER BY user.id";</p><p>$sql = mysql_query($abfrage);</p><p>$i=1;</p><p>while($row=mysql_fetch_array($sql)){</p><p> $data['chart_data'][] = array($row['vorname']);</p><p> $id = $row['id'];</p><p>$platz = "SELECT platz FROM verlauf WHERE tipper_id = '$id'";</p><p> $platzsql = mysql_query($platz);</p><p> while($p = mysql_fetch_array($platzsql)){</p><p> $data['chart_data'][$i][] = $p['platz'];</p><p> }</p><p>$i++;</p><p>}</p><p>// X-Achsen beschriftung (Spieltag) </p><p>//make category labels green</p><p>//skip every other label</p><p>$chart [ 'axis_category' ] = array ( 'skip' => 0,</p><p> 'font' => "Arial", </p><p> 'bold' => true, </p><p> 'size' => 10, </p><p> 'color' => "88FF00", </p><p> 'alpha' => 75,</p><p> 'orientation' => "horizontal"</p><p> ); </p><p> </p><p>//Achse Platz</p><p>$chart [ 'axis_value' ] = array ( 'steps' => 26, </p><p> 'font' => "Arial", </p><p> 'bold' => true, </p><p> 'size' => 10, </p><p> 'color' => "FFFFFF", </p><p> 'alpha' => 75,</p><p> );</p><p>//adjust the chart's background color </p><p>$chart [ 'chart_rect' ] = array ( 'negative_color'=>"FFFFFF", 'negative_alpha'=>75 ); </p><p>//override the value-axis labels to make them positive numbers</p><p>$chart [ 'axis_value_text' ] = array ( '',"25", "24", "23", "22", "21",'20','19','18','17','16','15','14','13','12','11','10','9','8','7','6','5','4','3','2','1', ''); </p><p>//Legende links</p><p>$chart [ 'legend_label' ] = array ( 'layout' => 'vertical',</p><p> 'font' => 'Arial', </p><p> 'bold' => true, </p><p> 'size' => 11, </p><p> 'color' => 'FFFFFF', </p><p> 'alpha' => 75</p><p> ); </p><p>$chart[ 'legend_rect' ] = array ( 'x'=>15, 'y'=>15, 'width'=>150, 'height'=>75, 'margin'=>10, 'fill_color'=>"000000", 'fill_alpha'=>5, 'line_color'=>"000000", 'line_alpha'=>20, 'line_thickness'=>0 );</p><p>//Farbe der Linien</p><p>//set series color to white and black</p><p>///$chart [ 'series_color' ] = array ( "FFFFFF", "000000" );</p><p>//send the new chart data to the charts.swf flash file</p><p>SendChartData ( $chart );</p><p></p><p>?></p><p>[/PHP]</p><p> </p><p>Manuell läuft es ja bei mir auch aber ich möchte die Daten ja dyniamsich da rein haben</p></blockquote><p></p>
[QUOTE="redbull2906, post: 1459594, member: 121682"] [b]AW: Tutorial Liniendiagramm[/b] ach ja natrülich - hatte die Glaskugel vergessen ;) Hier mal der gesamte Code [PHP] <?php //include charts.php to access the SendChartData function include "charts.php"; //change the chart to a bar chart $chart [ 'chart_type' ] = "line"; //the chart's data $chart [ 'chart_data' ] = array ( array ( "", "1", "2", "3", "4", '5', '6', '7', '8', '9', '10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34' )); include('var.inc.php'); $abfrage ="SELECT id, vorname, nachname FROM user ORDER BY user.id"; $sql = mysql_query($abfrage); $i=1; while($row=mysql_fetch_array($sql)){ $data['chart_data'][] = array($row['vorname']); $id = $row['id']; $platz = "SELECT platz FROM verlauf WHERE tipper_id = '$id'"; $platzsql = mysql_query($platz); while($p = mysql_fetch_array($platzsql)){ $data['chart_data'][$i][] = $p['platz']; } $i++; } // X-Achsen beschriftung (Spieltag) //make category labels green //skip every other label $chart [ 'axis_category' ] = array ( 'skip' => 0, 'font' => "Arial", 'bold' => true, 'size' => 10, 'color' => "88FF00", 'alpha' => 75, 'orientation' => "horizontal" ); //Achse Platz $chart [ 'axis_value' ] = array ( 'steps' => 26, 'font' => "Arial", 'bold' => true, 'size' => 10, 'color' => "FFFFFF", 'alpha' => 75, ); //adjust the chart's background color $chart [ 'chart_rect' ] = array ( 'negative_color'=>"FFFFFF", 'negative_alpha'=>75 ); //override the value-axis labels to make them positive numbers $chart [ 'axis_value_text' ] = array ( '',"25", "24", "23", "22", "21",'20','19','18','17','16','15','14','13','12','11','10','9','8','7','6','5','4','3','2','1', ''); //Legende links $chart [ 'legend_label' ] = array ( 'layout' => 'vertical', 'font' => 'Arial', 'bold' => true, 'size' => 11, 'color' => 'FFFFFF', 'alpha' => 75 ); $chart[ 'legend_rect' ] = array ( 'x'=>15, 'y'=>15, 'width'=>150, 'height'=>75, 'margin'=>10, 'fill_color'=>"000000", 'fill_alpha'=>5, 'line_color'=>"000000", 'line_alpha'=>20, 'line_thickness'=>0 ); //Farbe der Linien //set series color to white and black ///$chart [ 'series_color' ] = array ( "FFFFFF", "000000" ); //send the new chart data to the charts.swf flash file SendChartData ( $chart ); ?> [/PHP] Manuell läuft es ja bei mir auch aber ich möchte die Daten ja dyniamsich da rein haben [/QUOTE]
Bilder bitte
hier hochladen
und danach über das Bild-Icon (Direktlink vorher kopieren) platzieren.
Zitate einfügen…
Authentifizierung
Wenn ▲ = 5, ▼ = 2 und ■ = 7, was ist ▲ × ▼ + ■?
Antworten
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
PHP, Javascript, jQuery, Ajax, nodeJS, MySQL...
Tutorial Liniendiagramm
Oben