Package com.jalios.jtaglib
Class ChartTagBeautifier
java.lang.Object
com.jalios.util.Beautifier
com.jalios.jtaglib.ChartTagBeautifier
- Since:
- jcms-5.0.0
- Author:
- Olivier Jaquemet
-
Field Summary
Fields inherited from class com.jalios.util.Beautifier
html, locale, truncate -
Constructor Summary
ConstructorsConstructorDescriptionChartTagBeautifier(Beautifier beautifier) ChartTagBeautifier(Beautifier beautifier, Beautifier legendBeautifier) -
Method Summary
Modifier and TypeMethodDescriptionString beautifier.beautifyLegend(String legend) Called for each legend of the the chart with no value.beautifyLegend(String legend, Integer[] values) Called for each legend of the chart which has a value associated to it.beautifyTitle(String title) String beautifier for the chart title.voidprintChartElementClass(StringBuffer sb, String legend, int value, String display) Called for each value in chart, allow you to add any class to this value.voidprintChartElementStyle(StringBuffer sb, String legend, int value, String display) Called for each value in chart, allow you to add any style to this value.voidMethods inherited from class com.jalios.util.Beautifier
getHtml, getLocale, setHtml
-
Constructor Details
-
ChartTagBeautifier
public ChartTagBeautifier() -
ChartTagBeautifier
-
ChartTagBeautifier
-
-
Method Details
-
beautify
String beautifier.- Overrides:
beautifyin classBeautifier
-
printChartElementStyle
Called for each value in chart, allow you to add any style to this value. For example: if (value > 90) { sb.append("background-color: red;"); } else { sb.append("background-color: blue;"); }- Parameters:
sb- the string buffer to append tolegend- the legend associated with this valuevalue- the value printeddisplay- the format of the chart (see CharTag.DISPLAY_VCHART ChartTag.DISPLAY_HCHART)
-
printChartElementClass
Called for each value in chart, allow you to add any class to this value. For example: if (value > 90) { sb.append("importantValue"); } else { sb.append("basicValue"); }- Parameters:
sb- the string buffer to append tolegend- the legend associated with this valuevalue- the value printeddisplay- the format of the chart (see CharTag.DISPLAY_VCHART ChartTag.DISPLAY_HCHART)
-
beautifyTitle
String beautifier for the chart title.- Parameters:
title- string to beautify- Returns:
- the beautified string
-
beautifyLegend
Called for each legend of the chart which has a value associated to it.- Parameters:
legend- the legend to beautifyvalues- the value associated with this legend- Returns:
- the beautified legend
-
beautifyLegend
Called for each legend of the the chart with no value.- Parameters:
legend- the legend to beautify- Returns:
- the beautified legend
-
setLocale
- Overrides:
setLocalein classBeautifier
-