Package de.xima.fc.gui.bean.statistics
Class StatisticsTopListBean
- java.lang.Object
-
- de.xima.fc.gui.bean.statistics.AStatisticsBean
-
- de.xima.fc.gui.bean.statistics.StatisticsTopListBean
-
- All Implemented Interfaces:
Serializable
@Named @ViewScoped public class StatisticsTopListBean extends AStatisticsBean
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class de.xima.fc.gui.bean.statistics.AStatisticsBean
localeBean, MIME_TYPE_EXCEL, MIME_TYPE_PDF, SUFFIX_EXCEL, SUFFIX_IMAGE, SUFFIX_PDF
-
-
Constructor Summary
Constructors Constructor Description StatisticsTopListBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
calcChartHeight()
Calculate the height of the chart.org.primefaces.model.StreamedContent
exportExcel()
Export the data as an Excel via p:fileDownload.int
getAmount()
List<Integer>
getAmounts()
EProjectAttribute
getAttribute()
List<EProjectAttribute>
getAttributes()
String
getChartWidgetVar()
String
getImageFilename()
org.primefaces.model.charts.bar.BarChartModel
getModel()
List<Date>
getRange()
void
resetRange()
Reset the time range to null and update the model.void
setAmount(int amount)
void
setAttribute(EProjectAttribute attribute)
void
setRange(List<Date> range)
void
updateModel()
Update the model of the chart.-
Methods inherited from class de.xima.fc.gui.bean.statistics.AStatisticsBean
insertImageFilename
-
-
-
-
Method Detail
-
getModel
public org.primefaces.model.charts.bar.BarChartModel getModel()
-
getAttribute
public EProjectAttribute getAttribute()
-
setAttribute
public void setAttribute(EProjectAttribute attribute)
-
getAttributes
public List<EProjectAttribute> getAttributes()
-
setAmount
public void setAmount(int amount)
-
getAmount
public int getAmount()
-
calcChartHeight
public int calcChartHeight()
Calculate the height of the chart. The height is determined by the size of the displayed dataset. The height is at least 100px and increases by 30px for each dataset entry.- Returns:
- height of the chart
-
updateModel
public void updateModel()
Update the model of the chart. The necessary data is retrieved from the database and processed. The Y-Axis is labeled with the project names. The X-Axis is the amount of either calls, submits or errors. The color of the bars is determined by the selected attribute. This method should be called, when attribute/amount/range is changed.
-
resetRange
public void resetRange()
Reset the time range to null and update the model.
-
exportExcel
public org.primefaces.model.StreamedContent exportExcel()
Export the data as an Excel via p:fileDownload.- Returns:
- streamed content of the Excel file
-
getImageFilename
public String getImageFilename()
- Specified by:
getImageFilename
in classAStatisticsBean
- Returns:
- The file name for the image file.
-
getChartWidgetVar
public String getChartWidgetVar()
- Specified by:
getChartWidgetVar
in classAStatisticsBean
- Returns:
- The chart widget var.
-
-