public class FunctionSeries extends java.lang.Object implements Series, com.mindfusion.scripting.SimpleEvaluationContextListener
Constructor and Description |
---|
FunctionSeries(java.util.function.Function<java.lang.Double,java.lang.Double> expression,
int size,
double maxX)
Initializes a new instance of the FunctionSeries class.
|
FunctionSeries(java.util.function.Function<java.lang.Double,java.lang.Double> expression,
int size,
double minX,
double maxX)
Initializes a new instance of the FunctionSeries class.
|
FunctionSeries(java.lang.String fxExpression,
int size,
double maxX)
Initializes a new instance of the FunctionSeries class.
|
FunctionSeries(java.lang.String fxExpression,
int size,
double minX,
double maxX)
Initializes a new instance of the FunctionSeries class.
|
Modifier and Type | Method and Description |
---|---|
void |
addDataChangedListener(DataChangedListener listener) |
void |
dispatchFunctionCall(com.mindfusion.scripting.EvaluateFunctionEventObject e)
Raised when a function name cannot be recognized one of the built-in functions,
to allow clients to evaluate the function call.
|
protected void |
fireDataChanged() |
int |
getDimensions()
Implements Series.getDimensions.
|
EvaluateFunction |
getEvaluateFunctionDelegate()
Gets a delegate called to evaluate unknown functions used in the expression.
|
java.lang.String |
getLabel(int index,
LabelKinds kind)
Implements Series.getLabel.
|
int |
getSize()
Implements Series.getSize.
|
java.util.EnumSet<LabelKinds> |
getSupportedLabels()
Implements Series.getSupportedLabels.
|
java.lang.String |
getTitle()
Implements Series.getTitle.
|
double |
getValue(int index,
int dimension)
Implements Series.getValue.
|
boolean |
isEmphasized(int index)
Implements Series.isEmphasized.
|
boolean |
isSorted(int dimension)
Implements Series.isSorted.
|
void |
removeDataChangedListener(DataChangedListener listener) |
void |
setEvaluateFunctionDelegate(EvaluateFunction value)
Sets a delegate called to evaluate unknown functions used in the expression.
|
void |
setTitle(java.lang.String value)
Sets the title of this series.
|
public FunctionSeries(java.util.function.Function<java.lang.Double,java.lang.Double> expression, int size, double maxX)
expression
- A functional interface or lambda expression that implements the function to plot.size
- An integer value specifying the number of values to calculate.maxX
- A double-precision number specifying the maximum value of function range.public FunctionSeries(java.util.function.Function<java.lang.Double,java.lang.Double> expression, int size, double minX, double maxX)
expression
- A functional interface or lambda expression that implements the function to plot.size
- An integer value specifying the number of values to calculate.minX
- A double-precision number specifying the minimum value of function range.maxX
- A double-precision number specifying the maximum value of function range.public FunctionSeries(java.lang.String fxExpression, int size, double maxX) throws java.lang.Exception
fxExpression
- A string specifying a mathematical expression to evaluate.size
- An integer value specifying the number of values to calculate.maxX
- A double-precision number specifying the maximum value of function range.java.lang.Exception
public FunctionSeries(java.lang.String fxExpression, int size, double minX, double maxX) throws java.lang.Exception
fxExpression
- A string specifying a mathematical expression to evaluate.size
- An integer value specifying the number of values to calculate.minX
- A double-precision number specifying the minimum value of function range.maxX
- A double-precision number specifying the maximum value of function range.java.lang.Exception
public double getValue(int index, int dimension)
public java.lang.String getLabel(int index, LabelKinds kind)
public boolean isSorted(int dimension)
public boolean isEmphasized(int index)
isEmphasized
in interface Series
index
- An integer value specifying the index of a data item.public int getSize()
public int getDimensions()
getDimensions
in interface Series
public java.lang.String getTitle()
public void setTitle(java.lang.String value)
value
- A String containing series' title.public java.util.EnumSet<LabelKinds> getSupportedLabels()
getSupportedLabels
in interface Series
LabelKinds
enumset.public EvaluateFunction getEvaluateFunctionDelegate()
EvaluateFunction
instance.public void setEvaluateFunctionDelegate(EvaluateFunction value)
value
- An EvaluateFunction
instance.protected void fireDataChanged()
public void addDataChangedListener(DataChangedListener listener)
addDataChangedListener
in interface Series
public void removeDataChangedListener(DataChangedListener listener)
removeDataChangedListener
in interface Series
public void dispatchFunctionCall(com.mindfusion.scripting.EvaluateFunctionEventObject e)
com.mindfusion.scripting.SimpleEvaluationContextListener
dispatchFunctionCall
in interface com.mindfusion.scripting.SimpleEvaluationContextListener