Interface IAbstractBarVisualSet<T,C>
- Type Parameters:
T- visual set data elements typeC- data categories type
- All Known Implementing Classes:
BarVisualSet,HistogramVisualSet,WaterfallVisualSet
public interface IAbstractBarVisualSet<T,C>
Interface that is the parent for all visual sets with rectangle-visuals
corresponding to the statistical data by categories as well as histograms.
- Author:
- Aleksey Kirillov
-
Method Summary
Modifier and TypeMethodDescriptiongetBackgroundColor(C category) Returns the background color for given category.getBorderColor(C category) Returns the border color for given category.doublegetBorderWidth(C category) Returns the border width in pixels for given category.Returns the list of data categories.doubleReturns the width fraction to region allocated for each individual category-bar.getElementText(T element) Returns the label text for each data element.getLegendLabelText(C category) Returns the legend label text for given category.doubleReturns the maximum possible value that stored in the current data elements list.doubleReturns the maximum value for any data group within all existed data elements.doublegetMaxGroupValue(Predicate<C> categoryPredicate) Returns the maximum value for any data group within all existed data elements.doubleReturns the maximum value for any category within all existed data elements.doublegetMaxValueByAnyCategory(Predicate<C> categoryPredicate) Returns the maximum value between given filtered categories within all existed data elements.doubleReturns the minimum possible value that stored in the current data elements list.doubleReturns the ratio of the value for the maximum group to the total sum of the all values across the entire statistics.doublegetPercentOfMaxValue(Predicate<C> categoryPredicate) Returns the ratio of the value for the maximum group to the total sum of the all values across the entire statistics.doublegetSummaryValue(T element) Returns the total value for all categories within the given data element.doublegetSummaryValue(T element, Predicate<C> categoryPredicate) Returns the total value for specified categories within the specified data element.doubleReturns the value for given category within the given data element.List<? extends VisualSet<?>.VisualElement> getVisualElements(boolean recalculationRequired) Returns the list of visual elements corresponding to current data elements.setBackgroundColor(Function<C, Color> backgroundColorExtractor) Sets the background color for each category.setBorderColor(Function<C, Color> borderColorExtractor) Sets the border color for each category.setBorderWidth(Function<C, Double> borderWidthExtractor) Sets the border width in pixels for each category.setElementText(Function<T, String> elementTextExtractor) Sets the label text for each data element.setLegendLabelText(Function<C, String> legendLabelTextExtractor) Sets the legend label text for each category.
-
Method Details
-
setBackgroundColor
Sets the background color for each category. The color may be different for different categories and it does not depend on different data elements. Also used to display a color icon in theLegend.- Parameters:
backgroundColorExtractor- the background color extractor, i.e. method returning color depending on the category- Returns:
- reference to this object
-
setBorderColor
Sets the border color for each category. The color may be different for different categories and it does not depend on different data elements.- Parameters:
borderColorExtractor- the border color extractor, i.e. method returning color depending on the category- Returns:
- reference to this object
-
setBorderWidth
Sets the border width in pixels for each category. The width may be different for different categories and it does not depend on different data elements.- Parameters:
borderWidthExtractor- the border width extractor, i.e. method returning the width depending on the category- Returns:
- reference to this object
-
getBackgroundColor
Returns the background color for given category.- Parameters:
category- category for which the background color is being checked- Returns:
- the background color for given category
-
getBorderColor
Returns the border color for given category.- Parameters:
category- category for which the border color is being checked- Returns:
- the border color for given category
-
getBorderWidth
Returns the border width in pixels for given category.- Parameters:
category- category for which the border width in pixels is being checked- Returns:
- the border width in pixels for given category
-
setLegendLabelText
Sets the legend label text for each category.- Parameters:
legendLabelTextExtractor- the legend label text extractor, i.e. method returning text depending on the category- Returns:
- reference to this object
-
getLegendLabelText
Returns the legend label text for given category.- Parameters:
category- category for which the legend label text is being checked- Returns:
- the legend label text for given category
-
setElementText
Sets the label text for each data element. This label is displayed on the ticks of the X-axis, below the corresponding bars.- Parameters:
elementTextExtractor- the text of the bar label- Returns:
- reference to this object
-
getElementText
Returns the label text for each data element.- Parameters:
element- data element for which the label text is being checked- Returns:
- the label text for each data element
-
getColumnWidthFraction
double getColumnWidthFraction()Returns the width fraction to region allocated for each individual category-bar.- Returns:
- the width fraction to region allocated for each individual category-bar
-
getCategories
Returns the list of data categories.- Returns:
- the list of data categories
-
getMinArgument
double getMinArgument()Returns the minimum possible value that stored in the current data elements list.- Returns:
- the minimum possible value that stored in the current data elements list
-
getMaxArgument
double getMaxArgument()Returns the maximum possible value that stored in the current data elements list.- Returns:
- the maximum possible value that stored in the current data elements list
-
getPercentOfMaxValue
double getPercentOfMaxValue()Returns the ratio of the value for the maximum group to the total sum of the all values across the entire statistics.- Returns:
- the ratio of the value for the maximum group to the total sum of the all values across the entire statistics
-
getPercentOfMaxValue
Returns the ratio of the value for the maximum group to the total sum of the all values across the entire statistics.Considers only the categories filtered by the corresponding predicate.
- Parameters:
categoryPredicate- filter for categories for which the ratio is calculated- Returns:
- the ratio of the value for the maximum group to the total sum of the all values across the entire statistics
-
getMaxGroupValue
double getMaxGroupValue()Returns the maximum value for any data group within all existed data elements. The data group in the case of a histogram is the range of the X-axis arguments, and in the case of a bar chart, each individual data element.- Returns:
- the maximum value for any data group within all existed data elements
-
getMaxGroupValue
Returns the maximum value for any data group within all existed data elements.The data group in the case of a histogram is the range of the X-axis arguments, and in the case of a bar chart, each individual data element.
Considers only the categories filtered by the corresponding predicate.
- Parameters:
categoryPredicate- filter for categories for which the maximum value is calculated- Returns:
- the maximum value for any data group within all existed data elements
-
getMaxValueByAnyCategory
double getMaxValueByAnyCategory()Returns the maximum value for any category within all existed data elements.- Returns:
- the maximum value for any category within all existed data elements
-
getMaxValueByAnyCategory
Returns the maximum value between given filtered categories within all existed data elements.- Parameters:
categoryPredicate- filter for categories for which the maximum value is calculated- Returns:
- the maximum value between given filtered categories within all existed data elements
-
getValue
Returns the value for given category within the given data element.- Parameters:
element- data element for which the total value is being checkedcategory- category for which the total value is being checked- Returns:
- the value for given category within the given data element
-
getSummaryValue
Returns the total value for all categories within the given data element.- Parameters:
element- data element for which the total value is being checked- Returns:
- the total value for all categories within the given date element
-
getSummaryValue
Returns the total value for specified categories within the specified data element.- Parameters:
element- data element for which the total value is being checkedcategoryPredicate- filter for categories for which the amount is calculated- Returns:
- the total value for specified categories within the specified data element
-
getVisualElements
Returns the list of visual elements corresponding to current data elements. Cannot be changed by the user.- Parameters:
recalculationRequired- flag of the need to recalculate the visual elements- Returns:
- the list of visual elements corresponding to current data elements
-