Skip to content

Commit

Permalink
attempt at #116
Browse files Browse the repository at this point in the history
  • Loading branch information
IsmailM committed Sep 6, 2018
1 parent 6af349f commit e79968d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion aux/html_files/js/gv.compiled.min.js

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions aux/source_assets/js/plots.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ if (!GV) {

$.getJSON(file, function( json ) {
if (val === 'all'){
GV.addAllExplanation(target, json.validations);
for (var i in json.validations){
if (json.validations[i].graphs !== undefined) {
GV.generatePlotCommands(json.validations[i].graphs, target);
Expand Down Expand Up @@ -173,6 +174,18 @@ if (!GV) {
$(row).prepend(explain);
};

GV.addAllExplanation = function (target, jsonData) {
var explain = '';
for (var i in jsonData) {
explain += '<h3 style="font-size: 19px;">' + jsonData[i].header + '</h3>';
explain += '<p><b>Approach:</b> ' + jsonData[i].approach + '</p>';
explain += '<p><b>Explanation:</b> ' + jsonData[i].explanation + '</p>';
explain += '<p><b>Conclusion:</b> ' + jsonData[i].conclusion + '</p>';
}
var allExplain = $('<div id="' + target + 'allExplanation" class="alert alert-info explanation_alert" role="alert">' + explain + '</div>');
var row = '#row' + target;
$(row).prepend(allExplain);
};

// Functions that produce the plots in D3
GV.addPlot = function (jsonData, target, type, title, footer, xtitle, ytitle, aux1, aux2) {
Expand Down

0 comments on commit e79968d

Please sign in to comment.