Creates trendLines in the chart.
trendLines="trendLines"
where:
| Argument | Default | Description |
|---|---|---|
| trendLines | null | A comma-separated string of trendLines: trendLines="[trendLine1],[trendLine2],...,[trendLineN]" Each trendline is a semicolon separated string of parameter=value pairs:
param1=value1;param2=value2;...;paramN=valueN Valid
parameters are:
|
trendLines can be added to line, bar, area or scatter charts. The trendLines added can be modified by end users via the Chart > trendLines... option from the menu bar.



Custom trendline algorithms
<trend-type id="polynomial"> <display-name lang="en">Polynomial</display-name> <class>com.alphablox.blox.uimodel.core.chart.trending.PolynomialFitAlgorithm</class> </trend-type>In order for the class to be loaded, the default class loader must be able to find the class. In addition, your custom trending algorithm class must extend com.alphablox.blox.uimodel.core.chart.trending.AbstractTrendingAlgorithm. See the Javadoc documentation of this class for further details.
A simple custom trending algorithm example
public class myTrendingAlgorithm extends AbstractTrendingAlgorithm {
public void initialize(Number[] x, Number[] y, Chart chart) {
}
public Double f(Number x) {
// create your algorithm
return new Double(x == null ? 0 : (20 + (x.doubleValue() * 20)));
}
public boolean isForecastEnabled() {
return true;
}
public void setUserParameter(Object parameter) {
}
public boolean isScatterSupported() {
return true;
}
public void parseSavedParameters(String parameters) {
super.parseSavedParameters(parameters);
}
public String getParameterString() {
return super.getParameterString();
}
public boolean isNullAllowed() {
return true;
}
}
Installation of custom trending algorithms
trendLines="name=poly(3);member=All Locations:All Locations; replace=true; type=polynomial(3), name=line;member=All Locations:Central;type=linear"
This creates a polynomial trendline plotted for each member in All Locations, whereas the Central location has a linear trendline. The original data series lines/bars are replaced (replace=true).