View Full Version : Gantt chart error
jeffery
05-06-05, 04:47 PM
Hi,
Here we try to use dotProject v2.0.1 for a while. Every thing is good except gantt chart.
1.For gantt chart locale issue, we follow the instruction to modify the code. We can display project gantt chart well. But cannot show all projects gantt chart. It shows the locale error. Just like the error before we modified the code.
2.Here now we got a strange situation, that is, in some project, we can see gantt chart perfactly, but in some projects, we got the error as below:
jpGraph error:
prgress value must in range [0,1]
Are they the bugs? How to resolve it? We deeply appriciate with any comments.
Thanks!
:confused:
andresoares
07-06-05, 10:20 PM
Hi,
1.For gantt chart locale issue, we follow the instruction to modify the code. We can display project gantt chart well. But cannot show all projects gantt chart. It shows the locale error. Just like the error before we modified the code.
:confused:
Hi,
For the first problem i took some desperate measures:
1) open the file:
<dotprojectroot>/lib/jpgraph/src/jpgraph/jpgraph.php
2) look for the following piece of code:
//================================================== =
// CLASS DateLocale
// Description: Hold localized text used in dates
//================================================== =
and look for the line:
$res = @setlocale(LC_TIME, $aLocale);
and change it to:
$res = @setlocale(LC_TIME, "pt_BR"); (instead of "pt_BR", my locale, you should put your own locale.
I used the following script to list all locales suported by PHP.
<?
system('locale -a'); // for all locales
//system('locale -a | grep pt'); // for portuguese locales
?>
It worked fine for me and my team, and the best part : You can use set any locale for the entire system and the jpgraph will not complain.
best regards,
André
$res = @setlocale(LC_TIME, "pt_BR"); (instead of "pt_BR", my locale, you should put your own locale.
Thank you so much André! After a lot of tries this works for me!
<?
system('locale -a'); // for all locales
//system('locale -a | grep pt'); // for portuguese locales
?>
This doesn't work, my gantt chart in tasks and company haven't ISO 8859-1 chars. Where did you put it?
Do you know how to figure out?
Tks!
overhaul
14-03-06, 06:17 PM
This post has the quickest solution to the gantt chart error message about the php locale.
I added one line of code to the file <dotproject-folder>/lib/jpgraph/src/jpgraph.php:
$aLocale = ''; // added to fix error $aLocale
added before the line:
$res = @setlocale(LC_TIME, $aLocale);
[Note the variable is set to two single quotes]
Many thanks to all who posted suggestions!!!
eellery
24-03-06, 10:01 AM
Hi,
It worked for me too!!!
Probably I read 50 web pages with many solutions but that was the only that worked.
One more question: how do I install pt_BR locale in my debian?
Or
How to get words with correct characters? I mean, like: brasillians one! José, Coração and others...
eellery
24-03-06, 10:17 AM
Found how to add another locale:
http://www.vivaolinux.com.br/artigos/verArtigo.php?codigo=178
But still can´t see correct characters... The special ones.
vBulletin® v3.6.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.