Download & Extend

Patch to add width/height to <img> tag with Google Charts

Project:Charts and Graphs
Version:6.x-2.7
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

Here is a patch to set the width/height on the <img> tag when generating a chart using Google Charts. This can be helpful because your layout won't jump once the image finishes loading.

Personally, I encountered a problem putting a Google Chart (built by graphs_charts) in a dashboard widget using homebox. Homebox uses JavaScript to get the height of each widget on page load. When the chart isn't already cached by the browser, homebox gets the height wrong so the widget is cut off. This patch fixes this problem.

Please let me know what you think!

Regards,
David.

AttachmentSize
google-img-size.patch646 bytes
nobody click here