View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0011671 | mantisbt | reports | public | 2010-03-18 00:11 | 2016-07-19 04:19 |
Reporter | fairyamanada | Assigned To | vboctor | ||
Priority | high | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.2.0 | ||||
Target Version | 2.0.0-beta.1 | Fixed in Version | 2.0.0-beta.1 | ||
Summary | 0011671: 3 graphs couldnot display in the page of 'summary_jpgraph_page.php' | ||||
Description | I found 3 graphs couldnot display in the page of 'summary_jpgraph_page.php' whose categories are 'summary_graph_bydeveloper', 'summary_graph_byreporter' and 'summary_graph_bycategory'. I checked the Apache error log file and find the error logs as follow. [Thu Mar 18 11:40:32 2010] [error] [client 10.2.21.140] PHP Fatal error: Uncaught exception 'ezcGraphUnregularStepsException' with
| ||||
Additional Information | There is another bug about the graph ,but I fixed it already. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Same here, but it does work when "Project=All Projects" Ed |
|
Apache error-log shows: PHP Fatal error: Uncaught exception 'ezcGraphUnregularStepsException' with message 'Bar charts do not support axis with unregular steps sizes.' in /srv/www/htdocs/mantis/library/ezc/Graph/src/charts/line.php:250\nStack trace:\n#0 /srv/www/htdocs/mantis/library/ezc/Graph/src/charts/line.php(668): ezcGraphLineChart->renderData(Object(ezcGraphRenderer2d), Object(ezcGraphBoundings), Object(ezcGraphBoundings))\n#1 /srv/www/htdocs/mantis/library/ezc/Graph/src/charts/line.php(711): ezcGraphLineChart->renderElements(450, 405)\n#2 /srv/www/htdocs/mantis/plugins/MantisGraph/core/graph_api.php(139): ezcGraphLineChart->renderToOutput(450, 405)\n#3 /srv/www/htdocs/mantis/plugins/MantisGraph/pages/summary_graph_bycategory.php(42): graph_bar(Array, 'By Category', 450, 405)\n#4 /srv/www/htdocs/mantis/plugin.php(52): include('/srv/www/htdocs...')\n#5 {main}\n thrown in /srv/www/htdocs/mantis/library/ezc/Graph/src/charts/line.php on line 250, referer: http://-------/mantis/plugin.php?page=MantisGraph/summary_graph_imp_category.php |
|
I had the same problem with my Mantis 1.2.1 installation and made some progress. I found that on projects where there were more than about 10 reporters, developers or categories, any or all of summary_graph_bydeveloper.php, summary_graph_byreporter.php and summary_graph_bycategory.php will fail to render, showing a "broken image" icon. Right-clicking the "broken image" icon and opening it in a new tab reveals the 'ezcGraphUnregularStepsException' error. This is a known constraint of the library. Sources here: http://issues.ez.no/IssueView.php?Id=11168&activeItem=47 To solve this we need to manually set the label count on the X-axis. I am currently trialing the following changes: (a) graph_api.php in graph_bar():
(b) graph_api.php in graph_group():
These changes now set the label count correctly. However, graphs with many labels will now fail to render the "tiny fonts" needed. This produces a new error such as: Uncaught exception 'ezcGraphFontRenderingException' with message 'Could not fit string 'mystring' with font size '6' in box '33.13223192291 * 2.3902201054193'. Possible solutions to solve this problem: - Decrease the amount of steps on the axis. - Increase the size of the chart. - Decrease the minimum font size. - Use a font which consumes less space for each character.' I found the easiest way to address this was to exclude the developers and reporters with low levels of activity. summary_graph_bydeveloper.php:
summary_graph_byreporter.php:
In this way you can exclude the users that don't contribute much to the graph. If this still doesn't help, you will then need to increase the graph width and size until you achieve a successful render. For a more robust Mantis implementation, I would suggest letting these graphs have their own row and spread across all the columns, in other words have them ignore the "graphs per row" configuration. This gives them the extra width they need for their X-axis. |
|
Note that changing from the bundled ezComponents library to a JpGraph installation gives better looking graphs and does not suffer from the same scalability issues. |
|
Have commited the graph api for 1.3 - i need to think about the 'best' robust way to fix the actual graphs |
|