View Issue Details

IDProjectCategoryView StatusLast Update
0009167mantisbtreportspublic2012-11-29 02:47
ReporterSneakyWho_am_i Assigned Tograngeway  
PrioritynormalSeverityminorReproducibilitysometimes
Status closedResolutionfixed 
PlatformPCOSLinux 
Product Version1.1.1 
Fixed in Version1.2.0rc1 
Summary0009167: GD Should check for antialiasing in JPGraph
Description

Ubuntu Hardy does not use the default compiled-in version of GD. I'm not sure about other versions or other distributions. This will not affect shared hosts, I think...

Sadly, without compiled-in gd, you don't have access to some of the specialist functions like antialising, and it can (and does) cause mantis's graphs to not render at all.

Steps To Reproduce

1: in ubuntu, issue
<b>sudo apt-get install php5-gd</b>
2: install Mantis by whatever method tickles your fancy
3: Install the JPGraph script and plug it into Mantis
4: Visit <b>/mantis/summary_graph_bystatus.php</b>

actual result:

  • graph cannot be created because there is no function for antialiasing in your php implementation

expected result:
a miracle happens

Additional Information

There are a bunch of ways to fix this, due to some impressive foresight shown in Mantis's development.

In the file <b>

--------------------------------------------------------

# $Id: graph_api.php,v 1.36.2.1 2007-10-13 22:35:29 giallu Exp $
# --------------------------------------------------------</b>

I found the error in here on line 70:
<b> if ( ON == config_get_global( 'jpgraph_antialias' ) ) {
$graph->img->SetAntiAliasing();
}</b>

  • The first possible fix might be to use a function_exists(), but I think that it would be slow and wasteful?
  • Another way might be to have antialiasing OFF by default, and make the user turn it ON
  • I turned it off explicitly in my <b>config.inc.php</b> with
    <b>$g_jpgraph_antialias = OFF;</b>
    ...
    and it looks fine to me

<i>I have attached a file, it shows how pretty my graphs look without antialiasing. What do they look like with it?</i>

TagsNo tags attached.

Relationships

related to 0015246 closedvboctor JPGraph 3.5.x anti aliasing error in Ubuntu 

Activities

2008-05-18 15:35

 

summary_graph_bystatus.png (3,044 bytes)   
summary_graph_bystatus.png (3,044 bytes)   
giallu

giallu

2008-05-19 02:47

reporter   ~0017869

Thanks for the comprehensive bug report!

So, I think the safest and easiest fix it to turn on anti-aliasing and let the user switch it on when he's sure about anti-aliasing support.

grangeway

grangeway

2009-02-15 07:23

reporter   ~0020847

Added an admin check to test for this case.

Issue History

Date Modified Username Field Change
2008-05-18 15:35 SneakyWho_am_i New Issue
2008-05-18 15:35 SneakyWho_am_i File Added: summary_graph_bystatus.png
2008-05-19 02:47 giallu Note Added: 0017869
2009-02-15 07:23 grangeway Note Added: 0020847
2009-02-15 07:23 grangeway Status new => resolved
2009-02-15 07:23 grangeway Fixed in Version => 1.2.2
2009-02-15 07:23 grangeway Resolution open => fixed
2009-02-15 07:23 grangeway Assigned To => grangeway
2009-06-23 15:28 jreese Status resolved => closed
2012-11-29 02:47 dregad Relationship added related to 0015246
2014-11-25 11:04 vboctor Category graphs => reports