001    package railo.runtime.chart;
002    
003    import java.text.AttributedString;
004    
005    import org.jfree.chart.labels.PieSectionLabelGenerator;
006    import org.jfree.data.general.PieDataset;
007    
008    import railo.runtime.op.Caster;
009    
010    public class PieSectionLabelGeneratorImpl implements PieSectionLabelGenerator {
011    
012            private int labelFormat; 
013    
014            public PieSectionLabelGeneratorImpl(int labelFormat) {
015                    this.labelFormat=labelFormat;
016            }
017    
018            public AttributedString generateAttributedSectionLabel(PieDataset arg0, Comparable arg1) {
019                    return null;
020            }
021    
022            public String generateSectionLabel(PieDataset pd, Comparable c) {
023                    double value = Caster.toDoubleValue(pd.getValue(c),0.0);
024                    return LabelFormatUtil.format(labelFormat, value);
025                    }
026                    
027                    
028    
029    }