PHRAS-2544 fix statistic popup

This commit is contained in:
Harrys Ravalomanana
2019-07-01 18:32:12 +04:00
parent 63a89521b6
commit fc022f817b

View File

@@ -67,7 +67,16 @@
} }
} }
var $color = "#FFFFFF";
if ($('body').hasClass('000000')) {
$color = "#FFFFFF";
}
if ($('body').hasClass('FFFFFF')) {
$color = "#000000";
}
/*if ($('body').hasClass('959595')) {
$color = "#000000";
}*/
function drawChartVisualisation() { function drawChartVisualisation() {
var maxValue = statistics.max_views < 4 ? 4 : statistics.max_views; var maxValue = statistics.max_views < 4 ? 4 : statistics.max_views;
var data = new google.visualization.DataTable(); var data = new google.visualization.DataTable();
@@ -75,16 +84,7 @@
data.addColumn('number', '{{ 'preview::visualisation' | trans }}'); data.addColumn('number', '{{ 'preview::visualisation' | trans }}');
data.addRows(arrayViews); data.addRows(arrayViews);
var $color = "#FFFFFF";
if ($('body').hasClass('000000')) {
$color = "#FFFFFF";
}
if ($('body').hasClass('FFFFFF')) {
$color = "#000000";
}
/*if ($('body').hasClass('959595')) {
$color = "#000000";
}*/
var options = { var options = {
titleTextStyle: { titleTextStyle: {
@@ -138,7 +138,7 @@
var options = { var options = {
titleTextStyle: { titleTextStyle: {
color: 'white', color: $color,
fontSize: 13 fontSize: 13
}, },
colors: ['#FF9900'], colors: ['#FF9900'],
@@ -147,29 +147,29 @@
hAxis: { hAxis: {
title: '{{ 'preview::date' | trans }}', title: '{{ 'preview::date' | trans }}',
titleTextStyle: { titleTextStyle: {
color: 'white', color: $color,
fontSize: 11 fontSize: 11
}, },
textStyle:{color: '#FFF'}, textStyle:{color: $color},
format: 'd/M/yy', format: 'd/M/yy',
gridlines: {color: 'none'}, gridlines: {color: 'none'},
min: new Date(statistics.from), min: new Date(statistics.from),
max: new Date(statistics.to), max: new Date(statistics.to),
baselineColor: '#FFF' baselineColor: $color
}, },
vAxis: { vAxis: {
title: '{{ 'preview::downloads' | trans }}', title: '{{ 'preview::downloads' | trans }}',
titleTextStyle: { titleTextStyle: {
color: 'white', color: $color,
fontSize: 11 fontSize: 11
}, },
textStyle:{color: '#FFF'}, textStyle:{color: $color},
minValue: 0, minValue: 0,
maxValue: maxValue, maxValue: maxValue,
baselineColor: '#FFF', baselineColor: $color,
format: '0' format: '0'
}, },
legend: {position: 'top', textStyle: {color: 'white'}}, legend: {position: 'top', textStyle: {color: $color}},
}; };
var chart = new google.visualization.ColumnChart( var chart = new google.visualization.ColumnChart(
@@ -185,7 +185,7 @@
'backgroundColor': 'transparent', 'backgroundColor': 'transparent',
is3D: true, is3D: true,
colors:['#FF9900','#3FDFFD', '#14CAB5', '#CAA514', '#97853C'], colors:['#FF9900','#3FDFFD', '#14CAB5', '#CAA514', '#97853C'],
legend: {position: 'right', textStyle: {color: 'white'}}, legend: {position: 'right', textStyle: {color: $color}},
chartArea: {width:'90%',height:'70%'} chartArea: {width:'90%',height:'70%'}
}; };