September 09, 2010, 06:05 AM
shakila25 [CLOSED] Pie Graph PDF Legend Text Font Size 10 version 7.6.9
Hi,
The font size of the Legendtext in the Pie Graph of a PDF report should be 10. But even, specified in the below code of the graph as 10 , it is not displaying the font size as 10.Instead the legendtext is displayed as 10.5
Anyone, please suggest how to get the font size of 10 Legendtext in the Pie Graph?
Code:
setLegendMarkerPosition(0);
setLegendPosition(2);
setLegendTextAutofit(false);
setMarkerShape(getLegendMarker(),3);
setLegendAutomatic(false);
setLegendOrient(0);
setLegendRect(new Rectangle(8000,-14000,16000,9000));
setPieTilt(0);
setFillColor(getSeries(0),new Color(207,244,247));
setAxisAssignment(getSeries(1),0);
setFillColor(getSeries(1),new Color(224,224,0));
setAxisAssignment(getSeries(2),0);
setFillColor(getSeries(2),new Color(160,160,255));
setAxisAssignment(getSeries(3),0);
setFillColor(getSeries(3),new Color(0,224,0));
setAxisAssignment(getSeries(4),0);
setFillColor(getSeries(4),new Color(255,32,32));
setFontSizeAbsolute(getPieSliceLabel(), true);
setFontSizeInPoints(getPieSliceLabel(), 10);
setFillType(getColorByHeight(),2);
setRect(getPieFrame(),new Rectangle(-17000,-13400,19000,24000));
setPlace(false);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
-*
setMarkerDisplay(true);
setConnectLineMarkers(true);
setConnectScatterMarkers(true);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
-*
setPieFeelerTextDisplay(2);
setPieFeelerTextFormat(2);
setPieSorting(3);
-*
setFillColor(getSeries(0),new Color(097,120,175));
setFillColor(getSeries(1),new Color(163,088,107));
setFillColor(getSeries(2),new Color(117,174,108));
setFillColor(getSeries(3),new Color(119,079,136));
setFillColor(getSeries(4),new Color(101,149,171));
setFillColor(getSeries(5),new Color(201,134,101));
-*
setPlaceResize(getPieSliceLabel(),0);
-*
setPieLabelDisplay(1);
setTextFormatPreset(getPieSliceLabel(),2);
setLegendDisplay(true);
setFontSizeAbsolute(getLegendText(), true);
setFontSizeInPoints(getLegendText(), 10);
setLegendTextAutofit(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setFontSizeAbsolute(getO1Label(),true);
setPieRotate(15);
This message has been edited. Last edited by: Kerry , September 20, 2010 02:48 PM September 13, 2010, 12:33 AM
krishkasi Am also facing the same issue for one of my Pie graphs in 769. Am trying to capture the output as SVG and displaying it in the report.
I set the font also to Arial as follows
setFontSizeAbsolute(getLegendText(), true);
setFontName(getLegendText(), "Arial");
setFontSizeInPoints(getLegendText(), 10);
Even after that it showed the labels with font size as 10.5 instead of 10.
Other alternate I tried was as follows
setFontSizeAbsolute(getLegendText(), false);
setFontName(getLegendText(), "Arial");
setFontSizeVC(getLegendText(), 1130);
Until the pint size 1129, the font size is 9. While setting it to 1130, font size turn to 10.5.