fixed scaling of graphs

This commit is contained in:
Ralf Teusner
2016-06-02 15:27:36 +02:00
parent 34c9d791f4
commit 2ff04cf59d
2 changed files with 4 additions and 4 deletions

View File

@ -78,8 +78,8 @@ $(function() {
function graph_assesses() { function graph_assesses() {
// MAKE THE GRAPH // MAKE THE GRAPH
var width_ratio = .8; var width_ratio = .8;
if (width_ratio > 1000){ if (getWidth()*width_ratio > 1000){
width_ratio = 1000; width_ratio = 1000/getWidth();
} }
var height_ratio = .7; // percent of height var height_ratio = .7; // percent of height

View File

@ -67,8 +67,8 @@ $(function() {
// DRAW THE LINE GRAPH ------------------------------------------------------------------------------ // DRAW THE LINE GRAPH ------------------------------------------------------------------------------
function draw_line_graph() { function draw_line_graph() {
var width_ratio = .8; var width_ratio = .8;
if (width_ratio > 1000){ if (getWidth()*width_ratio > 1000){
width_ratio = 1000; width_ratio = 1000/getWidth();
} }
var height_ratio = .7; // percent of height var height_ratio = .7; // percent of height