Add task
This commit is contained in:
		
							
								
								
									
										22
									
								
								html/tasks/chapter_8/highcharts/oppgave.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										22
									
								
								html/tasks/chapter_8/highcharts/oppgave.html
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,22 @@ | |||||||
|  | <!DOCTYPE html> | ||||||
|  | <html lang="en"> | ||||||
|  |   <head> | ||||||
|  |     <meta charset="UTF-8" /> | ||||||
|  |     <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||||||
|  |     <meta http-equiv="X-UA-Compatible" content="ie=edge" /> | ||||||
|  |     <title>Highcharts</title> | ||||||
|  |     <link rel="stylesheet" href="../../../../resources/css/main.css" /> | ||||||
|  |     <script src="https://code.highcharts.com/highcharts.js"></script> | ||||||
|  |     <script async src="./script.js"></script> | ||||||
|  |   </head> | ||||||
|  |   <body> | ||||||
|  |     <h1>Highcharts</h1> | ||||||
|  |      | ||||||
|  |     <div class="center"> | ||||||
|  |  | ||||||
|  |       <div id='container'></div> | ||||||
|  |        | ||||||
|  |     </div> | ||||||
|  |  | ||||||
|  |   </body> | ||||||
|  | </html> | ||||||
							
								
								
									
										41
									
								
								html/tasks/chapter_8/highcharts/script.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										41
									
								
								html/tasks/chapter_8/highcharts/script.js
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,41 @@ | |||||||
|  | const data = [ | ||||||
|  |   { | ||||||
|  |     name: 'Banana', | ||||||
|  |     data: [1,2,3,4,5] | ||||||
|  |   }, | ||||||
|  |   { | ||||||
|  |     name: 'Apple', | ||||||
|  |     data: [3,2,5,6,2] | ||||||
|  |   } | ||||||
|  | ] | ||||||
|  |  | ||||||
|  | const config = { | ||||||
|  |   title: { text: 'Tittel'}, | ||||||
|  |   subtitle: { text: 'Undertittel'}, | ||||||
|  |   xAxis: { | ||||||
|  |     title: { | ||||||
|  |       text: 'Numbers' | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   yAxis: { | ||||||
|  |     title: { | ||||||
|  |       text: 'Amount' | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   legend: { | ||||||
|  |     layout: 'vertical', | ||||||
|  |     align: 'right', | ||||||
|  |     verticalAlign: 'middle' | ||||||
|  |   }, | ||||||
|  |  | ||||||
|  |   plotOptions: { | ||||||
|  |     series: { | ||||||
|  |       pointStart: 5000 | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |  | ||||||
|  |   series: data | ||||||
|  |    | ||||||
|  | } | ||||||
|  |  | ||||||
|  | Highcharts.chart('container', config); | ||||||
| @@ -45,6 +45,7 @@ | |||||||
|       <p><a href="./html/tasks/chapter_7/video/oppgave.html">Video</a></p> |       <p><a href="./html/tasks/chapter_7/video/oppgave.html">Video</a></p> | ||||||
|  |  | ||||||
|       <h2>Kapittel 8</h2> |       <h2>Kapittel 8</h2> | ||||||
|  |       <p><a href="./html/tasks/chapter_8/highcharts/oppgave.html">Highcharts</a></p> | ||||||
|       <p><a href="./html/tasks/chapter_8/task3_randomArrayData/oppgave.html">Oppgave 3 - Random Array Data</a></p> |       <p><a href="./html/tasks/chapter_8/task3_randomArrayData/oppgave.html">Oppgave 3 - Random Array Data</a></p> | ||||||
|  |  | ||||||
|       <h2>Kapittel 10</h2> |       <h2>Kapittel 10</h2> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user