Fatal error: unknown method PlotArea.getRightX in [...]/mydbr/lib/external/ChartDirec

(12 posts) (2 voices)
  1. ACNC, Member

    I've just upgraded to the latest version of MyDBR. Every time I've upgraded over the years, it has broken graphs in our system. Normally I just go and debug these and fix the problem as I'm sure it could be due to our own coding issues. This time, I thought I'd check if anyone has already experienced this and if there's a known solution.

    I'm getting the following error when trying to view a basic bar chart report:

    Fatal error: unknown method PlotArea.getRightX in [...]/mydbr/lib/external/ChartDirector/phpchartdir.php on line 2440

    Some quick Googling doesn't show up anything particularly helpful.

    Thanks for any help.

  2. myDBR Team, Key Master

    PlotArea.getRightX is a native ChartDirector method, so the error is bit odd.

    What is the ChartDirector version that you have installed? You can check it from Environment settings / Installed modules.

    So other charts work?

    myDBR Team

  3. ACNC, Member

    Environment settings / Installed modules gives:
    Flash charts
    Image charts (ChartDirector 5.0)

    I've had a look in the phpchartdir.php file and the class/method mentioned does appear to exist, which makes this doubly odd.

    If I need to upgrade ChartDirector (it seems 5.1.1 is the latest version), can you give me any pointers on how to do that?

    None of the graphs in any of our reports are working, and all give exactly the same error. I'm not sure what kinds of charts they are though (I didn't build them). They might all be bar charts.


  4. myDBR Team, Key Master

    Yes, the 5.0 is bit outdated.

    See installing instructions from http://www.advsofteng.com/doc/cdphp.htm#phpinstall.htm.

    What you need to do:

    1) Download the version for your server and extract the download
    2) Copy the content of the lib-directory into your PHP extension directory
    3) Add extension=phpchartdir###.dll into your php.ini where ### matches your PHP version
    4) Restart the web server

    myDBR Team

  5. ACNC, Member

    Thanks. That seems to have worked. I can now see the graphs from within the MyDBR control panel.

    However, these are also linked to from another website. The way this is being done is like this:

    img src="http://www.example.co.uk/mydbr/report.php?r=16&m=1&h=5dd4f82ff021ec2c058cffa970b08bfe92624961&getchart=1"

    ...which is no longer working. When I visit the URL in the src attribute of the image, I now see a page rendered in HTML, with a title, etc. I'm guessing that before, the URL would just return image data. So I take it I need to re-engineer the page that is linking to the graph, or is there a new type of URL I can use in the img src attribute?

    Thanks again.

  6. myDBR Team, Key Master

    Have you checked that the URL returns an image chart (png/svg) instead of flash chart?

    The '&getchart=1' when added to the URL, will cause just the image data to be returned, with no html. You can set it as default Environment settings / Installed modules, or it can be set within the report itself. Recommended way is to use it as default. Using SVG charts will give you better looking charts.

    myDBR Team

  7. ACNC, Member

    Another problem: I can't quote HTML in posts on the forum. When quoting the HTML directly, BBCode tries to parse it. If I put it in backticks as recommended, it just replaces the whole string with "_bbcode_lite_1_". I'll now try fudging the HTML to make it visible...

  8. ACNC, Member

    Ah, I see now that it's using Flash. Environment settings / Installed modules indicates that ChartDirector is no longer installed.

    I went through each of the steps you mentioned:

    1) downloaded the latest version for my system (download2.advsofteng.com/chartdir_php_linux_64.tar.gz)
    2) uploaded the lib files to the php extensions directory (after checking where that is with 'php-config --extension-dir')
    3) set the configuration to match my PHP version (after checking with php -V)
    4) restarted Apache.

    It seemed to be fixed after that, though of course it was a red herring because it just started to use Flash instead. So please can you help me get ChartDirector working?


  9. ACNC, Member

    Just to confirm, ChartDirector is currently appearing under Missing modules:

    Missing Modules:
    Image charts (ChartDirectorPHP Extension not installed) Install now
    Graphviz charts Install now
    wkhtmltopdf Install now

    The "Install now" link is really unhelpful. It would be nice if it could actually do the installation.

  10. ACNC, Member

    Finally got it working. I'd typoed when entering the name of the php extension file!

  11. ACNC, Member

    I suggest you add a verification step to the MyDBR update script to do a check for the installed version of ChartDirector. Then it would be nice if you could actually automate the updating/installation of ChartDirector. It seems ridiculously clunky that I had to do this myself (though I understand your hands may be tied for some reason).

    Thanks for your help anyway though.

  12. myDBR Team, Key Master

    myDBR does check the version of ChartDirector and it will put up a notification in admin tools if it finds outdated version of it.

    Automating the ChartDirector would be bit challenging. It's a third party product which installation may change. Also, considering the variation of server configurations users have (all operating systems, all operating system version, different PHP versions, different web servers / versions etc). There is a reason why ChartDirector itself does not contain automated installer.

    Anyways, glad you got it working.

    myDBR Team


You must log in to post.