2012-01-18 99 views
0
public static JFreeChart createPieChart(java.lang.String title, 
         PieDataset dataset, 
         boolean legend, 
         boolean tooltips, 
         boolean urls) 

我想知道如何使用最后一个参数url;了解jfreechart中的饼图

这是什么意思?

它的任何例子?

配置图表以生成URL?这是什么意思?

回答

1

通过google搜索,我发现的ChartFactoryhttp://www.jfree.org/jfreechart/api/gjdoc/org/jfree/chart/ChartFactory-source.html

该代码寻找中使用URL出现的新StandardPieURLGenerator

的jsfreechart帮助一个实例的测试告诉:

Interface for a URL generator for plots that use data from a PieDataset. Classes that implement this interface: 
- are responsible for correctly escaping any text that is derived from the dataset, as this may be user-specified and could pose a security risk; 
- should be either (a) immutable, or (b) cloneable via the PublicCloneable interface (defined in the JCommon class library). This provides a mechanism for the referring plot to clone the generator if necessary. 

http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/urls/PieURLGenerator.html

我希望这可以提供帮助。

+0

能请你提供实施它的例子的链接。 – 2012-01-18 08:22:10

+0

@HemantMetalia:有一个使用'StandardPieURLGenerator' [这里](http://stackoverflow.com/a/6295405/230513)的例子。 – trashgod 2012-01-18 09:00:47