Skip to content

Commit

Permalink
Merge pull request #45 from oSoc19/issues
Browse files Browse the repository at this point in the history
Issues
  • Loading branch information
EmmyBruynseels committed Jul 18, 2019
2 parents b380ba8 + c6352a6 commit f5e3315
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
5 changes: 4 additions & 1 deletion application/models/Quiz_model.php
Expand Up @@ -144,7 +144,10 @@ private function generateCategoryWithAnswers() {
$maximum = round($category->value + (0.7 * $category->value), 1);

// Set two random answers and the correct answer
$answer1 = rand($minimum, $maximum);

do {
$answer1 = rand($minimum, $maximum);
} while ($answer1 < ($category->value - (0.2 * $category->value)) && $answer1 > ($category->value + (0.2 * $category->value)) );
$answer2 = rand($minimum, $maximum);
$answer3 = $category->value;

Expand Down
10 changes: 7 additions & 3 deletions application/views/chart.php
Expand Up @@ -90,7 +90,8 @@ function setDataForPieChartCategories() {
function setOptionsForPieChart() {
var options = {
pieHole: 0.6,
colors: ['#81AE9D', '#EDB458', '#BEA8AA', '#FB9F89', '#BBAB8B', '#C5DCA0', '#BF958D', '#CDD3D5', '#E2EB98', '#CD94A5'],
/*colors: ['#81AE9D', '#EDB458', '#BEA8AA', '#FB9F89', '#BBAB8B', '#C5DCA0', '#BF958D', '#CDD3D5', '#E2EB98', '#CD94A5'],*/
colors: ['#0a0839', '#36345D', '#636181', '#797893','#00493A', '#005F4B', '#6AA296','#0F596E','#178bac','#56AAC2'],
enableInteractivity: true,
tooltip: {textStyle: {color: 'black'}, showColorCode: true, isHtml: true},
width:'100%'
Expand All @@ -103,6 +104,7 @@ function setOptionsForPieChart() {
function setOptionsForSmallPieChart() {
var options = {
pieHole: 0.5,
/*colors: ['#81AE9D', '#EDB458', '#BEA8AA', '#FB9F89', '#BBAB8B', '#C5DCA0', '#BF958D', '#CDD3D5', '#E2EB98', '#CD94A5'],*/
colors: ['#81AE9D', '#EDB458', '#BEA8AA', '#FB9F89', '#BBAB8B', '#C5DCA0', '#BF958D', '#CDD3D5', '#E2EB98', '#CD94A5'],
enableInteractivity: true,
tooltip: {textStyle: {color: 'black'}, showColorCode: true, isHtml: true},
Expand Down Expand Up @@ -191,7 +193,8 @@ function setDataForBarChartSubcategories(category) {

function setOptionsForSubCategoriesBarChart() {
var options = {
colors: ['#81AE9D', '#EDB458', '#BEA8AA', '#FB9F89', '#BBAB8B', '#C5DCA0', '#BF958D', '#CDD3D5', '#E2EB98', '#CD94A5'],
/*colors: ['#81AE9D', '#EDB458', '#BEA8AA', '#FB9F89', '#BBAB8B', '#C5DCA0', '#BF958D', '#CDD3D5', '#E2EB98', '#CD94A5'],*/
colors: ['#0a0839'],
enableInteractivity: true,
tooltip: {textStyle: {color: 'black'}, showColorCode: true, isHtml: true},
width: 600,
Expand All @@ -214,7 +217,8 @@ function setOptionsForSubCategoriesBarChart() {

function setOptionsForSmallSubCategoriesBarChart() {
var options = {
colors: ['#81AE9D', '#EDB458', '#BEA8AA', '#FB9F89', '#BBAB8B', '#C5DCA0', '#BF958D', '#CDD3D5', '#E2EB98', '#CD94A5'],
/*colors: ['#81AE9D', '#EDB458', '#BEA8AA', '#FB9F89', '#BBAB8B', '#C5DCA0', '#BF958D', '#CDD3D5', '#E2EB98', '#CD94A5'],*/
colors: ['#0a0839'],
enableInteractivity: true,
tooltip: {textStyle: {color: 'black'}, showColorCode: true, isHtml: true},
width: '100%',
Expand Down

0 comments on commit f5e3315

Please sign in to comment.