2012-01-18 77 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