-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from vitorfs/dev
Release v2.0.3
- Loading branch information
Showing
11 changed files
with
334 additions
and
316 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Parsifal 2.0.3 (2021-09-08) | ||
=========================== | ||
|
||
Bugfixes | ||
-------- | ||
|
||
- Fix data analysis load state for charts (#69) | ||
- Fix keyboard arrow navigation on study selection page. (#71) | ||
- Fix search scopus results rendering when there is no data. (#73) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
from parsifal.utils.version import get_version | ||
|
||
VERSION = (2, 0, 2, "final", 0) | ||
VERSION = (2, 0, 3, "final", 0) | ||
|
||
__version__ = get_version(VERSION) |
166 changes: 84 additions & 82 deletions
166
parsifal/apps/reviews/conducting/static/js/conducting_data_analysis.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,92 @@ | ||
google.load('visualization', '1.0', {'packages':['corechart']}); | ||
google.setOnLoadCallback(drawChartCallback); | ||
$(function () { | ||
google.load('visualization', '1.0', {'packages':['corechart']}); | ||
google.setOnLoadCallback(drawChartCallback); | ||
|
||
function drawChartCallback() { | ||
drawChart(); | ||
drawYearLines(); | ||
} | ||
|
||
function drawPieChart(rows) { | ||
var data = new google.visualization.DataTable(); | ||
data.addColumn('string', 'Source'); | ||
data.addColumn('number', 'Number of Aticles'); | ||
data.addRows(rows); | ||
var options = {'height': 400}; | ||
var chart = new google.visualization.PieChart(document.getElementById('articles-selection-pie')); | ||
chart.draw(data, options); | ||
} | ||
|
||
function drawColumnChart(rows) { | ||
var data = google.visualization.arrayToDataTable(rows); | ||
var options = { | ||
vAxis: {title: 'Number of Articles', titleTextStyle: {color: '#3A3D40'}}, | ||
'height': 400 | ||
}; | ||
var chart = new google.visualization.ColumnChart(document.getElementById('articles-selection-column')); | ||
chart.draw(data, options); | ||
} | ||
function drawChartCallback() { | ||
drawChart(); | ||
drawYearLines(); | ||
} | ||
|
||
function drawLineChart(rows) { | ||
var data = google.visualization.arrayToDataTable(rows); | ||
var options = { | ||
vAxis: {title: 'Number of Articles', titleTextStyle: {color: '#3A3D40'}}, | ||
'height': 400 | ||
}; | ||
var chart = new google.visualization.LineChart(document.getElementById('articles-selection-line')); | ||
chart.draw(data, options); | ||
} | ||
function drawPieChart(rows) { | ||
var data = new google.visualization.DataTable(); | ||
data.addColumn('string', 'Source'); | ||
data.addColumn('number', 'Number of Articles'); | ||
data.addRows(rows); | ||
var options = {'height': 400}; | ||
var chart = new google.visualization.PieChart(document.getElementById('articles-selection-pie')); | ||
chart.draw(data, options); | ||
} | ||
|
||
function drawChart() { | ||
$.ajax({ | ||
url: '/reviews/conducting/articles_selection_chart/', | ||
data: {'review-id': $("#review-id").val()}, | ||
type: 'get', | ||
cache: false, | ||
beforeSend: function () { | ||
$("#articles-selection-pie").spinner(false); | ||
$("#articles-selection-column").spinner(false); | ||
}, | ||
success: function (data) { | ||
var source_data = data.split(","); | ||
var rows_pie = []; | ||
var rows_chart = [['Source', 'Selected', 'Accepted']]; | ||
for (var i = source_data.length - 1; i >= 0; i--) { | ||
row = source_data[i].split(":"); | ||
rows_pie.push([row[0], parseInt(row[1])]); | ||
rows_chart.push([row[0], parseInt(row[1]), parseInt(row[2])]); | ||
function drawColumnChart(rows) { | ||
var data = google.visualization.arrayToDataTable(rows); | ||
var options = { | ||
vAxis: {title: 'Number of Articles', titleTextStyle: {color: '#3A3D40'}}, | ||
'height': 400 | ||
}; | ||
drawPieChart(rows_pie); | ||
drawColumnChart(rows_chart); | ||
}, | ||
complete: function () { | ||
$("#articles-selection-pie").spinner(); | ||
$("#articles-selection-column").spinner(); | ||
var chart = new google.visualization.ColumnChart(document.getElementById('articles-selection-column')); | ||
chart.draw(data, options); | ||
} | ||
}); | ||
} | ||
|
||
function drawYearLines() { | ||
$.ajax({ | ||
url: '/reviews/conducting/articles_per_year/', | ||
data: {'review-id': $("#review-id").val()}, | ||
type: 'get', | ||
cache: false, | ||
beforeSend: function () { | ||
$("#articles-selection-line").spinner(false); | ||
}, | ||
success: function (data) { | ||
var source_data = data.split(","); | ||
var rows = [['Year', 'Number of Articles']]; | ||
for (var i = source_data.length - 1; i >= 0; i--) { | ||
row = source_data[i].split(":"); | ||
rows.push([row[0], parseInt(row[1])]); | ||
function drawLineChart(rows) { | ||
var data = google.visualization.arrayToDataTable(rows); | ||
var options = { | ||
vAxis: {title: 'Number of Articles', titleTextStyle: {color: '#3A3D40'}}, | ||
'height': 400 | ||
}; | ||
drawLineChart(rows); | ||
}, | ||
complete: function () { | ||
$("#articles-selection-line").spinner(); | ||
var chart = new google.visualization.LineChart(document.getElementById('articles-selection-line')); | ||
chart.draw(data, options); | ||
} | ||
|
||
function drawChart() { | ||
$.ajax({ | ||
url: '/reviews/conducting/articles_selection_chart/', | ||
data: {'review-id': $("#review-id").val()}, | ||
type: 'get', | ||
cache: false, | ||
beforeSend: function () { | ||
$("#articles-selection-pie").spinner(false); | ||
$("#articles-selection-column").spinner(false); | ||
}, | ||
success: function (data) { | ||
var source_data = data.split(","); | ||
var rows_pie = []; | ||
var rows_chart = [['Source', 'Selected', 'Accepted']]; | ||
for (var i = source_data.length - 1; i >= 0; i--) { | ||
row = source_data[i].split(":"); | ||
rows_pie.push([row[0], parseInt(row[1])]); | ||
rows_chart.push([row[0], parseInt(row[1]), parseInt(row[2])]); | ||
} | ||
drawPieChart(rows_pie); | ||
drawColumnChart(rows_chart); | ||
}, | ||
complete: function () { | ||
$("#articles-selection-pie").spinner(); | ||
$("#articles-selection-column").spinner(); | ||
} | ||
}); | ||
} | ||
|
||
function drawYearLines() { | ||
$.ajax({ | ||
url: '/reviews/conducting/articles_per_year/', | ||
data: {'review-id': $("#review-id").val()}, | ||
type: 'get', | ||
cache: false, | ||
beforeSend: function () { | ||
$("#articles-selection-line").spinner(false); | ||
}, | ||
success: function (data) { | ||
var source_data = data.split(","); | ||
var rows = [['Year', 'Number of Articles']]; | ||
for (var i = source_data.length - 1; i >= 0; i--) { | ||
row = source_data[i].split(":"); | ||
rows.push([row[0], parseInt(row[1])]); | ||
} | ||
drawLineChart(rows); | ||
}, | ||
complete: function () { | ||
$("#articles-selection-line").spinner(); | ||
} | ||
}); | ||
} | ||
}); | ||
} | ||
}); |
Oops, something went wrong.