com.steema.teechart.styles
Class Series

java.lang.Object
  extended by com.steema.teechart.TeeBase
      extended by com.steema.teechart.styles.Series
All Implemented Interfaces:
ISeries
Direct Known Subclasses:
Calendar, Circular, Custom3D, CustomBar, CustomGauge, CustomPoint, FastLine, Funnel, HighLow, Histogram, PolygonSeries, Pyramid, Shape

public class Series
extends TeeBase
implements ISeries

Title: Series class

Description: The base class for all TeeChart Series styles.

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

Company: Steema Software


Nested Class Summary
static interface Series.MarkTextResolver
           
 
Field Summary
static int AUTODEPTH
          Constant field for internal use.
static int AUTOZORDER
          Constant field for internal use.
protected  boolean bActive
           
protected  ChartBrush bBrush
           
protected  boolean bColorEach
           
protected  boolean calcVisiblePoints
           
protected  java.lang.String colorMember
           
protected  Series.MarkTextResolver customMarkText
           
 boolean drawBetweenPoints
           
protected  int endZ
           
protected  int firstVisible
           
 boolean hasZValues
          Returns true if the series has ZValues.
protected  ColorList iColors
           
protected  int iNumSampleValues
           
 int iZOrder
           
protected  java.lang.String labelMember
           
protected  int lastVisible
           
protected  EventListenerList listenerList
           
protected  ValueList mandatory
           
 boolean manualData
           
protected  SeriesMarks marks
           
protected  int middleZ
           
protected  ValueList notMandatory
           
protected  MessageFormat percentDecimal
           
protected  java.lang.String percentFormat
           
protected  StringList sLabels
           
protected  int startZ
           
 boolean useAxis
          Returns True when the Series needs axes to display points.
protected  boolean useSeriesColor
           
protected  java.lang.String valueFormat
           
protected  ValueList vxValues
           
protected  ValueList vyValues
           
protected  boolean yMandatory
           
 
Fields inherited from class com.steema.teechart.TeeBase
chart, InternalUse
 
Constructor Summary
protected Series(IBaseChart c)
           
 
Method Summary
 int add()
          Adds a new null (transparent) point.
 int add(DateTime x, DateTime y)
           
 int add(DateTime x, double y)
          Adds new point with specified DateTime x and Double y values.
 int add(DateTime x, double y, Color c)
          Adds new point with specified DateTime x, Double y values and Color.
 int add(DateTime x, double y, java.lang.String text)
          Adds new point with specified DateTime x, Double y values and Text.
 int add(DateTime aDate, double y, java.lang.String text, Color color)
          Adds a new Datetime point to a Series, label and color.
 int add(double value)
          Adds a new point with specified value.
 void add(double[] values)
          Adds the array of double values.
 void add(double[] xValues, double[] yValues)
          Adds 2 array of double values.
 void add(double[] xValues, double[] yValues, boolean append)
           
 int add(double value, Color color)
          Adds a new point with specified value and color.
 int add(double x, double y)
          Adds a new point with specified x and y values.
 int add(double x, double y, Color color)
          Adds a new point with specified x and y values and color.
 int add(double x, double y, java.lang.String text)
          Adds a new point with specified x,y values and text.
 int add(double x, double y, java.lang.String text, Color color)
          Adds a new point with specified x,y values, text and color.
 int add(double value, java.lang.String text)
          Adds a new point with specified value and text.
 int add(double value, java.lang.String text, Color color)
          Adds a new point with specified value, text and color.
 int add(float value)
          Adds a new point with specified value.
 void add(float[] values)
          Adds the array of float values.
 int add(int value)
          Adds a new point with specified value.
 void add(int[] values)
          Adds the array of integer values.
 int add(Point.Double p)
          Adds the pair of floating point x- and y-pixel coordinates
 void add(Series source)
          Adds all points in source Series.
 int add(java.lang.String text)
          Adds a new null point with specified text.
 void add(java.util.Vector list)
          Adds the collection of objects that implement the IList interface.
 void add(java.util.Vector xValues, java.util.Vector yValues)
          Adds the X and Y arrays.
protected  int addChartValue(Series source, int valueIndex)
           
protected  void added()
           
protected  void addedValue(Series source, int valueIndex)
           
 int addNull()
          Obsolete.
 int addNullXY(double x, double y)
          Obsolete.
protected  void addSampleValues(int numValues)
           
 void addSeriesMouseListener(SeriesMouseListener l)
           
 void addSeriesPaintListener(SeriesPaintListener l)
           
protected  void addValues(java.util.Vector source)
           
 void assign(Series source)
          Copies all properties from one Series component to another.
static Series assignDispose(Series s, Series newSeries)
           
 void assignValues(Series source)
          Adds all Values from Source series to the current Series.
 boolean associatedToAxis(Axis a)
           
 void beginUpdate()
          Recalculates the function just one time, when finished adding points.
 void calcFirstLastVisibleIndex()
           
 void calcHorizMargins(Margins margins)
          Returns the number of pixels for horizontal margins
 java.lang.String calcPercentSt(double value)
           
 int calcPosValue(double value)
          Returns "Value" parameter coordinate position in pixels.
protected  void calculateMarkPosition(TextShape shape, java.lang.String aText, int xPos, int yPos, SeriesMarksPosition position)
           
 void calcVerticalMargins(Margins margins)
          Returns the number of pixels for vertical margins
 int calcXPos(int index)
          The pixel Screen Horizontal coordinate of the ValueIndex Series value.
 int calcXPosValue(double value)
          The pixel Screen Horizontal coordinate of the specified Value.
 int calcXSizeValue(double value)
          Returns the size in pixels corresponding to value parameter in horizontal axis scales.
 int calcYPos(int index)
          The pixel Screen Vertical coordinate of the ValueIndex Series value.
 int calcYPosValue(double value)
          The pixel Screen Vertical coordinate of the specified Value.
 int calcYSizeValue(double value)
          Returns the size in pixels corresponding to value parameter in vertical axis scales.
 void calcZOrder()
           
protected  boolean canAddRandomPoints()
           
static Series changeType(Series s, java.lang.Class newType)
          Replaces ASeries object with a new Series object of another class.
 void checkDataSource()
          Refreshes all Series point values, either from database Tables or Series points.
 MouseClicked checkMouse(Cursor c, int x, int y)
           
 void checkOrder()
          Reorders points according to Order property of X,Y,etc value lists.
 void checkOtherSeries(Series dest)
           
 void clear()
          Removes all points, texts and Colors from the Series.
protected  void clearLists()
           
 int clicked(int x, int y)
          Returns the ValueIndex of the "clicked" point in the Series.
 int clicked(Point p)
           
 java.lang.Object clone()
           
 Series cloneSeries()
          Returns a new Series, copy of this original.
protected  double[] convertArray(java.util.Vector a, int numPoints)
           
protected  int countLegendItems()
           
static Series createNewSeries(IBaseChart chart, java.lang.Class type, java.lang.Class aFunction)
          Creates a new Series object and sets the Name, Chart and Function methods.
static Series createNewSeries(IBaseChart chart, java.lang.Class type, java.lang.Class aFunction, int subIndex)
          Creates a new Series object and sets the Name, Chart, Sub-Style and Function methods.
static Series createNewSeries(IBaseChart chart, java.lang.Class type, java.lang.Class aFunction, int subIndex, java.lang.Object tag)
          Creates a new Series object and sets the Name, Chart, Sub-Style and Function methods.
 void createSubGallery(Gallery addSubChart)
           
 java.util.Vector dataSourceArray()
           
 void delete(int index)
          Removes the index th point.
 void delete(int index, int count)
           
 void delete(int index, int count, boolean removeGap)
          Removes count number of points starting at index.
 void dispose()
           
protected  void doAfterDrawValues()
           
 void doBeforeDrawChart()
           
protected  void doBeforeDrawValues()
           
 void doClick(int valueIndex, FrameworkMouseEvent e)
           
protected  void doClickPointer(int valueIndex, int x, int y)
           
 void doDoubleClick(int valueIndex, FrameworkMouseEvent e)
           
protected  void draw()
           
 void drawHiddenValue(int valueIndex, PointDouble startEndVals, int gapSize, Axis axis)
           
protected  void drawLegend(IGraphics3D g, int valueIndex, Rectangle rect)
           
 void drawLegend(int valueIndex, Rectangle rect)
           
protected  void drawLegendShape(IGraphics3D g, int valueIndex, Rectangle rect)
           
protected  void drawMark(int valueIndex, java.lang.String st, SeriesMarksPosition aPosition)
           
 void drawMarks()
           
 boolean drawMarksSeries(Series s, boolean activeRegion)
           
 void drawSeries()
          Draws the series to the Chart Canvas.
protected  boolean drawSeriesForward(int valueIndex)
           
 void drawValue(int index)
          Called internally.
 boolean drawValuesForward()
          Returns whether Series draws its points in ascending/descending order.
 void endUpdate()
          Recalculates the function just one time, when finished adding points.
 void fillSampleValues()
          Adds random values to help visualize the Series.
 void fillSampleValues(int numValues)
          Adds the specified NumValues random points.
protected  void fireSeriesMouseEvent(SeriesMouseEvent se)
           
protected  void fireSeriesPaint(ChartDrawEvent e)
           
 int firstDisplayed()
          Returns the index of the series point that is displayed first when the series is drawn.
 void galleryChanged3D(boolean is3D)
           
 boolean getActive()
          Shows or hides this series.
 boolean getAllowSinglePoint()
           
 ChartBrush getBrush()
           
 Color getColor()
          Default color for all points.
 boolean getColorEach()
          Draws points with different preset Colors.
 java.lang.String getColorMember()
          The the Datasource Color Field.
 ColorList getColors()
          Accesses the stored Color Array, if created, for the Series.
 int getCount()
          Returns the number of points in the Series.
 int getCountLegendItems()
           
 Cursor getCursor()
          Cursor displayed when mouse is over a series point.
 Axis getCustomHorizAxis()
          Specifies the custom horizontal axis for the series.
 Axis getCustomVertAxis()
          Specifies the custom vertical axis for the series.
 java.lang.Object getDataSource()
          Object to load data from.
protected  Color getDefaultColor(int valueIndex)
           
 double getDefaultNullValue()
          Sets or returns the value to be used as a null value within the series.
 int getDepth()
          The Depth of the series points or interconnecting lines.
 java.lang.String getDescription()
          Gets descriptive text.
 int getEndZ()
          For internal use.
protected  int getFields(ValueList otherList)
           
 int getFirstVisible()
          Returns the index of the Series' first visible point.
 Function getFunction()
          Function object to calculate values.
 boolean getHasZValues()
           
 Axis getHorizAxis()
           
 HorizontalAxis getHorizontalAxis()
          Horizontal axis associated to this Series.
 java.lang.String getLabelMember()
          The the Datasource Label Field.
 StringList getLabels()
          Accesses a list of series point labels.
 int getLastVisible()
          Returns the index of the Series' last visible point.
 java.lang.String getLegendString(int legendIndex, LegendTextStyle legendTextStyle)
          Returns the formatted String corresponding to the LegendIndex point.
 ValueList getMandatory()
           
 Axis getMandatoryAxis()
           
 SeriesMarks getMarks()
          Defines how to draw a mark near to each Series point.
 java.lang.String getMarkText(int valueIndex)
          Returns the String corresponding to the Series Mark text for a given ValueIndex point.
 double getMarkValue(int valueIndex)
          Returns corresponding Point value suitable for displaying at Series Marks.
 double getMaxXValue()
          The Maximum Value of the Series X Values List.
 double getMaxYValue()
          The Maximum Value of the Series Y Values List.
 double getMaxZValue()
          The Maximum Z Value.
 int getMiddleZ()
          For internal use.
 double getMinXValue()
          The Minimum Value of the Series X Values List.
 double getMinYValue()
          The Minimum Value of the Series Y Values List.
 double getMinZValue()
          The Minimum Z Value.
 ValueList getNotMandatory()
           
 int getNumGallerySeries()
          For internal use.
 int getNumSampleValues()
           
 double getOriginValue(int valueIndex)
           
 java.lang.String getPercentFormat()
          The Format to display point values as percentage.
 SeriesXYPoint getPoint(int index)
          Point characteristics.
protected  Color getSeriesColor()
          Obsolete.
 boolean getShowInLegend()
          Displays this Series Title in Legend.
 int getStartZ()
          For internal use.
 java.lang.String getTitle()
          Series description to show in Legend and dialogs.
 boolean getUseAxis()
           
 Color getValueColor(int valueIndex)
          The colour of the index point.
 java.lang.String getValueFormat()
          Determines the Format to display point values.
 Swapper getValueIndexSwapper()
           
 ValueList getValueList(int index)
           
 ValueList getValueList(java.lang.String name)
           
 java.lang.String getValueMarkText(int index)
          Returns the String representation of a Index point used to draw the Mark.
 ValuesLists getValuesLists()
          Returns the steema.teechart.styles.ValuesLists object of the series.
 Axis getVertAxis()
           
 VerticalAxis getVerticalAxis()
          Determines Vertical axis associated to this Series.
 boolean getVisible()
          Returns if this series is Visible.
 ValueList getXValues()
          Values defining horizontal point positions.
 boolean getYMandatory()
          Returns whether or not this Series has Y values as mandatory.
 ValueList getYValueList(java.lang.String aListName)
          Returns the value list that the AListName parameter has.
 ValueList getYValues()
          Values defining vertical point positions.
 int getZOrder()
          Determines where on the depth axis the Series is drawn.
 boolean hasClickEvents()
           
 boolean hasDataSource(java.lang.Object source)
           
protected  boolean hasListenersOf(java.lang.Class listener)
           
 boolean hasNoMandatoryValues()
           
 boolean isNull(int index)
          Returns true if the index th point in the Series is "null" or "empty".
protected  boolean isPointInChartRect(int valueIndex)
           
protected  boolean isValidSeriesSource(Series value)
           
 boolean isValidSourceOf(Series value)
          Validates Series datasource.
 int lastDisplayed()
          Returns the index of the series point that is displayed first when the series is drawn.
protected  int lastVisibleMark()
           
 Color legendItemColor(int index)
           
 int legendToValueIndex(int legendIndex)
           
 int maxMarkWidth()
          Returns the length in pixels of the longest Mark text.
protected  boolean moreSameZOrder()
          Returns true if there are more series that share the same Z order.
 Cursor mouseEvent(FrameworkMouseEvent e, Cursor c)
           
static Series newFromType(java.lang.Class type)
          Creates a new series from the Class type of an existing series object.
protected  int numSampleValues()
           
 void onDisposing()
           
 void prepareForGallery(boolean isEnabled)
           
protected  void prepareLegendCanvas(IGraphics3D g, int valueIndex, Color backColor, ChartBrush aBrush)
           
protected  SeriesRandom randomBounds(int numValues)
           
protected  java.lang.Object readResolve()
           
protected  void recalcGetAxis()
           
 void refreshSeries()
          Recalculates all dependent Series points again.
 void removeMarkTextResolver()
           
 void removeSeriesMouseListener(SeriesMouseListener l)
           
 void removeSeriesPaintListener(SeriesPaintListener l)
           
 void repaint()
          Forces the Chart to Repaint.
protected  boolean sameClass(ISeries s)
          Returns True when the tmpSeries parameter is of the same class.
 void setActive(boolean value)
          Shows or hides this series.
 void setChart(IBaseChart value)
          Chart associated with this object.
 void setColor(Color value)
          Default color for all points.
 void setColorEach(boolean value)
           
 void setColorMember(java.lang.String value)
          Sets the Datasource Color Field.
 void setColors(ColorList value)
          Accesses the stored Color Array, if created, for the Series.
 void setCursor(Cursor value)
          Cursor displayed when mouse is over a series point.
 void setCustomHorizAxis(Axis value)
          Specifies the custom horizontal axis for the series.
 void setCustomHorizAxis(int value)
          Specifies the custom horizontal axis for the series.
 void setCustomVertAxis(Axis value)
          Specifies the custom vertical axis for the series.
 void setCustomVertAxis(int value)
          Specifies the custom vertical axis for the series.
 void setDataSource(java.lang.Object value)
          Object to load data from.
 void setDefaultNullValue(double value)
           
 void setDepth(int value)
          Sets the Depth of the series points or interconnecting lines.
 void setEndZ(int value)
           
 void setFunction(Function value)
           
protected  void setHorizontal()
           
 void setHorizontalAxis(HorizontalAxis value)
          Stes the Horizontal axis associated to this Series.
 void setLabelMember(java.lang.String value)
          Sets the Datasource Label Field.
 void setLabels(StringList value)
          Accesses a list of series point labels.
 void setMarks(SeriesMarks value)
           
 void setMarkTextResolver(Series.MarkTextResolver resolver)
           
 void setMiddleZ(int value)
           
 void setNull(int valueIndex)
          Sets the specified series point to a null (transparent) point.
 void setNull(int valueIndex, boolean isnull)
          Toogles between null (transparent) and regular point.
 void setPercentFormat(java.lang.String value)
          Sets the Format to display point values as percentage.
protected  void setSeriesColor(Color value)
          Obsolete.
 void setShowInLegend(boolean value)
          Displays this Series Title in Legend.
 void setStartZ(int value)
           
 void setSubGallery(int index)
          Creates and prepares the index'th Series style to show at sub-gallery dialog.
 void setTitle(java.lang.String value)
          Series description to show in Legend and dialogs.
 void setValueFormat(java.lang.String value)
          Determines the Format to display point values.
protected  void setValueList(ValueList l, ValueList value)
           
 void setVerticalAxis(VerticalAxis value)
          Determines Vertical axis associated to this Series.
 void setVisible(boolean value)
          An alias to Active property.
 void setXValues(ValueList value)
           
 void setYValues(ValueList value)
           
 void setZOrder(int value)
          Determines where on the depth axis the Series is drawn.
 void setZPositions()
           
 void sortByLabels()
           
 void sortByLabels(ValueListOrder order)
          Sorts all points in the series using the Labels (texts) list.
protected  void swapValueIndex(int a, int b)
          Exchanges one point with another.
 java.lang.String titleOrName()
          Obsolete.
 java.lang.String toString()
          Overridden ToString() method.
 ValueList valueListOfAxis(Axis a)
           
 void valuesListAdd(ValueList value)
           
 double xScreenToValue(int screenPos)
          Returns the corresponding X value of a Screen position between Axis limits.
 double yScreenToValue(int screenPos)
          Returns the corresponding Y value of a Screen position between Axis limits.
 
Methods inherited from class com.steema.teechart.TeeBase
getChart, invalidate, setBooleanProperty, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.steema.teechart.styles.ISeries
getChart, invalidate
 

Field Detail

AUTODEPTH

public static final int AUTODEPTH
Constant field for internal use.

See Also:
Constant Field Values

AUTOZORDER

public static final int AUTOZORDER
Constant field for internal use.

See Also:
Constant Field Values

listenerList

protected transient EventListenerList listenerList

customMarkText

protected transient Series.MarkTextResolver customMarkText

bBrush

protected ChartBrush bBrush

bActive

protected boolean bActive

vxValues

protected ValueList vxValues

vyValues

protected ValueList vyValues

sLabels

protected StringList sLabels

iColors

protected ColorList iColors

bColorEach

protected boolean bColorEach

iZOrder

public transient int iZOrder

mandatory

protected transient ValueList mandatory

notMandatory

protected transient ValueList notMandatory

manualData

public boolean manualData

marks

protected SeriesMarks marks

startZ

protected transient int startZ

middleZ

protected transient int middleZ

endZ

protected transient int endZ

drawBetweenPoints

public transient boolean drawBetweenPoints

yMandatory

protected transient boolean yMandatory

useAxis

public transient boolean useAxis
Returns True when the Series needs axes to display points. For example, Pie Series returns False (it does not need axes).


useSeriesColor

protected transient boolean useSeriesColor

calcVisiblePoints

protected transient boolean calcVisiblePoints

valueFormat

protected java.lang.String valueFormat

labelMember

protected java.lang.String labelMember

colorMember

protected java.lang.String colorMember

percentFormat

protected java.lang.String percentFormat

percentDecimal

protected transient MessageFormat percentDecimal

hasZValues

public transient boolean hasZValues
Returns true if the series has ZValues.


firstVisible

protected transient int firstVisible

lastVisible

protected transient int lastVisible

iNumSampleValues

protected transient int iNumSampleValues
Constructor Detail

Series

protected Series(IBaseChart c)
Method Detail

setMarkTextResolver

public void setMarkTextResolver(Series.MarkTextResolver resolver)

removeMarkTextResolver

public void removeMarkTextResolver()

addSeriesPaintListener

public void addSeriesPaintListener(SeriesPaintListener l)

removeSeriesPaintListener

public void removeSeriesPaintListener(SeriesPaintListener l)

fireSeriesPaint

protected void fireSeriesPaint(ChartDrawEvent e)

addSeriesMouseListener

public void addSeriesMouseListener(SeriesMouseListener l)

removeSeriesMouseListener

public void removeSeriesMouseListener(SeriesMouseListener l)

fireSeriesMouseEvent

protected void fireSeriesMouseEvent(SeriesMouseEvent se)

doClickPointer

protected void doClickPointer(int valueIndex,
                              int x,
                              int y)

hasListenersOf

protected boolean hasListenersOf(java.lang.Class listener)

getHorizAxis

public Axis getHorizAxis()
Specified by:
getHorizAxis in interface ISeries

getVertAxis

public Axis getVertAxis()
Specified by:
getVertAxis in interface ISeries

getNotMandatory

public ValueList getNotMandatory()
Specified by:
getNotMandatory in interface ISeries

getMandatory

public ValueList getMandatory()
Specified by:
getMandatory in interface ISeries

dispose

public void dispose()
Specified by:
dispose in interface ISeries

newFromType

public static Series newFromType(java.lang.Class type)
                          throws java.lang.InstantiationException,
                                 java.lang.IllegalAccessException
Creates a new series from the Class type of an existing series object.

Parameters:
type - Class
Returns:
Series
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException

readResolve

protected java.lang.Object readResolve()

createNewSeries

public static Series createNewSeries(IBaseChart chart,
                                     java.lang.Class type,
                                     java.lang.Class aFunction,
                                     int subIndex)
                              throws java.lang.InstantiationException,
                                     java.lang.IllegalAccessException,
                                     java.lang.IllegalArgumentException
Creates a new Series object and sets the Name, Chart, Sub-Style and Function methods.
This is an internal method, you should seldomly use it in your applications.

Parameters:
chart - IBaseChart
type - Class
aFunction - Class
subIndex - int
Returns:
Series
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.NoSuchMethodException
java.lang.IllegalArgumentException
InvocationTargetException

createNewSeries

public static Series createNewSeries(IBaseChart chart,
                                     java.lang.Class type,
                                     java.lang.Class aFunction,
                                     int subIndex,
                                     java.lang.Object tag)
                              throws java.lang.InstantiationException,
                                     java.lang.IllegalAccessException,
                                     java.lang.IllegalArgumentException
Creates a new Series object and sets the Name, Chart, Sub-Style and Function methods.
This is an internal method, you should seldomly use it in your applications.

Parameters:
chart - IBaseChart
type - Class
aFunction - Class
subIndex - int
tag - Object
Returns:
Series
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.NoSuchMethodException
java.lang.IllegalArgumentException
InvocationTargetException

createNewSeries

public static Series createNewSeries(IBaseChart chart,
                                     java.lang.Class type,
                                     java.lang.Class aFunction)
                              throws java.lang.InstantiationException,
                                     java.lang.IllegalAccessException,
                                     java.lang.IllegalArgumentException
Creates a new Series object and sets the Name, Chart and Function methods.

Parameters:
chart - IBaseChart
type - Class
aFunction - Class
Returns:
Series
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.NoSuchMethodException
java.lang.IllegalArgumentException
InvocationTargetException

doBeforeDrawValues

protected void doBeforeDrawValues()

doAfterDrawValues

protected void doAfterDrawValues()

calcZOrder

public void calcZOrder()

getColors

public ColorList getColors()
Accesses the stored Color Array, if created, for the Series.
When attaching new series to any Chart, setting TChart Series.SerieColor to Color.EMPTY will make TeeChart assign a different color to each Series.
Some Series types allow Color.EMPTY in their Pen and Brushes properties, thus forcing the use of the actual point color instead of the Pen or Brush assigned color.
Default value: null

Example:


 candleSeries.add( ...., Color.Yellow );
 candleSeries.getColors().setColor( 10, Color.Blue);
 

Returns:
ColorList
See Also:
getColorEach()

setColors

public void setColors(ColorList value)
Accesses the stored Color Array, if created, for the Series.
Default value: null

Parameters:
value - ColorList
See Also:
getColors()

getPoint

public SeriesXYPoint getPoint(int index)
Point characteristics.

Parameters:
index - int
Returns:
SeriesXYPoint

getXValues

public ValueList getXValues()
Values defining horizontal point positions.
By default, any Series has an XValues property. This is the IValueList where the point values will be stored at runtime. Also by default, XValues is a Public method. Some derived Series publish it: Line series, Bar series, Points series, etc. Some others publish it with another, more friendly name: GanttSeries.StartValues, etc.

WARNING:
You CAN NOT Delete, Clear or Add values DIRECTLY. You need to call the Series equivalent methods to do this.

Specified by:
getXValues in interface ISeries
Returns:
ValueList

setXValues

public void setXValues(ValueList value)

getYValues

public ValueList getYValues()
Values defining vertical point positions.

WARNING:
You CAN NOT Delete, Clear or Add values DIRECTLY. You need to call the Series equivalent methods to do this.

Specified by:
getYValues in interface ISeries
Returns:
ValueList

setYValues

public void setYValues(ValueList value)

assign

public void assign(Series source)
Copies all properties from one Series component to another.
Only the common properties shared by both source and destination Series are copied.
The following code copies all properties from Series2 into Series1:

Series1.Assign( Series2 ) ;

Some Series types restore method values after assigning them. For example, Points series restores the Pointer.Visible method to true after being assigned to a Line series, which has Pointers invisible by default.
Note: Series events are not assigned. Series DataSource and FunctionType properties are assigned. Assign is used by CloneChartSeries and ChangeSeriesType methods for example.

Parameters:
source - Series

getAllowSinglePoint

public boolean getAllowSinglePoint()
Specified by:
getAllowSinglePoint in interface ISeries

assignDispose

public static Series assignDispose(Series s,
                                   Series newSeries)

changeType

public static Series changeType(Series s,
                                java.lang.Class newType)
                         throws java.lang.InstantiationException,
                                java.lang.IllegalAccessException,
                                NoSuchAlgorithmException,
                                java.lang.IllegalArgumentException
Replaces ASeries object with a new Series object of another class.

Parameters:
s - Series
newType - Class
Returns:
Series
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.NoSuchMethodException
java.lang.IllegalArgumentException
InvocationTargetException
NoSuchAlgorithmException

getValuesLists

public ValuesLists getValuesLists()
Returns the steema.teechart.styles.ValuesLists object of the series.
It permits access to the list of TeeChartValueLists of a Series.
Several standard Series types such as TLineSeries and TBarSeries maintain 2 ValueLists, X and Y values. Other Series such as TCandleSeries maintain more lists, ie. DateValues, OpenValues, HighValues, LowValues and CloseValues.

Returns:
ValuesLists
See Also:
ValuesLists

valueListOfAxis

public ValueList valueListOfAxis(Axis a)

valuesListAdd

public void valuesListAdd(ValueList value)
Specified by:
valuesListAdd in interface ISeries

hasNoMandatoryValues

public boolean hasNoMandatoryValues()

getYValueList

public ValueList getYValueList(java.lang.String aListName)
Returns the value list that the AListName parameter has.

Parameters:
aListName - String
Returns:
ValueList

getCustomHorizAxis

public Axis getCustomHorizAxis()
Specifies the custom horizontal axis for the series.
After adding a new horizontal Custom Axis to a Chart, use CustomHorizAxis to associate the Series to the Custom Axis.
Together with the axis PositionPercent and "stretching" methods, it's possible to have unlimited axes floating anywhere on the chart.
Scroll, zoom, and axis hit-detection also apply to custom-created axes.
Creating extra axes is only allowed at run-time, as a few lines of code are necessary.
Default value: null

Returns:
Axis

getMandatoryAxis

public Axis getMandatoryAxis()

setCustomHorizAxis

public void setCustomHorizAxis(Axis value)
Specifies the custom horizontal axis for the series.
Default value: null

Parameters:
value - Axis

setCustomHorizAxis

public void setCustomHorizAxis(int value)
Specifies the custom horizontal axis for the series.
Default value: null

Parameters:
value - int

getCustomVertAxis

public Axis getCustomVertAxis()
Specifies the custom vertical axis for the series.
Default value: null

Returns:
Axis

setCustomVertAxis

public void setCustomVertAxis(int value)
Specifies the custom vertical axis for the series.
Default value: null

Parameters:
value - int

setCustomVertAxis

public void setCustomVertAxis(Axis value)
Specifies the custom vertical axis for the series.
Default value: null

Parameters:
value - Axis

getLabels

public StringList getLabels()
Accesses a list of series point labels.

Specified by:
getLabels in interface ISeries
Returns:
StringList

setLabels

public void setLabels(StringList value)
Accesses a list of series point labels.

Parameters:
value - StringList

getLabelMember

public java.lang.String getLabelMember()
The the Datasource Label Field. Default value: ""

Returns:
String

setLabelMember

public void setLabelMember(java.lang.String value)
Sets the Datasource Label Field.
Default value: ""

Parameters:
value - String

getColorMember

public java.lang.String getColorMember()
The the Datasource Color Field.
Default value: ""

Returns:
String

setColorMember

public void setColorMember(java.lang.String value)
Sets the Datasource Color Field.
Default value: ""

Parameters:
value - String

calcHorizMargins

public void calcHorizMargins(Margins margins)
Returns the number of pixels for horizontal margins

Parameters:
margins - Margins

calcVerticalMargins

public void calcVerticalMargins(Margins margins)
Returns the number of pixels for vertical margins

Parameters:
margins - Margins

galleryChanged3D

public void galleryChanged3D(boolean is3D)

getUseAxis

public boolean getUseAxis()
Specified by:
getUseAxis in interface ISeries

associatedToAxis

public boolean associatedToAxis(Axis a)
Specified by:
associatedToAxis in interface ISeries

cloneSeries

public Series cloneSeries()
Returns a new Series, copy of this original.
It returns the SeriesIndex of the new Series.

Returns:
Series
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException

isPointInChartRect

protected boolean isPointInChartRect(int valueIndex)

countLegendItems

protected int countLegendItems()

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

assignValues

public void assignValues(Series source)
Adds all Values from Source series to the current Series.

Parameters:
source - Series

addChartValue

protected int addChartValue(Series source,
                            int valueIndex)

addedValue

protected void addedValue(Series source,
                          int valueIndex)

mouseEvent

public Cursor mouseEvent(FrameworkMouseEvent e,
                         Cursor c)

refreshSeries

public void refreshSeries()
Recalculates all dependent Series points again.
Each Series has a DataSource method. When DataSource is a valid Series or DataSet component, Series get all point values from the DataSource and adds them as Series points. The RefreshSeries method forces the Series to Clear and get all points again from the DataSource component. The Refreshing process traverses the Series tree recursively.


beginUpdate

public void beginUpdate()
Recalculates the function just one time, when finished adding points.


endUpdate

public void endUpdate()
Recalculates the function just one time, when finished adding points.


addValues

protected void addValues(java.util.Vector source)

setColorEach

public void setColorEach(boolean value)

dataSourceArray

public java.util.Vector dataSourceArray()
Specified by:
dataSourceArray in interface ISeries

hasDataSource

public boolean hasDataSource(java.lang.Object source)
Specified by:
hasDataSource in interface ISeries

doDoubleClick

public void doDoubleClick(int valueIndex,
                          FrameworkMouseEvent e)

doClick

public void doClick(int valueIndex,
                    FrameworkMouseEvent e)

getColorEach

public boolean getColorEach()
Draws points with different preset Colors.
If false, all points will be drawn using the Series Series.Color color method.
If true, each Series point will be "colored" with its corresponding point color. The point colors are stored in the Series.PointColor array. If a point has an Color.Empty color value, then a TeeChart determined, available color value will be used to draw it.
Default value: false

Specified by:
getColorEach in interface ISeries
Returns:
boolean

getCountLegendItems

public int getCountLegendItems()
Specified by:
getCountLegendItems in interface ISeries

getNumGallerySeries

public int getNumGallerySeries()
For internal use.

Returns:
int

getDescription

public java.lang.String getDescription()
Gets descriptive text.

Returns:
String

getVisible

public boolean getVisible()
Returns if this series is Visible.

Returns:
boolean

setVisible

public void setVisible(boolean value)
An alias to Active property.
Shows or Hides the component.

Parameters:
value - boolean

xScreenToValue

public double xScreenToValue(int screenPos)
Returns the corresponding X value of a Screen position between Axis limits.
The Screen position must be between Axis limits.

Parameters:
screenPos - int
Returns:
double

yScreenToValue

public double yScreenToValue(int screenPos)
Returns the corresponding Y value of a Screen position between Axis limits.
The resulting Value is based on the Series.GetVertAxis.

Parameters:
screenPos - int
Returns:
double

prepareForGallery

public void prepareForGallery(boolean isEnabled)

prepareLegendCanvas

protected void prepareLegendCanvas(IGraphics3D g,
                                   int valueIndex,
                                   Color backColor,
                                   ChartBrush aBrush)

drawLegendShape

protected void drawLegendShape(IGraphics3D g,
                               int valueIndex,
                               Rectangle rect)

legendItemColor

public Color legendItemColor(int index)
Specified by:
legendItemColor in interface ISeries

drawLegend

public void drawLegend(int valueIndex,
                       Rectangle rect)
Specified by:
drawLegend in interface ISeries

drawLegend

protected void drawLegend(IGraphics3D g,
                          int valueIndex,
                          Rectangle rect)

calcFirstLastVisibleIndex

public void calcFirstLastVisibleIndex()
Specified by:
calcFirstLastVisibleIndex in interface ISeries

maxMarkWidth

public int maxMarkWidth()
Returns the length in pixels of the longest Mark text.

Returns:
int

getMarkValue

public double getMarkValue(int valueIndex)
Returns corresponding Point value suitable for displaying at Series Marks.

Specified by:
getMarkValue in interface ISeries
Parameters:
valueIndex - int
Returns:
double

getMarkText

public java.lang.String getMarkText(int valueIndex)
Returns the String corresponding to the Series Mark text for a given ValueIndex point.
The Mark text depends on the Marks.Style method.

Specified by:
getMarkText in interface ISeries
Parameters:
valueIndex - int
Returns:
String

getValueMarkText

public java.lang.String getValueMarkText(int index)
Returns the String representation of a Index point used to draw the Mark.

Specified by:
getValueMarkText in interface ISeries
Parameters:
index - int
Returns:
String

getDefaultNullValue

public double getDefaultNullValue()
Sets or returns the value to be used as a null value within the series.

Parameters:
value - double

setDefaultNullValue

public void setDefaultNullValue(double value)

repaint

public void repaint()
Forces the Chart to Repaint.
You don't normally call Repaint directly. It can be used within derived TChartSeries components when changing their properties internally .


sameClass

protected boolean sameClass(ISeries s)
Returns True when the tmpSeries parameter is of the same class.

Parameters:
s - ISeries
Returns:
boolean

sortByLabels

public void sortByLabels(ValueListOrder order)
Sorts all points in the series using the Labels (texts) list.

Note: non-mandatory values (X) are modified (they are not preserved).

Parameters:
order - ValueListOrder

sortByLabels

public void sortByLabels()

getStartZ

public int getStartZ()
For internal use.

Specified by:
getStartZ in interface ISeries
Returns:
int

setStartZ

public void setStartZ(int value)

getMiddleZ

public int getMiddleZ()
For internal use.

Specified by:
getMiddleZ in interface ISeries
Returns:
int

setMarks

public void setMarks(SeriesMarks value)

setMiddleZ

public void setMiddleZ(int value)

setZPositions

public void setZPositions()

getEndZ

public int getEndZ()
For internal use.

Specified by:
getEndZ in interface ISeries
Returns:
int

setEndZ

public void setEndZ(int value)

getValueFormat

public java.lang.String getValueFormat()
Determines the Format to display point values.
It specifies the desired formatting string to be applied to Axis Labels. It has effect when Axis associated Series have their XValues.DateTime or YValues.DateTime is set to false.
For DateTime Axis labels use AxisLabels.DateTimeFormat.
ValueFormat is a standard formatting string specifier.
Chart Axis uses it to draw the axis labels.
Chart Series uses it to draw the Marks.
Default value: Language.getString("DefValueFormat")

Specified by:
getValueFormat in interface ISeries
Returns:
String

setValueFormat

public void setValueFormat(java.lang.String value)
Determines the Format to display point values.
Default value: Language.getString("DefValueFormat")

Parameters:
value - String

getPercentFormat

public java.lang.String getPercentFormat()
The Format to display point values as percentage.
PercentFormat is a standard string specifier. It is used to draw the Series Marks Percent Style figures.
Default value: Language.getString("DefPercentFormat")

Returns:
String
See Also:
getValueFormat()

setPercentFormat

public void setPercentFormat(java.lang.String value)
Sets the Format to display point values as percentage.
Default value: Language.getString("DefPercentFormat")

Parameters:
value - String

getHorizontalAxis

public HorizontalAxis getHorizontalAxis()
Horizontal axis associated to this Series.
Default value: HorizontalAxis.Bottom

Returns:
HorizontalAxis

setHorizontalAxis

public void setHorizontalAxis(HorizontalAxis value)
Stes the Horizontal axis associated to this Series.
Default value: HorizontalAxis.Bottom

Parameters:
value - HorizontalAxis

getVerticalAxis

public VerticalAxis getVerticalAxis()
Determines Vertical axis associated to this Series.
Default value: VerticalAxis.Left

Returns:
VerticalAxis

setVerticalAxis

public void setVerticalAxis(VerticalAxis value)
Determines Vertical axis associated to this Series.
Default value: VerticalAxis.Left

Parameters:
value - VerticalAxis

calcPosValue

public int calcPosValue(double value)
Returns "Value" parameter coordinate position in pixels.

Parameters:
value - double
Returns:
int

calcXPos

public int calcXPos(int index)
The pixel Screen Horizontal coordinate of the ValueIndex Series value.
This coordinate is calculated using the Series associated Horizontal Axis.

Parameters:
index - int
Returns:
int

calcXPosValue

public int calcXPosValue(double value)
The pixel Screen Horizontal coordinate of the specified Value.
This coordinate is calculated using the Series associated Horizontal Axis.

Parameters:
value - double
Returns:
int

calcYPos

public int calcYPos(int index)
The pixel Screen Vertical coordinate of the ValueIndex Series value.
This coordinate is calculated using the Series associated Vertical Axis.

Parameters:
index - int
Returns:
int

calcYPosValue

public int calcYPosValue(double value)
The pixel Screen Vertical coordinate of the specified Value.
This coordinate is calculated using the Series associated Vertical Axis.

Parameters:
value - double
Returns:
int

getOriginValue

public double getOriginValue(int valueIndex)
Specified by:
getOriginValue in interface ISeries

drawMark

protected void drawMark(int valueIndex,
                        java.lang.String st,
                        SeriesMarksPosition aPosition)

getDefaultColor

protected Color getDefaultColor(int valueIndex)

getValueColor

public Color getValueColor(int valueIndex)
The colour of the index point.

Specified by:
getValueColor in interface ISeries
Parameters:
valueIndex - int
Returns:
Color

calculateMarkPosition

protected void calculateMarkPosition(TextShape shape,
                                     java.lang.String aText,
                                     int xPos,
                                     int yPos,
                                     SeriesMarksPosition position)

lastVisibleMark

protected int lastVisibleMark()

drawMarks

public void drawMarks()
Specified by:
drawMarks in interface ISeries

drawMarksSeries

public boolean drawMarksSeries(Series s,
                               boolean activeRegion)

drawSeriesForward

protected boolean drawSeriesForward(int valueIndex)

getHasZValues

public boolean getHasZValues()
Specified by:
getHasZValues in interface ISeries

moreSameZOrder

protected boolean moreSameZOrder()
Returns true if there are more series that share the same Z order.
For example Stacked Bars.

Returns:
boolean

draw

protected void draw()

doBeforeDrawChart

public void doBeforeDrawChart()

drawSeries

public void drawSeries()
Draws the series to the Chart Canvas.


setSeriesColor

protected void setSeriesColor(Color value)
Obsolete. Use the Series.Color method instead.

Parameters:
value - Color
See Also:
getColor()

canAddRandomPoints

protected boolean canAddRandomPoints()

getDataSource

public java.lang.Object getDataSource()
Object to load data from.
Default value: null

Specified by:
getDataSource in interface ISeries
Returns:
Object

setDataSource

public void setDataSource(java.lang.Object value)
Object to load data from.
Default value: null

Specified by:
setDataSource in interface ISeries
Parameters:
value - Object

add

public void add(java.util.Vector list)
Adds the collection of objects that implement the IList interface.

Parameters:
list - ArrayList

getValueList

public ValueList getValueList(int index)

getValueList

public ValueList getValueList(java.lang.String name)
Specified by:
getValueList in interface ISeries

getFields

protected int getFields(ValueList otherList)

checkOtherSeries

public void checkOtherSeries(Series dest)
                      throws ChartException
Throws:
ChartException

checkDataSource

public void checkDataSource()
Refreshes all Series point values, either from database Tables or Series points.
You can call this method regularly if you want new or modified data to appear in realtime in the Series. The parent Chart will be repainted to reflect any changes.

Specified by:
checkDataSource in interface ISeries

recalcGetAxis

protected void recalcGetAxis()

added

protected void added()

getSeriesColor

protected Color getSeriesColor()
Obsolete. Use the Series.Color method instead.

Returns:
Color
See Also:
steema.teechart.styles.Series.Color

getColor

public Color getColor()
Default color for all points.
The TChart Series SeriesColor method is the default color in which the Series points will be drawn. It could be any valid color. If you add points with Color.EMPTY color, then they will be drawn with the SeriesColor color. This method is the default Color associated to the Series. When you place a new Series component in a Chart, TeeChart will assign a free color to this method (a Color that no other Series in the same Chart uses). Some Series have the ColorEach boolean property. Setting this to true will force the Series to paint each point with a different color, thus without using its SeriesColor.
SeriesColor is also used to paint the small rectangle in Chart Legend.
Default value: Color.Empty

Specified by:
getColor in interface ISeries
Returns:
Color
See Also:
getColorEach()

setColor

public void setColor(Color value)
Default color for all points.
Default value: Color.Empty

Parameters:
value - Color
See Also:
getColorEach()

getActive

public boolean getActive()
Shows or hides this series.
It can be changed both at design time or runtime. When hiding, all point values are preserved, so there's no need to refill the values again when showing them. The Series relatives Chart Axis are rescaled in order to accomodate changes.

Specified by:
getActive in interface ISeries
Returns:
boolean

setActive

public void setActive(boolean value)
Shows or hides this series.
It can be changed both at design time or runtime. When hiding, all point values are preserved, so there's no need to refill the values again when showing them. The Series relatives Chart Axis are rescaled in order to accomodate changes.

Specified by:
setActive in interface ISeries
Parameters:
value - boolean

swapValueIndex

protected void swapValueIndex(int a,
                              int b)
Exchanges one point with another. Also the point color and point label.

Parameters:
a - int index of first point to exchange.
b - int index of second point to exchange.

getValueIndexSwapper

public Swapper getValueIndexSwapper()
Specified by:
getValueIndexSwapper in interface ISeries

getTitle

public java.lang.String getTitle()
Series description to show in Legend and dialogs.
Every Series has a Title method of type String. It is used in TChart.Legend to draw the series descriptions. If Title is empty, then the Series class Name will be used to draw the legend. Setting Title both at design time and runtime will force the Chart to repaint.
Default value: ""

Returns:
String

setTitle

public void setTitle(java.lang.String value)
Series description to show in Legend and dialogs.
Default value: ""

Parameters:
value - String

onDisposing

public void onDisposing()
Specified by:
onDisposing in interface ISeries

setChart

public void setChart(IBaseChart value)
Description copied from class: TeeBase
Chart associated with this object.

Specified by:
setChart in interface ISeries
Overrides:
setChart in class TeeBase
Parameters:
value - IBaseChart

setHorizontal

protected void setHorizontal()

add

public int add(DateTime x,
               double y)
Adds new point with specified DateTime x and Double y values.

Parameters:
x - DateTime
y - double
Returns:
int index of added point
See Also:
ValueList

add

public int add(DateTime x,
               DateTime y)
Parameters:
x - DateTime
y - DateTime
Returns:
int index of added point
See Also:
ValueList

add

public int add(DateTime x,
               double y,
               Color c)
Adds new point with specified DateTime x, Double y values and Color.

Parameters:
x - DateTime
y - double
c - Color
Returns:
int index of added point
See Also:
ValueList

add

public int add(DateTime x,
               double y,
               java.lang.String text)
Adds new point with specified DateTime x, Double y values and Text.

Parameters:
x - DateTime
y - double
text - String
Returns:
int index of added point
See Also:
ValueList

addNullXY

public int addNullXY(double x,
                     double y)
Obsolete. Please use add(x,y,Color.Transparent) method instead.

Parameters:
x - double
y - double
Returns:
int

addNull

public int addNull()
Obsolete. Please use add() method without parameters instead.

Returns:
int

add

public int add()
Adds a new null (transparent) point.

Returns:
int

add

public int add(int value)
Adds a new point with specified value.

Parameters:
value - int
Returns:
int

add

public int add(double value)
Adds a new point with specified value.

Specified by:
add in interface ISeries
Parameters:
value - double
Returns:
int

add

public int add(float value)
Adds a new point with specified value.

Parameters:
value - float
Returns:
int

add

public int add(double value,
               java.lang.String text)
Adds a new point with specified value and text.

Parameters:
value - double
text - String
Returns:
int

add

public int add(double x,
               double y)
Adds a new point with specified x and y values.

Specified by:
add in interface ISeries
Parameters:
x - double
y - double
Returns:
int

add

public int add(Point.Double p)
Adds the pair of floating point x- and y-pixel coordinates

Parameters:
p - Double
Returns:
int

add

public int add(double x,
               double y,
               java.lang.String text)
Adds a new point with specified x,y values and text.

Specified by:
add in interface ISeries
Parameters:
x - double
y - double
text - String
Returns:
int

add

public int add(double x,
               double y,
               java.lang.String text,
               Color color)
Adds a new point with specified x,y values, text and color.

Parameters:
x - double
y - double
text - String
color - Color
Returns:
int

add

public int add(DateTime aDate,
               double y,
               java.lang.String text,
               Color color)
Adds a new Datetime point to a Series, label and color.

Parameters:
aDate - DateTime datetime value
y - double
text - String point text
color - Color
Returns:
int index of added point

add

public int add(double x,
               double y,
               Color color)
Adds a new point with specified x and y values and color.

Parameters:
x - double
y - double
color - Color
Returns:
int

add

public int add(double value,
               java.lang.String text,
               Color color)
Adds a new point with specified value, text and color.

Parameters:
value - double
text - String
color - Color
Returns:
int

add

public int add(double value,
               Color color)
Adds a new point with specified value and color.

Parameters:
value - double
color - Color
Returns:
int

add

public int add(java.lang.String text)
Adds a new null point with specified text.

Parameters:
text - String
Returns:
int

add

public void add(Series source)
Adds all points in source Series.

Parameters:
source - Series

convertArray

protected double[] convertArray(java.util.Vector a,
                                int numPoints)

add

public void add(java.util.Vector xValues,
                java.util.Vector yValues)
Adds the X and Y arrays.

Parameters:
xValues - ArrayList
yValues - ArrayList

add

public void add(double[] xValues,
                double[] yValues)
Adds 2 array of double values.

Parameters:
xValues - ArrayList
yValues - ArrayList

add

public void add(double[] xValues,
                double[] yValues,
                boolean append)

add

public void add(double[] values)
Adds the array of double values.

Parameters:
values - double[]

add

public void add(float[] values)
Adds the array of float values.

Parameters:
values - float[]

add

public void add(int[] values)
Adds the array of integer values.

Parameters:
values - int[]

hasClickEvents

public boolean hasClickEvents()

checkMouse

public MouseClicked checkMouse(Cursor c,
                               int x,
                               int y)

checkOrder

public void checkOrder()
Reorders points according to Order property of X,Y,etc value lists.
Refreshes sort order of Series points if Order type of XValues or YValues is not loNone.


clear

public void clear()
Removes all points, texts and Colors from the Series.
Dependent Series are notified. If no new points are appended to the Series, nothing will be painted.

Specified by:
clear in interface ISeries

clearLists

protected void clearLists()

clicked

public int clicked(Point p)

clicked

public int clicked(int x,
                   int y)
Returns the ValueIndex of the "clicked" point in the Series.
Clicked means the X and Y coordinates are in the point screen region bounds. If no point is "touched", Clicked returns -1

Specified by:
clicked in interface ISeries
Parameters:
x - int
y - int
Returns:
int

getCount

public int getCount()
Returns the number of points in the Series.

Specified by:
getCount in interface ISeries
Returns:
int

delete

public void delete(int index)
Removes the index th point.
X values remain unchanged.
The Chart will be automatically redrawn.
Dependent Series will be recalculated.

Parameters:
index - int

delete

public void delete(int index,
                   int count,
                   boolean removeGap)
Removes count number of points starting at index.
When RemoveGap parameter is true, it calls ValueList FillSequence.
The Chart will be automatically redrawn.
Dependent Series will be recalculated.

Parameters:
index - int
count - int
removeGap - boolean

delete

public void delete(int index,
                   int count)

randomBounds

protected SeriesRandom randomBounds(int numValues)

getNumSampleValues

public int getNumSampleValues()

numSampleValues

protected int numSampleValues()

addSampleValues

protected void addSampleValues(int numValues)

fillSampleValues

public void fillSampleValues()
Adds random values to help visualize the Series.
Each series class determines how many random points to add.


fillSampleValues

public void fillSampleValues(int numValues)
Adds the specified NumValues random points.

Parameters:
numValues - int the number of sample values to add.

isNull

public boolean isNull(int index)
Returns true if the index th point in the Series is "null" or "empty".
A point is considered "null" when the color of that point is "Transparent".

Specified by:
isNull in interface ISeries
Parameters:
index - int the point index.
Returns:
boolean true if the point color is Color.Transparent

isValidSourceOf

public boolean isValidSourceOf(Series value)
Validates Series datasource.
The isValidSourceOf function returns false if the Value parameter is the same as Self.
It's used to validate the DataSource property both at design and run-time.

Parameters:
value - Series the series to validate.
Returns:
boolean true if value can be a Series data source.

isValidSeriesSource

protected boolean isValidSeriesSource(Series value)

getFunction

public Function getFunction()
Function object to calculate values.
Default value: null

Returns:
Function

setFunction

public void setFunction(Function value)
Specified by:
setFunction in interface ISeries

getDepth

public int getDepth()
The Depth of the series points or interconnecting lines.
Default value: -1

Returns:
int

setDepth

public void setDepth(int value)
Sets the Depth of the series points or interconnecting lines.
Default value: -1

Parameters:
value - int

getZOrder

public int getZOrder()
Determines where on the depth axis the Series is drawn.

Read-only and run time.

It's valid only when TChart.Aspect.View3D is true and when there's more than one Series in the same chart.
You can't alter the ZOrder property directly. If you want a different order, you need to use tChart.SeriesList instead.
The ZOrder property is calculated for each Series just before the Chart is drawn.
TChart.ApplyZOrder controls if Series will be assigned a different Z position or not. When False, all Series are drawn at same Z plane.
TChart.MaxZOrder returns the highest of all Series ZOrder values.
Default value: AutoZOrder

Specified by:
getZOrder in interface ISeries
Returns:
int

setZOrder

public void setZOrder(int value)
Determines where on the depth axis the Series is drawn.

Default value: AutoZOrder

Parameters:
value - int

getShowInLegend

public boolean getShowInLegend()
Displays this Series Title in Legend.
It is only meaningful when LegendStyle is Series or LastValues.
Default value: true

Specified by:
getShowInLegend in interface ISeries
Returns:
boolean

setShowInLegend

public void setShowInLegend(boolean value)
Displays this Series Title in Legend.
Default value: true

Parameters:
value - boolean

getFirstVisible

public int getFirstVisible()
Returns the index of the Series' first visible point.

Specified by:
getFirstVisible in interface ISeries
Returns:
int

firstDisplayed

public int firstDisplayed()
Returns the index of the series point that is displayed first when the series is drawn.


lastDisplayed

public int lastDisplayed()
Returns the index of the series point that is displayed first when the series is drawn.


getLastVisible

public int getLastVisible()
Returns the index of the Series' last visible point.

Specified by:
getLastVisible in interface ISeries
Returns:
int

getCursor

public Cursor getCursor()
Cursor displayed when mouse is over a series point.
Each Series determines the intersection of points with mouse coordinates each time the mouse moves. There are many different Cursors available. The Series ZOrder determines the order in which Series will be examined to calculate the clicked Series point.
Default value: default

Returns:
Cursor

setCursor

public void setCursor(Cursor value)
Cursor displayed when mouse is over a series point.
Default value: default

Parameters:
value - Cursor

getMarks

public SeriesMarks getMarks()
Defines how to draw a mark near to each Series point.
A mark consist of a colored rectangle with a text string on it and a line that indicates which points corresponds to which mark.
Each different Series type draws it's marks differently.

Specified by:
getMarks in interface ISeries
Returns:
SeriesMarks

drawValuesForward

public boolean drawValuesForward()
Returns whether Series draws its points in ascending/descending order.
Some Series need to draw their points in descending order (starting from the last point to the first) depending on certain situations. For example, when the horizontal axis Inverted property is True.

Returns:
boolean true if values in this series are displayed forward, from 0 to Count-1.

drawValue

public void drawValue(int index)
Called internally. Draws the "ValueIndex" point of the Series.

Specified by:
drawValue in interface ISeries
Parameters:
index - int

drawHiddenValue

public void drawHiddenValue(int valueIndex,
                            PointDouble startEndVals,
                            int gapSize,
                            Axis axis)

legendToValueIndex

public int legendToValueIndex(int legendIndex)
Specified by:
legendToValueIndex in interface ISeries

setNull

public void setNull(int valueIndex)
Sets the specified series point to a null (transparent) point.

Example:


 lineSeries1.setNull( 123 ); // -- make null (empty) point index 123
 lineSeries1.setIgnoreNulls( false ); // -- allow null points
 lineSeries1.setStairs( true ); // -- set "stairs" mode
 

Parameters:
valueIndex - int

setNull

public void setNull(int valueIndex,
                    boolean isnull)
Toogles between null (transparent) and regular point.

Parameters:
valueIndex - int
isnull - boolean

createSubGallery

public void createSubGallery(Gallery addSubChart)

setSubGallery

public void setSubGallery(int index)
Creates and prepares the index'th Series style to show at sub-gallery dialog.

Specified by:
setSubGallery in interface ISeries
Parameters:
index - int

setValueList

protected void setValueList(ValueList l,
                            ValueList value)

calcXSizeValue

public int calcXSizeValue(double value)
Returns the size in pixels corresponding to value parameter in horizontal axis scales.
This coordinate is calculated using the Series associated Horizontal Axis.

Parameters:
value - double
Returns:
int

calcYSizeValue

public int calcYSizeValue(double value)
Returns the size in pixels corresponding to value parameter in vertical axis scales.
This coordinate is calculated using the Series associated Vertical Axis.

Parameters:
value - double
Returns:
int

toString

public java.lang.String toString()
Overridden ToString() method.

Overrides:
toString in class java.lang.Object
Returns:
String the Series Series.Title method.
See Also:
getTitle()

titleOrName

public java.lang.String titleOrName()
Obsolete. Please use ToString() method instead.

Returns:
String

calcPercentSt

public java.lang.String calcPercentSt(double value)
Specified by:
calcPercentSt in interface ISeries

getLegendString

public java.lang.String getLegendString(int legendIndex,
                                        LegendTextStyle legendTextStyle)
Returns the formatted String corresponding to the LegendIndex point.

Specified by:
getLegendString in interface ISeries
Parameters:
legendIndex - int
legendTextStyle - LegendTextStyle
Returns:
String

getMaxXValue

public double getMaxXValue()
The Maximum Value of the Series X Values List.

Returns:
double

getMaxYValue

public double getMaxYValue()
The Maximum Value of the Series Y Values List.

Returns:
double

getMinXValue

public double getMinXValue()
The Minimum Value of the Series X Values List.

Returns:
double

getMinYValue

public double getMinYValue()
The Minimum Value of the Series Y Values List.

Returns:
double

getMaxZValue

public double getMaxZValue()
The Maximum Z Value. For non-3D series, this is the Z order.

Specified by:
getMaxZValue in interface ISeries
Returns:
double

getMinZValue

public double getMinZValue()
The Minimum Z Value. For non-3D series, this is the Z order.

Specified by:
getMinZValue in interface ISeries
Returns:
double

getYMandatory

public boolean getYMandatory()
Returns whether or not this Series has Y values as mandatory.

Specified by:
getYMandatory in interface ISeries
Returns:
boolean

getBrush

public ChartBrush getBrush()