com.steema.teechart.styles
Class ValueList

java.lang.Object
  extended by com.steema.teechart.TeeBase
      extended by com.steema.teechart.styles.ValueList
All Implemented Interfaces:
java.io.Serializable

public final class ValueList
extends TeeBase

Title: ValueList class

Description: Array to hold Series data point values.

Copyright (c) 2005-2008 by Steema Software SL. All Rights Reserved.

Company: Steema Software SL

See Also:
Serialized Form

Field Summary
 int capacity
           
 int count
           
static int defaultCapacity
           
protected  java.lang.String name
           
 ISeries series
           
 boolean statsOk
           
 double tempValue
           
 double[] value
           
 java.lang.String valueSource
           
 
Fields inherited from class com.steema.teechart.TeeBase
chart
 
Constructor Summary
ValueList(ISeries s, java.lang.String name)
           
ValueList(ISeries s, java.lang.String name, int initialCapacity)
           
 
Method Summary
 DateTime asDateTime(int index)
           
 void assign(ValueList value)
           
 void clear()
          Removes all values in the list.
 void exchange(int index1, int index2)
           
 void fillSequence()
          Renumbers all values in a ValueList class starting at zero.
 int getCount()
           
 java.lang.String getDataMember()
          Field to use as source for this value list.
 boolean getDateTime()
          Allows values to be expressed either as numbers or as Date+Time values.
 double getFirst()
          Returns the First point value.
 double getLast()
          Returns the Last point value.
 double getMaximum()
          The highest of all values in the list.
 double getMaxValue()
          Obsolete.
 double getMinimum()
          The lowest of all values in the list.
 double getMinValue()
          Obsolete.
 java.lang.String getName()
          Returns the name of this ValueList.
 ValueListOrder getOrder()
          Determines if points are automatically sorted or left at original position.
 double getRange()
           
 double getTotal()
          The sum of all IValueList values.
 double getTotalABS()
          The sum of all absolute values in the list.
 double getValue(int index)
           
 double[] getValues()
           
 int indexOf(double value)
          Returns the corresponding point index which has the specified Value.
 int locate(double value)
          Obsolete.
 void removeAt(int index)
           
 void removeRange(int index, int count)
           
 void setCount(int value)
           
 void setDataMember(java.lang.String value)
          Field to use as source for this value list.
 void setDateTime(boolean value)
          Allows values to be expressed either as numbers or as Date+Time values.
 void setName(java.lang.String name)
          Returns the name of this ValueList.
 void setOrder(ValueListOrder value)
          Determines if points are automatically sorted or left at original position.
 void setValue(int index, double value)
           
 void setValues(double[] value)
           
 void sort()
          Re-orders Series points, interchanging their position in the Series Values lists.
 void trim()
           
 
Methods inherited from class com.steema.teechart.TeeBase
getChart, invalidate, setBooleanProperty, setChart, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultCapacity

public static int defaultCapacity

value

public double[] value

count

public int count

capacity

public transient int capacity

statsOk

public transient boolean statsOk

tempValue

public transient double tempValue

valueSource

public transient java.lang.String valueSource

series

public transient ISeries series

name

protected java.lang.String name
Constructor Detail

ValueList

public ValueList(ISeries s,
                 java.lang.String name)

ValueList

public ValueList(ISeries s,
                 java.lang.String name,
                 int initialCapacity)
Method Detail

getDataMember

public java.lang.String getDataMember()
Field to use as source for this value list.
Default value: ""

Returns:
String

setDataMember

public void setDataMember(java.lang.String value)
Field to use as source for this value list.
Default value: ""

Parameters:
value - String

getDateTime

public boolean getDateTime()
Allows values to be expressed either as numbers or as Date+Time values.

Each Series value list has a boolean property called DateTime. The boolean DateTime method tells TeeChart what type the numbers are. The horizontal (x axis) and vertical (y axis) value defaults are number format (DateTime False). DateTime can be changed both at design-time and run-time, forcing the Chart to repaint. It used whenever a value must be converted to text, for example, to draw it as the chart axis labels. Axis labels will be drawn in DateTime or numeric format accordingly to the setting of the DateTime method.

You can also set the Chart Series ValueFormat and the Chart Axis DateTimeFormat formatting strings, to control how the values will be displayed.
Default value: false

Returns:
boolean

setDateTime

public void setDateTime(boolean value)
Allows values to be expressed either as numbers or as Date+Time values.
Default value: false

Parameters:
value - boolean

getOrder

public ValueListOrder getOrder()
Determines if points are automatically sorted or left at original position.
Runtime only.
This Order is used by default by the Series XValues to draw lines from Left to Right. Setting the XValues.Order property to loNone will respect the points order at point creation. This can be used to draw polygons.
Default value: None

Returns:
ValueListOrder

setOrder

public void setOrder(ValueListOrder value)
Determines if points are automatically sorted or left at original position.
Runtime only.
Default value: None

Parameters:
value - ValueListOrder

setName

public void setName(java.lang.String name)
Returns the name of this ValueList. The Name property can be used to link series when using functions. You can link one series ValueList to another series list, by using the setDataMember method. For example: mySeries.setDataSource( myCandle ); mySeries.getYValues().setDataMember(myCandle.getHighValues().getName());

Parameters:
name - String

getName

public java.lang.String getName()
Returns the name of this ValueList. The "Name" property is used as the "dataMember" of other series when they are linked through functions.

Returns:
String

clear

public void clear()
Removes all values in the list. Warning: You should not call this "clear" method directly. Call the series "clear" method instead.


indexOf

public int indexOf(double value)
Returns the corresponding point index which has the specified Value.
You can use it for example to obtain X co-ordinates based on Y values, or vice-versa.

Parameters:
value - double
Returns:
int

removeRange

public void removeRange(int index,
                        int count)

removeAt

public void removeAt(int index)

sort

public void sort()
Re-orders Series points, interchanging their position in the Series Values lists.
By default, Series are set to sort points in ascending order using their X coordinates. This is accomplished with this code:

[C#]
tChart1.getSeries(0).getXValues().setOrder( loAscending )
tChart1.getSeries(0).getYValues().setOrder( loNone )

By default, Series draw points using the point ValueIndex, except in some non common situations like having the horizontal axis inverted.
Important Note: Re-Ordering Series points do NOT change point X coordinates. Series points which have no X coordinates are assigned a unique incremental number to determine the point horizontal positions. Automatic Point indexes start at zero. You will need to change every point X coordinate when sorting Series points with automatic X values.


trim

public void trim()

getFirst

public double getFirst()
Returns the First point value.

Returns:
double

getLast

public double getLast()
Returns the Last point value.
This is the same value as the Count - 1 index value:

Returns:
double

locate

public int locate(double value)
Obsolete. Please use IndexOf method instead.

Parameters:
value - double
Returns:
int

assign

public void assign(ValueList value)

getRange

public double getRange()
Returns:
double

getMaximum

public double getMaximum()
The highest of all values in the list.
As new points are being added to Series, the IValueList object calculates the Maximum, Minimum and TotalABS properties.
This applies to all Series lists of values, such as XValues, YValues, etc.

Returns:
double

getMaxValue

public double getMaxValue()
Obsolete. Please use Maximum method instead.

Returns:
double

getMinValue

public double getMinValue()
Obsolete. Please use Minimum instead.

Returns:
double

getMinimum

public double getMinimum()
The lowest of all values in the list.

Returns:
double
See Also:
getMaximum()

getTotal

public double getTotal()
The sum of all IValueList values.
When adding, deleting or modifying point values using the right methods, Total is automatically incremented and decremented.
Total is used by some Functions to improve speed when performing calculations against point values, where having already calculated the sum of point values is necessary.

Returns:
double

getTotalABS

public double getTotalABS()
The sum of all absolute values in the list.
Run-time and read only.
The values are first converted to their absolute value.
Pie series, for example, uses this property to calculate the percent each Pie slice represents.

Returns:
double
See Also:
getMaximum()

getValue

public double getValue(int index)

setValue

public void setValue(int index,
                     double value)

getValues

public double[] getValues()

setValues

public void setValues(double[] value)

getCount

public int getCount()

setCount

public void setCount(int value)

asDateTime

public DateTime asDateTime(int index)

fillSequence

public void fillSequence()
Renumbers all values in a ValueList class starting at zero.
Warning: Calling fillSequence removes any previous value in a ValueList.
Use fillSequence when deleting points at runtime.

See Also:
sort()

exchange

public void exchange(int index1,
                     int index2)