Annotation Interface GraphProvider
DataPoint.
METHODS ANNOTATED BY THIS WILL BE TREATED CASE INSENSITIVE (all lowercase) to store data in the database.
The DataSource returned by this will sampled at specific times, defined by sampleInterval() and sampleIntervalUnit().
DataPoint can have multiple values per x-axis value, to provide multiple series.
You have a lot of control over how the graph is displayed with the metadata returned by the DataSource and properties in this annotation.
Requires capability DATA_EXTENSION_GRAPH_API.
Does not support Conditional.
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionName of the graph that is shown to users. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionColor preference of the plugin.Family of Font Awesome icon.Name of Font Awesome icon.intDisplay-priority of the graph, highest value is placed top most.intHow often this method should be called.How often this method should be called.Defines aHistoryStrategythe data will be appended to existing data.Define any aggregate functions the value series supports.booleanShould the values in the datapoint be stackable when graphed.intMaximum for x-axis, growing if necessary.intMinimum for x-axis, growing if necessary.Define what formatter to use for x-axis.intMaximum for y-axis, growing if necessary.intMinimum for y-axis, growing if necessary.
-
Element Details
-
displayName
-
priority
int priorityDisplay-priority of the graph, highest value is placed top most.Two values with same priority may appear in a random order.
- Returns:
- Priority between 0 and
Integer.MAX_VALUE.
- Default:
0
-
iconName
String iconNameName of Font Awesome icon.See FontAwesome (select 'free')) for icons and their
Family.- Returns:
- Name of the icon, if name is not valid no icon is shown.
- Default:
"chart-line"
-
iconFamily
Family iconFamilyFamily of Font Awesome icon.See FontAwesome (select 'free')) for icons and their
Family.- Returns:
- Family that matches an icon, if there is no icon for this family no icon is shown.
- Default:
SOLID
-
iconColor
Color iconColorColor preference of the plugin.This color will be set as the default color to use for plugin's elements.
- Returns:
- Preferred color. If none are specified defaults are used.
- Default:
NONE
-
xAxisType
XAxisType xAxisTypeDefine what formatter to use for x-axis.- Returns:
- by default XAxisType.DATE_MILLIS.
- Default:
DATE_MILLIS
-
xAxisSoftMin
int xAxisSoftMinMinimum for x-axis, growing if necessary.- Returns:
- disabled by default (Int min value).
- Default:
-2147483648
-
xAxisSoftMax
int xAxisSoftMaxMaximum for x-axis, growing if necessary.- Returns:
- disabled by default (Int min value).
- Default:
-2147483648
-
yAxisSoftMin
int yAxisSoftMinMinimum for y-axis, growing if necessary.- Returns:
- 0 by default.
- Default:
0
-
yAxisSoftMax
int yAxisSoftMaxMaximum for y-axis, growing if necessary.- Returns:
- 2 by default.
- Default:
2
-
sampleInterval
int sampleIntervalHow often this method should be called.For PlayerGraphDataSource minimum is 30 SECONDS. =120 points per hour per player, with 100 players =12000 points/hour
Storage requirements can be calculated with (points per hour) * (players) * 64 * (2 + y) where y is amount of values returned with DataPoint. y=1: 120 * 100 * 64 * (2 + 1) = 2.3 MB of data/hour = 17.3 days to fill up 1 GB.
Be considerate, try to aim for at least 30 days/1 GB.
For ServerGraphDataSource minimum is 5 SECONDS. = 720 points per hour
Recommended interval is 1 MINUTE or bigger, due to data storage size.
- Returns:
- by default returns 1.
- See Also:
- Default:
1
-
sampleIntervalUnit
TimeUnit sampleIntervalUnitHow often this method should be called.- Returns:
- by default returns TimeUnit.MINUTES.
- See Also:
- Default:
MINUTES
-
supportsStacking
boolean supportsStackingShould the values in the datapoint be stackable when graphed.This is useful if all values represent same kind of data.
If
ServerGraphDataSource.getSeriesMetadata()returns more than one unique unit name or format, this method will be ignored, since different units or valueFormats don't stack.- Returns:
- false by default.
- Default:
false
-
supportedAggregateFunctions
Aggregates[] supportedAggregateFunctionsDefine any aggregate functions the value series supports.Automatic aggregate numbers (As if using
NumberProvider) will be added to the sameTabif these are defined.- Returns:
- None by default.
- Default:
{}
-
strategy
HistoryStrategy strategyDefines aHistoryStrategythe data will be appended to existing data.- Returns:
HistoryStrategy.NO_HISTORYby default.
- Default:
NO_HISTORY
-