public class Series extends TeeBase implements ISeries, java.lang.Cloneable
Title: Series class
Description: The base class for all TeeChart Series styles.
Copyright (c) 2005-2019 by Steema Software. All Rights Reserved.
Company: Steema Software
Modifier and Type | Class and Description |
---|---|
static interface |
Series.MarkTextResolver |
Modifier and Type | Field and Description |
---|---|
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 java.lang.Object |
oldDataSource |
protected java.text.DecimalFormat |
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 |
chart, InternalUse
Modifier | Constructor and Description |
---|---|
protected |
Series(IBaseChart c) |
Modifier and Type | Method and Description |
---|---|
int |
add()
Adds a new null (transparent) point.
|
void |
add(java.util.ArrayList list)
Adds the collection of objects that implement the IList interface.
|
void |
add(java.util.ArrayList xValues,
java.util.ArrayList yValues)
Adds the X and Y arrays.
|
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.
|
protected int |
addChartValue(Series source,
int valueIndex) |
protected void |
added() |
protected void |
addedValue(Series source,
int valueIndex) |
int |
addNull()
Obsolete. Please use add() method without parameters instead.
|
int |
addNullXY(double x,
double y)
Obsolete. Please use add(x,y,Color.Transparent) method
instead.
|
protected void |
addSampleValues(int numValues) |
void |
addSeriesMouseListener(SeriesMouseListener l) |
void |
addSeriesPaintListener(SeriesPaintListener l) |
protected void |
addValues(java.util.ArrayList source) |
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. |
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.
This coordinate is calculated using the Series associated Horizontal Axis. |
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.
This coordinate is calculated using the Series associated Horizontal Axis. |
int |
calcYPos(int index)
The pixel Screen Vertical coordinate of the ValueIndex Series value.
This coordinate is calculated using the Series associated Vertical Axis. |
int |
calcYPosValue(double value)
The pixel Screen Vertical coordinate of the specified Value.
This coordinate is calculated using the Series associated Vertical Axis. |
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. |
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.
You can call this method regularly if you want new or modified data to appear in realtime in the Series. |
MouseClicked |
checkMouse(Cursor c,
int x,
int y) |
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. |
void |
checkOtherSeries(Series dest) |
void |
clear()
Removes all points, texts and Colors from the Series.
Dependent Series are notified. |
protected void |
clearLists() |
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. |
int |
clicked(Point p) |
java.lang.Object |
clone() |
Series |
cloneSeries()
Returns a new Series, copy of this original.
It returns the SeriesIndex of the new Series. |
protected double[] |
convertArray(java.util.ArrayList 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.
This is an internal method, you should seldomly use it in your applications. |
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.
This is an internal method, you should seldomly use it in your applications. |
void |
createSubGallery(Gallery addSubChart) |
java.util.ArrayList |
dataSourceArray() |
void |
delete(int index)
Removes the index th point.
X values remain unchanged. The Chart will be automatically redrawn. |
void |
delete(int index,
int count) |
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. |
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.
Each series class determines how many random points to add. |
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.
It can be changed both at design time or runtime. |
boolean |
getAllowSinglePoint() |
java.net.URL |
getBitmapEditor()
Returns the URL of the associated bitmap icon for a given Series class.
This icon is used at ChartListBox and Series Editor dialog. |
ChartBrush |
getBrush() |
Color |
getColor()
Default color for all points.
The TChart Series SeriesColor method is the default color in which the Series points will be drawn. |
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. |
java.lang.String |
getColorMember()
The the Datasource Color Field.
Default value: "" |
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. |
int |
getCount()
Returns the number of points in the Series.
|
int |
getCountLegendItems() |
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. |
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. |
Axis |
getCustomVertAxis()
Specifies the custom vertical axis for the series.
Default value: null |
java.lang.Object |
getDataSource()
Object to load data from.
Default value: null |
protected Color |
getDefaultColor(int valueIndex) |
double |
getDefaultNullValue()
Returns the value to be used as a null value within the series.
|
int |
getDepth()
The Depth of the series points or interconnecting lines.
Default value: -1 |
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.
Default value: null |
boolean |
getHasZValues() |
Axis |
getHorizAxis() |
HorizontalAxis |
getHorizontalAxis()
Horizontal axis associated to this Series.
Default value: HorizontalAxis.Bottom |
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.
A mark consist of a colored rectangle with a text string on it and a line that indicates which points corresponds to which mark. |
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. |
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.
PercentFormat is a standard string specifier. |
SeriesXYPoint |
getPoint(int index)
Point characteristics.
|
protected Color |
getSeriesColor()
Deprecated.
Use
getColor() instead. |
boolean |
getShowInLegend()
Displays this Series Title in Legend.
It is only meaningful when LegendStyle is Series or LastValues. |
int |
getStartZ()
For internal use.
|
java.lang.String |
getTitle()
Series description to show in Legend and dialogs.
Every Series has a Title method of type String. |
boolean |
getUseAxis() |
Color |
getValueColor(int valueIndex)
The colour of the index point.
|
java.lang.String |
getValueFormat()
Determines the Format to display point values.
It specifies the desired formatting string to be applied to Axis Labels. |
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.
It permits access to the list of TeeChartValueLists of a Series. |
Axis |
getVertAxis() |
VerticalAxis |
getVerticalAxis()
Determines Vertical axis associated to this Series.
Default value: VerticalAxis.Left |
boolean |
getVisible()
Returns if this series is Visible.
|
ValueList |
getXValues()
Values defining horizontal point positions.
By default, any Series has an XValues property. |
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.
WARNING: You CAN NOT Delete, Clear or Add values DIRECTLY. You need to call the Series equivalent methods to do this. |
int |
getZOrder()
Determines where on the depth axis the Series is drawn.
Read-only and run time. |
boolean |
hasClickEvents() |
boolean |
hasColors() |
boolean |
hasDataSource(java.lang.Object source) |
boolean |
hasLabels() |
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.
The isValidSourceOf function returns false if the Value parameter is the same as Self. |
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.
For example Stacked Bars. |
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.
Each Series has a DataSource method. |
void |
removeMarkTextResolver() |
void |
removeSeriesMouseListener(SeriesMouseListener l) |
void |
removeSeriesPaintListener(SeriesPaintListener l) |
void |
repaint()
Forces the Chart to Repaint.
You don't normally call Repaint directly. |
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.
It can be changed both at design time or runtime. |
void |
setChart(IBaseChart value)
Chart associated with this object.
|
void |
setColor(Color value)
Default color for all points.
Default value: Color.Empty |
void |
setColorEach(boolean value) |
void |
setColorMember(java.lang.String value)
Sets the Datasource Color Field.
Default value: "" |
void |
setColors(ColorList value)
Accesses the stored Color Array, if created, for the Series.
Default value: null |
void |
setCursor(Cursor value)
Cursor displayed when mouse is over a series point.
Default value: default |
void |
setCustomHorizAxis(Axis value)
Specifies the custom horizontal axis for the series.
Default value: null |
void |
setCustomHorizAxis(int value)
Specifies the custom horizontal axis for the series.
Default value: null |
void |
setCustomVertAxis(Axis value)
Specifies the custom vertical axis for the series.
Default value: null |
void |
setCustomVertAxis(int value)
Specifies the custom vertical axis for the series.
Default value: null |
void |
setDataSource(java.lang.Object value)
Object to load data from.
Default value: null |
void |
setDefaultNullValue(double value)
Sets the value to be used as a null value within the series.
|
void |
setDepth(int value)
Sets the Depth of the series points or interconnecting lines.
Default value: -1 |
void |
setEndZ(int value) |
void |
setFunction(Function value) |
protected void |
setHorizontal() |
void |
setHorizontalAxis(HorizontalAxis value)
Stes the Horizontal axis associated to this Series.
Default value: HorizontalAxis.Bottom |
void |
setLabelMember(java.lang.String value)
Sets the Datasource Label Field.
Default value: "" |
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.
Default value: Language.getString("DefPercentFormat") |
protected void |
setSeriesColor(Color value)
Obsolete. Use the Series.Color method instead.
|
void |
setShowInLegend(boolean value)
Displays this Series Title in Legend.
Default value: true |
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.
Default value: "" |
void |
setValueFormat(java.lang.String value)
Determines the Format to display point values.
Default value: Language.getString("DefValueFormat") |
protected void |
setValueList(ValueList l,
ValueList value) |
void |
setVerticalAxis(VerticalAxis value)
Determines Vertical axis associated to this Series.
Default value: VerticalAxis.Left |
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.
Default value: AutoZOrder |
void |
setZPositions() |
void |
sortByLabels() |
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). |
protected int[] |
sortDrawSeries(int firstSeries,
int lastSeries,
int valueIndex) |
protected void |
swapValueIndex(int a,
int b)
Exchanges one point with another.
|
java.lang.String |
titleOrName()
Obsolete. Please use ToString() method instead.
|
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.
The Screen position must be between Axis limits. |
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. |
getChart, invalidate, setBooleanProperty, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getChart, invalidate
public static final int AUTODEPTH
public static final int AUTOZORDER
protected transient EventListenerList listenerList
protected transient Series.MarkTextResolver customMarkText
protected ChartBrush bBrush
protected boolean bActive
protected ValueList vxValues
protected ValueList vyValues
protected StringList sLabels
protected ColorList iColors
protected boolean bColorEach
public transient int iZOrder
protected transient ValueList mandatory
protected transient ValueList notMandatory
public boolean manualData
protected SeriesMarks marks
protected transient int startZ
protected transient int middleZ
protected transient int endZ
public transient boolean drawBetweenPoints
protected transient boolean yMandatory
public transient boolean useAxis
protected transient boolean useSeriesColor
protected transient boolean calcVisiblePoints
protected java.lang.String valueFormat
protected java.lang.String labelMember
protected java.lang.String colorMember
protected java.lang.String percentFormat
protected transient java.text.DecimalFormat percentDecimal
public transient boolean hasZValues
protected transient int firstVisible
protected transient int lastVisible
protected transient int iNumSampleValues
protected java.lang.Object oldDataSource
protected Series(IBaseChart c)
public void setMarkTextResolver(Series.MarkTextResolver resolver)
public void removeMarkTextResolver()
public void addSeriesPaintListener(SeriesPaintListener l)
public void removeSeriesPaintListener(SeriesPaintListener l)
protected void fireSeriesPaint(ChartDrawEvent e)
public void addSeriesMouseListener(SeriesMouseListener l)
public void removeSeriesMouseListener(SeriesMouseListener l)
protected void fireSeriesMouseEvent(SeriesMouseEvent se)
protected void doClickPointer(int valueIndex, int x, int y)
protected boolean hasListenersOf(java.lang.Class listener)
public Axis getHorizAxis()
getHorizAxis
in interface ISeries
public Axis getVertAxis()
getVertAxis
in interface ISeries
public ValueList getNotMandatory()
getNotMandatory
in interface ISeries
public ValueList getMandatory()
getMandatory
in interface ISeries
public static Series newFromType(java.lang.Class type) throws java.lang.InstantiationException, java.lang.IllegalAccessException
type
- Classjava.lang.InstantiationException
java.lang.IllegalAccessException
protected java.lang.Object readResolve()
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.NoSuchMethodException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException
chart
- IBaseCharttype
- ClassaFunction
- ClasssubIndex
- intjava.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.NoSuchMethodException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException
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.NoSuchMethodException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException
chart
- IBaseCharttype
- ClassaFunction
- ClasssubIndex
- inttag
- Objectjava.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.NoSuchMethodException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException
public static Series createNewSeries(IBaseChart chart, java.lang.Class type, java.lang.Class aFunction) throws java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.NoSuchMethodException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException
chart
- IBaseCharttype
- ClassaFunction
- Classjava.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.NoSuchMethodException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException
protected void doBeforeDrawValues()
protected void doAfterDrawValues()
public void calcZOrder()
public ColorList getColors()
Example:
candleSeries.add( ...., Color.Yellow ); candleSeries.getColors().setColor( 10, Color.Blue);
getColorEach()
public void setColors(ColorList value)
value
- ColorListgetColors()
public SeriesXYPoint getPoint(int index)
index
- intpublic ValueList getXValues()
getXValues
in interface ISeries
public void setXValues(ValueList value)
public ValueList getYValues()
getYValues
in interface ISeries
public void setYValues(ValueList value)
public void assign(Series source)
source
- Seriespublic boolean getAllowSinglePoint()
getAllowSinglePoint
in interface ISeries
public static Series changeType(Series s, java.lang.Class newType) throws java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.NoSuchMethodException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException
s
- SeriesnewType
- Classjava.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.NoSuchMethodException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException
public ValuesLists getValuesLists()
ValuesLists
public void valuesListAdd(ValueList value)
valuesListAdd
in interface ISeries
public boolean hasNoMandatoryValues()
public java.net.URL getBitmapEditor()
public ValueList getYValueList(java.lang.String aListName)
aListName
- Stringpublic Axis getCustomHorizAxis()
public Axis getMandatoryAxis()
public void setCustomHorizAxis(Axis value)
value
- Axispublic void setCustomHorizAxis(int value)
value
- intpublic Axis getCustomVertAxis()
public void setCustomVertAxis(int value)
value
- intpublic void setCustomVertAxis(Axis value)
value
- Axispublic StringList getLabels()
public void setLabels(StringList value)
value
- StringListpublic java.lang.String getLabelMember()
public void setLabelMember(java.lang.String value)
value
- Stringpublic java.lang.String getColorMember()
public void setColorMember(java.lang.String value)
value
- Stringpublic void calcHorizMargins(Margins margins)
margins
- Marginspublic void calcVerticalMargins(Margins margins)
margins
- Marginspublic void galleryChanged3D(boolean is3D)
public boolean getUseAxis()
getUseAxis
in interface ISeries
public boolean associatedToAxis(Axis a)
associatedToAxis
in interface ISeries
public Series cloneSeries()
java.lang.InstantiationException
java.lang.IllegalAccessException
protected boolean isPointInChartRect(int valueIndex)
protected int countLegendItems()
public java.lang.Object clone()
clone
in class java.lang.Object
public void assignValues(Series source)
source
- Seriesprotected int addChartValue(Series source, int valueIndex)
protected void addedValue(Series source, int valueIndex)
public Cursor mouseEvent(FrameworkMouseEvent e, Cursor c)
public void refreshSeries()
public void beginUpdate()
public void endUpdate()
protected void addValues(java.util.ArrayList source)
public void setColorEach(boolean value)
public java.util.ArrayList dataSourceArray()
dataSourceArray
in interface ISeries
public boolean hasDataSource(java.lang.Object source)
hasDataSource
in interface ISeries
public void doDoubleClick(int valueIndex, FrameworkMouseEvent e)
public void doClick(int valueIndex, FrameworkMouseEvent e)
public boolean getColorEach()
getColorEach
in interface ISeries
public int getCountLegendItems()
getCountLegendItems
in interface ISeries
public int getNumGallerySeries()
public java.lang.String getDescription()
public boolean getVisible()
public void setVisible(boolean value)
value
- booleanpublic double xScreenToValue(int screenPos)
screenPos
- intpublic double yScreenToValue(int screenPos)
screenPos
- intpublic void prepareForGallery(boolean isEnabled)
protected void prepareLegendCanvas(IGraphics3D g, int valueIndex, Color backColor, ChartBrush aBrush)
protected void drawLegendShape(IGraphics3D g, int valueIndex, Rectangle rect)
public Color legendItemColor(int index)
legendItemColor
in interface ISeries
public void drawLegend(int valueIndex, Rectangle rect)
drawLegend
in interface ISeries
protected void drawLegend(IGraphics3D g, int valueIndex, Rectangle rect)
public void calcFirstLastVisibleIndex()
calcFirstLastVisibleIndex
in interface ISeries
public int maxMarkWidth()
public double getMarkValue(int valueIndex)
getMarkValue
in interface ISeries
valueIndex
- intpublic java.lang.String getMarkText(int valueIndex)
getMarkText
in interface ISeries
valueIndex
- intpublic java.lang.String getValueMarkText(int index)
getValueMarkText
in interface ISeries
index
- intpublic double getDefaultNullValue()
public void setDefaultNullValue(double value)
value
- doublepublic void repaint()
protected boolean sameClass(ISeries s)
s
- ISeriespublic void sortByLabels(ValueListOrder order)
order
- ValueListOrderpublic void sortByLabels()
public int getStartZ()
public void setStartZ(int value)
public int getMiddleZ()
getMiddleZ
in interface ISeries
public void setMarks(SeriesMarks value)
public void setMiddleZ(int value)
public void setZPositions()
public int getEndZ()
public void setEndZ(int value)
public java.lang.String getValueFormat()
getValueFormat
in interface ISeries
public void setValueFormat(java.lang.String value)
value
- Stringpublic java.lang.String getPercentFormat()
getValueFormat()
public void setPercentFormat(java.lang.String value)
value
- Stringpublic HorizontalAxis getHorizontalAxis()
public void setHorizontalAxis(HorizontalAxis value)
value
- HorizontalAxispublic VerticalAxis getVerticalAxis()
public void setVerticalAxis(VerticalAxis value)
value
- VerticalAxispublic int calcPosValue(double value)
value
- doublepublic int calcXPos(int index)
index
- intpublic int calcXPosValue(double value)
value
- doublepublic int calcYPos(int index)
index
- intpublic int calcYPosValue(double value)
value
- doublepublic double getOriginValue(int valueIndex)
getOriginValue
in interface ISeries
protected void drawMark(int valueIndex, java.lang.String st, SeriesMarksPosition aPosition)
protected Color getDefaultColor(int valueIndex)
public Color getValueColor(int valueIndex)
getValueColor
in interface ISeries
valueIndex
- intprotected void calculateMarkPosition(TextShape shape, java.lang.String aText, int xPos, int yPos, SeriesMarksPosition position)
protected int lastVisibleMark()
public boolean drawMarksSeries(Series s, boolean activeRegion)
protected boolean drawSeriesForward(int valueIndex)
protected int[] sortDrawSeries(int firstSeries, int lastSeries, int valueIndex)
public boolean getHasZValues()
getHasZValues
in interface ISeries
protected boolean moreSameZOrder()
protected void draw()
public void doBeforeDrawChart()
public void drawSeries()
protected void setSeriesColor(Color value)
value
- ColorgetColor()
protected boolean canAddRandomPoints()
public java.lang.Object getDataSource()
getDataSource
in interface ISeries
public void setDataSource(java.lang.Object value)
setDataSource
in interface ISeries
value
- Objectpublic void add(java.util.ArrayList list)
list
- ArrayListpublic ValueList getValueList(int index)
public ValueList getValueList(java.lang.String name)
getValueList
in interface ISeries
protected int getFields(ValueList otherList)
public void checkOtherSeries(Series dest) throws ChartException
ChartException
public void checkDataSource()
checkDataSource
in interface ISeries
protected void recalcGetAxis()
protected void added()
@Deprecated protected Color getSeriesColor()
getColor()
instead.Color
public Color getColor()
getColor
in interface ISeries
getColorEach()
public void setColor(Color value)
value
- ColorgetColorEach()
public boolean getActive()
public void setActive(boolean value)
protected void swapValueIndex(int a, int b)
a
- int index of first point to exchange.b
- int index of second point to exchange.public Swapper getValueIndexSwapper()
getValueIndexSwapper
in interface ISeries
public java.lang.String getTitle()
public void setTitle(java.lang.String value)
value
- Stringpublic void onDisposing()
onDisposing
in interface ISeries
public void setChart(IBaseChart value)
TeeBase
protected void setHorizontal()
public int add(DateTime x, double y)
x
- DateTimey
- doubleValueList
public int add(DateTime x, DateTime y)
x
- DateTimey
- DateTimeValueList
public int add(DateTime x, double y, Color c)
x
- DateTimey
- doublec
- ColorValueList
public int add(DateTime x, double y, java.lang.String text)
x
- DateTimey
- doubletext
- StringValueList
public int addNullXY(double x, double y)
x
- doubley
- doublepublic int addNull()
public int add()
public int add(int value)
value
- intpublic int add(double value)
public int add(float value)
value
- floatpublic int add(double value, java.lang.String text)
value
- doubletext
- Stringpublic int add(double x, double y)
public int add(Point.Double p)
p
- Doublepublic int add(double x, double y, java.lang.String text)
public int add(double x, double y, java.lang.String text, Color color)
x
- doubley
- doubletext
- Stringcolor
- Colorpublic int add(DateTime aDate, double y, java.lang.String text, Color color)
aDate
- DateTime datetime valuey
- doubletext
- String point textcolor
- Colorpublic int add(double x, double y, Color color)
x
- doubley
- doublecolor
- Colorpublic int add(double value, java.lang.String text, Color color)
value
- doubletext
- Stringcolor
- Colorpublic int add(double value, Color color)
value
- doublecolor
- Colorpublic int add(java.lang.String text)
text
- Stringpublic void add(Series source)
source
- Seriesprotected double[] convertArray(java.util.ArrayList a, int numPoints)
public void add(java.util.ArrayList xValues, java.util.ArrayList yValues)
xValues
- ArrayListyValues
- ArrayListpublic void add(double[] xValues, double[] yValues)
xValues
- ArrayListyValues
- ArrayListpublic void add(double[] xValues, double[] yValues, boolean append)
public void add(double[] values)
values
- double[]public void add(float[] values)
values
- float[]public void add(int[] values)
values
- int[]public boolean hasClickEvents()
public MouseClicked checkMouse(Cursor c, int x, int y)
public void checkOrder()
public void clear()
protected void clearLists()
public int clicked(Point p)
public int clicked(int x, int y)
public int getCount()
public void delete(int index)
index
- intpublic void delete(int index, int count, boolean removeGap)
index
- intcount
- intremoveGap
- booleanpublic void delete(int index, int count)
protected SeriesRandom randomBounds(int numValues)
public int getNumSampleValues()
protected int numSampleValues()
protected void addSampleValues(int numValues)
public void fillSampleValues()
public void fillSampleValues(int numValues)
numValues
- int the number of sample values to add.public boolean isNull(int index)
public boolean isValidSourceOf(Series value)
value
- Series the series to validate.protected boolean isValidSeriesSource(Series value)
public Function getFunction()
public void setFunction(Function value)
setFunction
in interface ISeries
public int getDepth()
public void setDepth(int value)
value
- intpublic int getZOrder()
public void setZOrder(int value)
value
- intpublic boolean getShowInLegend()
getShowInLegend
in interface ISeries
public void setShowInLegend(boolean value)
value
- booleanpublic int getFirstVisible()
getFirstVisible
in interface ISeries
public int firstDisplayed()
public int lastDisplayed()
public int getLastVisible()
getLastVisible
in interface ISeries
public Cursor getCursor()
public void setCursor(Cursor value)
value
- Cursorpublic SeriesMarks getMarks()
public boolean drawValuesForward()
public void drawValue(int index)
public void drawHiddenValue(int valueIndex, PointDouble startEndVals, int gapSize, Axis axis)
public int legendToValueIndex(int legendIndex)
legendToValueIndex
in interface ISeries
public void setNull(int valueIndex)
Example:
lineSeries1.setNull( 123 ); // -- make null (empty) point index 123 lineSeries1.setIgnoreNulls( false ); // -- allow null points lineSeries1.setStairs( true ); // -- set "stairs" mode
valueIndex
- intpublic void setNull(int valueIndex, boolean isnull)
valueIndex
- intisnull
- booleanpublic void createSubGallery(Gallery addSubChart)
public void setSubGallery(int index)
setSubGallery
in interface ISeries
index
- intpublic int calcXSizeValue(double value)
value
- doublepublic int calcYSizeValue(double value)
value
- doublepublic java.lang.String toString()
toString
in class java.lang.Object
getTitle()
public java.lang.String titleOrName()
public java.lang.String calcPercentSt(double value)
calcPercentSt
in interface ISeries
public java.lang.String getLegendString(int legendIndex, LegendTextStyle legendTextStyle)
getLegendString
in interface ISeries
legendIndex
- intlegendTextStyle
- LegendTextStylepublic double getMaxXValue()
public double getMaxYValue()
public double getMinXValue()
public double getMinYValue()
public double getMaxZValue()
getMaxZValue
in interface ISeries
public double getMinZValue()
getMinZValue
in interface ISeries
public boolean getYMandatory()
getYMandatory
in interface ISeries
public ChartBrush getBrush()