org.pentaho.chart
Class ChartUtils
java.lang.Object
org.pentaho.chart.ChartUtils
- Direct Known Subclasses:
- JFreeChartUtils
public class ChartUtils
- extends Object
Method Summary |
static Font |
getFont(ChartElement currentSeries)
This method creates a Font object based on the font-family, font-size, and
font-style defined in the chart xml doc for the current series |
static Font |
getFont(String fontFamily,
CssStyle.FontStyle fontStyle,
CssStyle.FontWeight fontWeight,
Integer fontSize)
|
static String |
getFontFamily(ChartElement currentSeries)
|
static float |
getFontSize(ChartElement element)
CSSFontSize values: xx-small, x-small, small, medium, large, x-large, xx-large
are mapped to certain integer values based on ChartCSSFontSizeMappingConstants file. |
static org.pentaho.reporting.libraries.css.values.CSSValue |
getFontStyle(ChartElement element)
|
static org.pentaho.reporting.libraries.css.values.CSSValue |
getFontWeight(ChartElement element)
|
ChartUtils
public ChartUtils()
getFont
public static Font getFont(String fontFamily,
CssStyle.FontStyle fontStyle,
CssStyle.FontWeight fontWeight,
Integer fontSize)
getFont
public static Font getFont(ChartElement currentSeries)
- This method creates a Font object based on the font-family, font-size, and
font-style defined in the chart xml doc for the current series
- Parameters:
currentSeries
- Current series element
- Returns:
- Font The font object created based on the current series font css style
getFontFamily
public static String getFontFamily(ChartElement currentSeries)
getFontWeight
public static org.pentaho.reporting.libraries.css.values.CSSValue getFontWeight(ChartElement element)
getFontStyle
public static org.pentaho.reporting.libraries.css.values.CSSValue getFontStyle(ChartElement element)
getFontSize
public static float getFontSize(ChartElement element)
- CSSFontSize values: xx-small, x-small, small, medium, large, x-large, xx-large
are mapped to certain integer values based on ChartCSSFontSizeMappingConstants file.
CSSFontSize values: smaller, larger, and % are based on parent values. Hence for that
we establish the current series font size based on the parent font size value.
- Parameters:
element
- The current series element that would be looked for the font style
- Returns:
- float The font size for the current series element.