I'm developping a custom gadget to create my own charts. The most implemented way I found so far is:
Create new rest pluging, in this plugin you draw your graph, using JFreeChart, to a png and provide that png as a link to your gadget.
I know some jira plugins use this way to create charts, ie the "Created vs. Resolved Chart". The image link is: http://[jira]/charts?filename=jfreechart-onetime-[randomNr].png.
But when I look at the "Agile Classic Hour Burndown Chart" (also by atlassian). This gadget does not load a simple png. But It looks like it is drawn drawn dynamically on a HTML5 canvas. Are there any examples available on this way of creating charts?
What are the differences between these two ways of creating charts? When should I use one or the other?
Community moderators have prevented the ability to post new answers.
What I did:
The advantage is that you cal style the chart so it looks like the a normal jira chart. Including mouse overs and bar clicks.
Hans & Paul pasler
I tried both but in vain
While flotcharts complains about the missing function be it either AJS.$.plot(placeholder,data,options) or $.plot(placeholder,data,options)
using a plain jfreechart method generates a file name with the extension .png but i cannot find the physical location of the image file. more over not sure whetehr the image is generated or not.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To use Flot, include the Flot Javascript resource. Then you can use AJS.$.plot() in your gadget spec.
Don't forget to define a width and height for the "placeholder" element.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could anyone assist on how to import the Flot resource in the gadget.xml file? Have been trying to make a pie chart for some time now but can't get it to work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hans, I had a similar Problem.
Greenhopper (JIRA Agile) is using the jQuery Flot API (http://www.flotcharts.org), which is easily to use and style. (Be careful with stacked bar charts and have a look at flot-plugins)
In my opinion, you should use a javascript soluton, if you want any kind of user interaction (Hover, Click, Zoom, etc). Another advantage is, that you can outsource the render-work to the client.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hans & Paul pasler
I tried both but in vain
While flotcharts complains about the missing function be it either AJS.$.plot(placeholder,data,options) or $.plot(placeholder,data,options)
using a plain jfreechart method generates a file name with the extension .png but i cannot find the physical location of the image file. more over not sure whetehr the image is generated or not.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.