Skip to content
Snippets Groups Projects
Commit a0d4c379 authored by Ivan Condric's avatar Ivan Condric
Browse files

final

parent 0390ed61
No related branches found
No related tags found
No related merge requests found
Die Idee war ähnlich wie die Übung 3 Aufgabe4 flot zu benutzen um die Graphen darzustellen.
Leider ist es uns nicht gelungen aus unserer Csv Datei Hashtags_Aufgabe5_fertig.csv die nötigen Daten für Javacript vorzubereiten wesegen der folgende Code nur Aufgabe 4 wiederspiegelt die wir aber mit Excell schöner darstellt bekommen haben
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Aufgabe5</title>
</head> <body>
<div id="barchart"
style="width:6000px; height:400px">
</div>
<div id="flot-placeholder" style="width:550px;height:300px;margin:0 auto"></div>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.js"> </script>
<script>
var daten = [[1,"01.Jan"],[2,"02"],[3,"03"],[4,"04"],[5,"05"],[6,"06"],[7,"07"],[8,"08"],[9,"09"],[10,"10"],[11,"11"],[12,"12"],[13,"13"],[14,"14"],[15,"15"],[16,"16"],[17,"17"],[18,"18"],[19,"19"],[20,"20"],[21,"21"],[22,"22"],[23,"23"],[24,"24"],[25,"25"],[26,"26"],[27,"27"],[28,"28"],[29,"29"],[30,"30"],[31,"31"],[32,"01.Feb"],[33,"02"],[34,"03"],[35,"04"],[36,"05"],[37,"06"],[38,"07"],[39,"08"],[40,"09"],[41,"10"],[42,"11"],[43,"12"],[44,"13"],[45,"14"],[46,"15"],[47,"16"],[48,"17"],[49,"18"],[50,"19"],[51,"20"],[52,"21"],[53,"22"],[54,"23"],[55,"24"],[56,"25"],[57,"26"],[58,"27"],[59,"28"],[60,"29"],[61,"01.Maer"],[62,"02"],[63,"03"],[64,"04"],[65,"05"],[66,"06"],[67,"07"],[68,"08"],[69,"09"],[70,"10"],[71,"11"],[72,"12"],[73,"13"],[74,"14"],[75,"15"],[76,"16"],[77,"17"],[78,"18"],[79,"19"],[80,"20"],[81,"21"],[82,"22"],[83,"23"],[84,"24"],[85,"25"],[86,"26"],[87,"27"],[88,"28"],[89,"29"],[90,"30"],[91,"31"],[92,"01.Apr"],[93,"02"],[94,"03"],[95,"04"],[96,"05"],[97,"06"],[98,"07"],[99,"08"],[100,"09"],[101,"10"],[102,"11"],[103,"12"],[104,"13"],[105,"14"],[106,"15"],[107,"16"],[108,"17"],[109,"18"],[110,"19"],[111,"20"],[112,"21"],[113,"22"],[114,"23"],[115,"24"],[116,"25"],[117,"26"],[118,"27"],[119,"28"],[120,"29"],[121,"30"],[122,"01.Mai"],[123,"02"],[124,"03"],[125,"04"],[126,"05"],[127,"06"],[128,"07"],[129,"08"],[130,"09"],[131,"10"],[132,"11"],[133,"12"],[134,"13"],[135,"14"],[136,"15"],[137,"16"],[138,"17"],[139,"18"],[140,"19"],[141,"20"],[142,"21"],[143,"22"],[144,"23"],[145,"24"],[146,"25"],[147,"26"],[148,"27"],[149,"28"],[150,"29"],[151,"30"],[152,"31"],[153,"01.Jun"],[154,"02"],[155,"03"],[156,"04"],[157,"05"],[158,"06"],[159,"07"],[160,"08"],[161,"09"],[162,"10"],[163,"11"],[164,"12"],[165,"13"],[166,"14"],[167,"15"],[168,"16"],[169,"17"],[170,"18"],[171,"19"],[172,"20"],[173,"21"],[174,"22"],[175,"23"],[176,"24"],[177,"25"],[178,"26"],[179,"27"],[180,"28"],[181,"29"],[182,"30"],[183,"01.Jul"],[184,"02"],[185,"03"],[186,"04"],[187,"05"],[188,"06"],[189,"07"],[190,"08"],[191,"09"],[192,"10"],[193,"11"],[194,"12"],[195,"13"],[196,"14"],[197,"15"],[198,"16"],[199,"17"],[200,"18"],[201,"19"],[202,"20"],[203,"21"],[204,"22"],[205,"23"],[206,"24"],[207,"25"],[208,"26"],[209,"27"],[210,"28"],[211,"29"],[212,"30"],[213,"31"],[214,"01.Aug"],[215,"02"],[216,"03"],[217,"04"],[218,"05"],[219,"06"],[220,"07"],[221,"08"],[222,"09"],[223,"10"],[224,"11"],[225,"12"],[226,"13"],[227,"14"],[228,"15"],[229,"16"],[230,"17"],[231,"18"],[232,"19"],[233,"20"],[234,"21"],[235,"22"],[236,"23"],[237,"24"],[238,"25"],[239,"26"],[240,"27"],[241,"28"],[242,"29"],[243,"30"],[244,"31"],[245,"01.Sep"],[246,"02"],[247,"03"],[248,"04"],[249,"05"],[250,"06"],[251,"07"],[252,"08"],[253,"09"],[254,"10"],[255,"11"],[256,"12"],[257,"13"],[258,"14"],[259,"15"],[260,"16"],[261,"17"],[262,"18"],[263,"19"],[264,"20"],[265,"21"],[266,"22"],[267,"23"],[268,"24"],[269,"25"],[270,"26"],[271,"27"],[272,"28"],[273,"29"],[274,"30"],[275,"01.Okt"],[276,"02.Okt"],[277,"03.Okt"],[278,"04.Okt"],[279,"05.Okt"],[280,"06.Okt"],[281,"07.Okt"],[282,"08.Okt"],[283,"09.Okt"],[284,"10.Okt"],[285,"11.Okt"],[286,"12.Okt"],[287,"13.Okt"],[288,"14.Okt"],[289,"15.Okt"],[290,"16.Okt"],[291,"17.Okt"],[292,"18.Okt"],[293,"19.Okt"],[294,"20.Okt"],[295,"21.Okt"],[296,"22.Okt"],[297,"23.Okt"],[298,"24.Okt"],[299,"25.Okt"],[300,"26.Okt"],[301,"27.Okt"],[302,"28.Okt"],[303,"29.Okt"],[304,"30.Okt"],[305,"31.Okt"],[306,"01.Nov"],[307,"02.Nov"],[308,"03.Nov"],[309,"04.Nov"],[310,"05.Nov"],[311,"06.Nov"],[312,"07.Nov"],[313,"08.Nov"],[314,"09.Nov"],[315,"10.Nov"],[316,"11.Nov"],[317,"12.Nov"],[318,"13.Nov"],[319,"14.Nov"],[320,"15.Nov"],[321,"16.Nov"],[322,"17.Nov"],[323,"18.Nov"],[324,"19.Nov"],[325,"20.Nov"],[326,"21.Nov"],[327,"22.Nov"],[328,"23.Nov"],[329,"24.Nov"],[330,"25.Nov"],[331,"26.Nov"],[332,"27.Nov"],[333,"28.Nov"],[334,"29.Nov"],[335,"30.Nov"],[336,"01.Dez"],[337,"02.Dez"],[338,"03.Dez"],[339,"04.Dez"],[340,"05.Dez"],[341,"06.Dez"],[342,"07.Dez"],[343,"08.Dez"],[344,"09.Dez"],[345,"10.Dez"],[346,"11.Dez"],[347,"12.Dez"],[348,"13.Dez"],[349,"14.Dez"],[350,"15.Dez"],[351,"16.Dez"],[352,"17.Dez"],[353,"18.Dez"],[354,"19.Dez"],[355,"20.Dez"],[356,"21.Dez"],[357,"22.Dez"],[358,"23.Dez"],[359,"24.Dez"],[360,"25.Dez"],[361,"26.Dez"],[362,"27.Dez"],[363,"28.Dez"],[364,"29.Dez"],[365,"30.Dez"]];
var aufgabe4 = [[05,1],[06,3],[08,5],[09,1],[11,8],[12,4],[13,15],[14,5],[15,2],[16,2],[17,1],[18,4],[19,5],[20,11],[21,6],[22,23],[23,9],[24,7],[25,22],[26,12],[27,2],[28,10],[29,12],[30,5],[31,4],[01+31,1],[02+31,3],[03+31,6],[04+31,2],[05+31,10],[06+31,7],[07+31,12],[08+31,5],[09+31,11],[10+31,2],[11+31,4],[12+31,4],[13+31,11],[14+31,4],[15+31,3],[16+31,10],[17+31,10],[18+31,6],[19+31,12],[20+31,6],[21+31,3],[22+31,5],[23+31,20],[24+31,5],[25+31,10],[26+31,10],[27+31,7],[28+31,8],[29+31,8],[01+31+29,17],[02+31+29,19],[03+31+29,8],[04+31+29,11],[05+31+29,15],[06+31+29,7],[07+31+29,1],[08+31+29,3],[09+31+29,10],[11+31+29,9],[12+31+29,8],[14+31+29,5],[15+31+29,9],[16+31+29,13],[18+31+29,6],[19+31+29,20],[20+31+29,10],[22+31+29,18],[23+31+29,6],[24+31+29,4],[25+31+29,1],[26+31+29,1],[28+31+29,2],[29+31+29,2],[30+31+29,6],[31+31+29,6],[01+31+29+31,2],[02+31+29+31,7],[03+31+29+31,14],[04+31+29+31,9],[05+31+29+31,9],[08+31+29+31,4],[09+31+29+31,5],[10+31+29+31,4],[11+31+29+31,5],[12+31+29+31,9],[13+31+29+31,2],[14+31+29+31,5],[15+31+29+31,2],[16+31+29+31,11],[17+31+29+31,7],[18+31+29+31,3],[19+31+29+31,25],[20+31+29+31,9],[21+31+29+31,6],[22+31+29+31,8],[23+31+29+31,10],[24+31+29+31,2],[25+31+29+31,6],[26+31+29+31,18],[27+31+29+31,11],[28+31+29+31,3],[29+31+29+31,8],[30+31+29+31,5],[01+31+29+31+30,10],[02+31+29+31+30,9],[03+31+29+31+30,17],[04+31+29+31+30,1],[05+31+29+31+30,4],[06+31+29+31+30,3],[07+31+29+31+30,1],[08+31+29+31+30,2],[09+31+29+31+30,3],[10+31+29+31+30,9],[11+31+29+31+30,6],[12+31+29+31+30,3],[13+31+29+31+30,2],[15+31+29+31+30,2],[16+31+29+31+30,4],[17+31+29+31+30,2],[18+31+29+31+30,9],[19+31+29+31+30,1],[20+31+29+31+30,10],[21+31+29+31+30,3],[22+31+29+31+30,3],[25+31+29+31+30,7],[26+31+29+31+30,6],[27+31+29+31+30,5],[28+31+29+31+30,2],[30+31+29+31+30,3],[31+31+29+31+30,2],[01+31+29+31+30+31,2],[02+31+29+31+30+31,11],[03+31+29+31+30+31,6],[04+31+29+31+30+31,5],[05+31+29+31+30+31,1],[06+31+29+31+30+31,2],[07+31+29+31+30+31,2],[08+31+29+31+30+31,12],[09+31+29+31+30+31,1],[10+31+29+31+30+31,5],[11+31+29+31+30+31,8],[13+31+29+31+30+31,1],[14+31+29+31+30+31,3],[15+31+29+31+30+31,8],[16+31+29+31+30+31,2],[17+31+29+31+30+31,7],[18+31+29+31+30+31,8],[19+31+29+31+30+31,6],[20+31+29+31+30+31,1],[21+31+29+31+30+31,2],[22+31+29+31+30+31,4],[23+31+29+31+30+31,28],[24+31+29+31+30+31,5],[25+31+29+31+30+31,2],[26+31+29+31+30+31,9],[27+31+29+31+30+31,5],[28+31+29+31+30+31,6],[29+31+29+31+30+31,3],[30+31+29+31+30+31,2],[01+31+29+31+30+31+30,7],[02+31+29+31+30+31+30,9],[04+31+29+31+30+31+30,2],[05+31+29+31+30+31+30,2],[07+31+29+31+30+31+30,7],[08+31+29+31+30+31+30,1],[09+31+29+31+30+31+30,2],[11+31+29+31+30+31+30,3],[12+31+29+31+30+31+30,8],[13+31+29+31+30+31+30,9],[14+31+29+31+30+31+30,6],[15+31+29+31+30+31+30,2],[16+31+29+31+30+31+30,5],[18+31+29+31+30+31+30,6],[19+31+29+31+30+31+30,11],[20+31+29+31+30+31+30,17],[21+31+29+31+30+31+30,32],[22+31+29+31+30+31+30,17],[23+31+29+31+30+31+30,9],[25+31+29+31+30+31+30,14],[26+31+29+31+30+31+30,50],[27+31+29+31+30+31+30,21],[28+31+29+31+30+31+30,16],[29+31+29+31+30+31+30,5],[30+31+29+31+30+31+30,9],[31+31+29+31+30+31+30,2],[01+31+29+31+30+31+30+31,6],[02+31+29+31+30+31+30+31,10],[03+31+29+31+30+31+30+31,5],[04+31+29+31+30+31+30+31,4],[05+31+29+31+30+31+30+31,4],[06+31+29+31+30+31+30+31,11],[07+31+29+31+30+31+30+31,5],[08+31+29+31+30+31+30+31,5],[09+31+29+31+30+31+30+31,8],[10+31+29+31+30+31+30+31,5],[11+31+29+31+30+31+30+31,1],[12+31+29+31+30+31+30+31,4],[13+31+29+31+30+31+30+31,3],[15+31+29+31+30+31+30+31,2],[16+31+29+31+30+31+30+31,1],[17+31+29+31+30+31+30+31,12],[18+31+29+31+30+31+30+31,1],[19+31+29+31+30+31+30+31,5],[20+31+29+31+30+31+30+31,7],[22+31+29+31+30+31+30+31,3],[23+31+29+31+30+31+30+31,4],[24+31+29+31+30+31+30+31,8],[25+31+29+31+30+31+30+31,7],[26+31+29+31+30+31+30+31,10],[27+31+29+31+30+31+30+31,6],[28+31+29+31+30+31+30+31,5],[29+31+29+31+30+31+30+31,4],[30+31+29+31+30+31+30+31,4],[31+31+29+31+30+31+30+31,3],[01+31+29+31+30+31+30+31+31,11],[02+31+29+31+30+31+30+31+31,3],[05+31+29+31+30+31+30+31+31,6],[06+31+29+31+30+31+30+31+31,5],[07+31+29+31+30+31+30+31+31,6],[08+31+29+31+30+31+30+31+31,17],[09+31+29+31+30+31+30+31+31,6],[10+31+29+31+30+31+30+31+31,1],[13+31+29+31+30+31+30+31+31,6],[14+31+29+31+30+31+30+31+31,3],[15+31+29+31+30+31+30+31+31,9],[16+31+29+31+30+31+30+31+31,8],[18+31+29+31+30+31+30+31+31,1],[20+31+29+31+30+31+30+31+31,8],[21+31+29+31+30+31+30+31+31,1],[22+31+29+31+30+31+30+31+31,4],[23+31+29+31+30+31+30+31+31,4],[24+31+29+31+30+31+30+31+31,4],[25+31+29+31+30+31+30+31+31,1],[26+31+29+31+30+31+30+31+31,14],[27+31+29+31+30+31+30+31+31,101]];
var hashtags = [["hallo",22],["christian",3]];
function formatdatum(tupel){
return [tupel[1],tupel[0]]
};
function compareHashtag(tupel,string){
if(tupel[0] == string)
{return [tupel[1],1]}
};
function checkArray(array,strings){
var ausgabe = [[3,100]];
for (let i of array){
if(array[i][0] == strings){
}
}
return ausgabe;
};
var datenquelle = [ { data:aufgabe4 , color: "#0066ff" } ];
var optionen2 = { series: { bars: { show:true } }, bars: { align: "center", barWidth: 0.25 }, xaxis: { ticks:daten} }
$(function () {
$.plot($("#barchart"), datenquelle, optionen2 ); });
</script>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment