public class ChartHelper extends Object
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)
ChartUtils
Constructor and Description |
---|
ChartHelper(org.jfree.chart.JFreeChart chart) |
ChartHelper(org.jfree.chart.JFreeChart chart,
TempFileFactory tempFileFactory,
ChartUtils chartUtils) |
Modifier and Type | Method and Description |
---|---|
void |
generate(int width,
int height)
Deprecated.
JRA-21854 images should be rendered using data uri.
Please use
generateInline(int, int) |
void |
generateInline(int width,
int height)
Generates chart "into the memory" which can be later retrieved via
getImage() method. |
org.jfree.chart.JFreeChart |
getChart() |
BufferedImage |
getImage()
Retrieve image that has been generated with
generateInline(int, int) |
String |
getImageMap()
Deprecated.
Use #getImageMapHtml
|
String |
getImageMapHtml() |
String |
getImageMapName() |
String |
getLocation()
Deprecated.
use inline charts
|
org.jfree.chart.ChartRenderingInfo |
getRenderingInfo() |
public ChartHelper(org.jfree.chart.JFreeChart chart)
@Internal public ChartHelper(org.jfree.chart.JFreeChart chart, TempFileFactory tempFileFactory, ChartUtils chartUtils)
public org.jfree.chart.JFreeChart getChart()
public void generateInline(int width, int height) throws IOException
getImage()
method.IOException
@Deprecated public void generate(int width, int height) throws IOException
generateInline(int, int)
IOException
getImage()
public org.jfree.chart.ChartRenderingInfo getRenderingInfo()
@Deprecated public String getLocation()
getImage()
,
ChartUtils
public String getImageMap()
public String getImageMapHtml()
public String getImageMapName()
public BufferedImage getImage()
generateInline(int, int)
null
if the
generateInline(int, int)
method has not been used.Copyright © 2002-2019 Atlassian. All Rights Reserved.