[Vertical Bar Charts] Fixed strpos check

This commit is contained in:
fermin831 2018-03-01 17:07:55 +01:00
parent b6688dda1c
commit 52e6503018
1 changed files with 1 additions and 1 deletions

View File

@ -190,7 +190,7 @@ function vbar_graph(
else { else {
$new_chart_data = array(); $new_chart_data = array();
foreach ($chart_data as $key => $value) { foreach ($chart_data as $key => $value) {
if(strlen($key) > 20 && strpos($key, ' - ') != -1){ if(strlen($key) > 20 && strpos($key, ' - ') !== false){
$key_temp = explode(" - ",$key); $key_temp = explode(" - ",$key);
$key_temp[0] = $key_temp[0]." \n"; $key_temp[0] = $key_temp[0]." \n";
$key_temp[1]= '...'.substr($key_temp[1],-15); $key_temp[1]= '...'.substr($key_temp[1],-15);