Commit fb7117b8 authored by Joshua Arosco's avatar Joshua Arosco

Update linechart orientation

parent b576ad0d
...@@ -18,11 +18,11 @@ class PetPopularitySeeder extends Seeder ...@@ -18,11 +18,11 @@ class PetPopularitySeeder extends Seeder
'Cats', 'Cats',
]; ];
foreach (range(1,50) as $value) { foreach (range(0,5) as $value) {
foreach ($pets as $pet) { foreach ($pets as $pet) {
$new_data = new PetPopularityModel; $new_data = new PetPopularityModel;
$new_data->pet_name = $pet; $new_data->pet_name = $pet;
$new_data->popularity = rand($value,100); $new_data->popularity = rand($value,50);
$new_data->save(); $new_data->save();
} }
} }
......
...@@ -6,8 +6,7 @@ ...@@ -6,8 +6,7 @@
/*sample css*/ /*sample css*/
.heading{ .heading{
text-align: center; text-align: center;
color: gray; margin-bottom: 100px;
font-weight: 200px;
} }
.author{ .author{
color: #cecece; color: #cecece;
...@@ -30,16 +29,26 @@ ...@@ -30,16 +29,26 @@
h3{ h3{
font-weight: 200; font-weight: 200;
} }
h1{
font-weight: 200;
}
hr{
margin-top: 50px;
margin-bottom: 50px;
}
</style> </style>
</head> </head>
<body> <body>
<div class="chart heading">
<h1>Sample Charts</h1>
</div>
<div class="chart"> <div class="chart">
<h3>Horizontal Barchart</h3> <h3>Horizontal Barchart</h3>
<img src="{{$bar_chart}}" class="barchart"> <img src="{{$bar_chart}}" class="barchart">
</div> </div>
<hr> <hr>
<div class="chart"> <div class="chart">
<h3>Line Chart</h3> <h3>Vertical Line Chart</h3>
<img src="{{$line_chart}}" class="linechart"> <img src="{{$line_chart}}" class="linechart">
</div> </div>
<!-- <div class="heading"> <!-- <div class="heading">
......
...@@ -57,15 +57,16 @@ ...@@ -57,15 +57,16 @@
data.addRows({!!$pet_popularity!!}); data.addRows({!!$pet_popularity!!});
var options = { var options = {
hAxis: { // hAxis: {
title: 'Time' // title: 'Time'
}, // },
vAxis: { // vAxis: {
title: 'Popularity' // title: 'Popularity'
}, // },
colors: ['#ff6384', '#36a2eb'], colors: ['#ff6384', '#36a2eb'],
curveType: 'function', curveType: 'function',
legend: { position: 'bottom' } legend: { position: 'bottom' },
orientation: 'vertical',
}; };
var line_chart_div = document.getElementById('line_chart_div'); var line_chart_div = document.getElementById('line_chart_div');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment