Class ChartHelper
java.lang.Object
com.atlassian.jira.charts.jfreechart.ChartHelper
A nice utility class to manage the generation of a charts.
The original implementation use jfreechart's one time image mechanism which can lead to JRA-21854.
New implementation is using data uri mechanism (inlining base64 encoded images directly)
so the generate(int, int)
and getLocation()
methods are here just for
backward compatibility.
When you are going to create new kind of chart you should use generateInline(int, int)
instead of generate(int, int)
- Since:
- v4.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionChartHelper
(org.jfree.chart.JFreeChart chart) ChartHelper
(org.jfree.chart.JFreeChart chart, TempFileFactory tempFileFactory, ChartUtils chartUtils) -
Method Summary
Modifier and TypeMethodDescriptionvoid
generate
(int width, int height) Deprecated.JRA-21854 images should be rendered using data uri.void
generateInline
(int width, int height) Generates chart "into the memory" which can be later retrieved viagetImage()
method.org.jfree.chart.JFreeChart
getChart()
getImage()
Retrieve image that has been generated withgenerateInline(int, int)
Deprecated.Use #getImageMapHtmlDeprecated.use inline chartsorg.jfree.chart.ChartRenderingInfo
-
Constructor Details
-
ChartHelper
public ChartHelper(org.jfree.chart.JFreeChart chart) -
ChartHelper
@Internal public ChartHelper(org.jfree.chart.JFreeChart chart, TempFileFactory tempFileFactory, ChartUtils chartUtils)
-
-
Method Details
-
getChart
public org.jfree.chart.JFreeChart getChart() -
generateInline
Generates chart "into the memory" which can be later retrieved viagetImage()
method.- Throws:
IOException
-
generate
Deprecated.JRA-21854 images should be rendered using data uri. Please usegenerateInline(int, int)
- Throws:
IOException
- See Also:
-
getRenderingInfo
public org.jfree.chart.ChartRenderingInfo getRenderingInfo() -
getLocation
Deprecated.use inline charts- See Also:
-
getImageMap
Deprecated.Use #getImageMapHtml -
getImageMapHtml
- Since:
- v6.0
-
getImageMapName
-
getImage
Retrieve image that has been generated withgenerateInline(int, int)
- Returns:
- generated image or
null
if thegenerateInline(int, int)
method has not been used.
-