RedMine_Charts: "Save Image Locally" option

Added by Nanda P over 8 years ago

When I right click on a chart, I see the option to "Save Image Locally". when I select, nothing happens.

How to make it work?

It will be nice to have "Print Chart" option :)

Found some information about saving: (don't know how to integrate this to the plug-in code :( )
http://teethgrinder.co.uk/open-flash-chart-2/save-image-js.php

Any help will be appreciated..

Thanks,
Nanda

Replies (6)

RE: RedMine_Charts: "Save Image Locally" option - Added by Akiko Takano over 8 years ago

Hello, Nanda.
I also hope to save image locally, and I've accessed the site where you gave.
It seems we have to implement the code to save by our own.

I tried to add some code on plugins/open_flash_chart/lib/open_flash_chart/open_flash_chart_object.rb and I could popup new page and render the target graph as png, which format is data:image/png;base64.
(But this worked when Firefrox only. IE8, nothing happened...)

Should I uploade my code?

RE: RedMine_Charts: "Save Image Locally" option - Added by Nanda P over 8 years ago

Hi Akiko,

For now I added a function "save_image" in the Java Script (\vendor\plugins\redmine_charts\assets\javascripts\charts.js)
to say "Save image locally is not available now".

function save_image() 
{ 
  alert('This function is not available at this time');
}

I just noticed, Maciej Szczytowski updated the code to save image locally. I will try it when I get some time.
http://github.com/mszczytowski/redmine_charts/tree/master

Regards,
Nanda

RE: RedMine_Charts: "Save Image Locally" option - Added by Akiko Takano over 8 years ago

Hello, Namda.
Thank you for your reply and I've found the code was updated.
So I just updated my chart plugin and the graph is now enabled to save locally.
(First, new window is opened and we can save the image PNG in a window)

This action is the same that I tried, but both works only Firefox.
When using IE8, I can't see new window.

Could you please let me know the result if you try?

RE: RedMine_Charts: "Save Image Locally" option - Added by Nanda P over 8 years ago

Hi Akiko,

I updated the changes in our testing server. It works as you said, I am able to save the chart as .PNG file on FireFox (3.5.2) (Did you notice, it is freezing RedMine for few moments?)

With IE nothing seems to happening. No

Will do some more research later today & Update you if I find any fix.

Regards,
Nanda

RE: RedMine_Charts: "Save Image Locally" option - Added by Nanda P over 8 years ago

in Google Chrome it works great!

(1-6/6)