com.steema.teechart
Class Chart

java.lang.Object
  extended by com.steema.teechart.TeeBase
      extended by com.steema.teechart.Chart
All Implemented Interfaces:
IBaseChart

public class Chart
extends TeeBase
implements IBaseChart

Title: Chart class

Description: Chart contents.

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

Company: Steema Software SL


Nested Class Summary
 class Chart.ChartToolTip
          Title: Tooltips class Description: Tooltips Copyright (c) 2005-2012 by Steema Software SL.
 
Field Summary
protected  Aspect aspect
           
protected  Axes axes
           
 AxisSavedScales bottom
           
 boolean cancelMouse
           
protected  Rectangle chartBounds
           
protected  Rectangle chartRect
           
 boolean clipWhenMetafiling
           
 boolean clipWhenPrinting
           
protected  IGraphics3D graphics3D
           
 boolean iClicked
           
protected  boolean invertedRotation
           
 boolean isDirty
           
 AxisSavedScales left
           
protected  Legend legend
           
protected  ChartPen legendPen
           
protected  int maxZOrder
           
 Cursor originalCursor
           
protected  Page page
           
protected  IChart parent
           
protected  boolean printing
           
protected  boolean restoredAxisScales
           
 AxisSavedScales right
           
protected  SeriesCollection series
           
protected  int seriesHeight3D
           
protected  int seriesWidth3D
           
protected  ToolAxis toolCheckHidden
           
 AxisSavedScales top
           
protected  Zoom zoom
           
 
Fields inherited from class com.steema.teechart.TeeBase
chart, InternalUse
 
Constructor Summary
Chart()
           
Chart(IChart parent)
           
Chart(IChart parent, Cursor cursor)
           
 
Method Summary
 Series activeSeriesLegend(int itemIndex)
          Returns the Active series (visible) that corresponds to the ItemIndex position in the Legend.
 int addSeries(Series value)
          Adds a new Series into the Chart.
protected  void applyGapSize(Axis axis, Point p)
           
 TeeEvent broadcastEvent(Series s, SeriesEventStyle e)
          Internal use.
 void broadcastEvent(TeeEvent event)
           
protected  Cursor broadcastMouseEvent(FrameworkMouseEvent e)
           
protected  Cursor broadcastMouseEvent(FrameworkMouseEvent e, Cursor c)
           
protected  void broadcastToolEvent(ChartDrawEvent ce)
           
 boolean canClip()
          Returns the number of active (visible) series.
 boolean canDrawPanelBack()
          Internal use.
static void changeAllSeriesType(Chart chart, java.lang.Class newClass)
          Changes all Series on the Chart from one Series type to another.
static Series changeSeriesType(Series series, java.lang.Class newClass)
          Changes the Series from one type to another, for example from Bar Series
Series to Line Series
protected  int chartRectHeight()
           
protected  int chartRectWidth()
           
protected  void checkZoomPanning(FrameworkMouseEvent e)
           
 java.lang.Object clone()
          Returns a clone of the Chart.
 int countActiveSeries()
          Returns the number of active (visible) series.
 void doBaseInvalidate()
           
 void doChangedBrush(ChartBrush value)
          Internal use.
 void doChangedFont(ChartFont value)
          Internal use.
 Rectangle doDrawLegend(IGraphics3D g, Rectangle tmp)
          Internal use.
 Cursor doMouseMove(int x, int y, Cursor c)
           
 void doZoom(double topx, double topy, double bottomx, double bottomy, double leftx, double lefty, double rightx, double righty)
          Internal use.
 void doZoom(Point.Double top, Point.Double bot, Point.Double lef, Point.Double rig)
           
 boolean drawBackWallAfter(int z)
           
 boolean drawLeftWallFirst()
          Internal use.
 boolean drawRightWallAfter()
          Internal use.
 java.lang.String formattedLegend(int seriesOrValueIndex)
          Returns the text string corresponding to a Legend position.
 java.lang.String formattedValueLegend(Series aSeries, int valueIndex)
          Returns the String to display at Legend for a given series and point index.
 Color freeSeriesColor(boolean checkBackground)
          Returns a color from the default color palette not used by any Series.
 Aspect getAspect()
          3D view parameters.
 boolean getAutoRepaint()
          Returns if the Chart should automatically repaint itself when a property has been changed.
 Axes getAxes()
          Accesses the five axes, Top, Left, Right, Bottom and z depthas well as custom axis objects.
 Series getAxisSeries(Axis axis)
          Returns the first Series that depends on the specified Axis.
 int getBottom()
          Returns the location in pixels of the bottom of the Chart Rectangle.
 Rectangle getChartBounds()
          (Read only) Used to get the four sides of the Chart (Left, Top, Right and Bottom)
 Rectangle getChartRect()
          Returns the rectangle that contains the four main Chart axes.
protected  int getChartRectBottom()
           
 boolean getCustomChartRect()
           
 Exports getExport()
          Accesses Chart export attributes.
 Series getFirstActiveSeries()
          Returns first active (visible) series.
 Footer getFooter()
          Defines the Text and formatting attributes to be drawn at the bottom of the Chart.
 IGraphics3D getGraphics3D()
          Accesses TeeChart Draw attributes.
 Header getHeader()
          Defines the Text and formatting attributes to be drawn at the top of the Chart.
 int getHeight()
          The Chart Height in pixels.
 Imports getImport()
          Accesses Chart import attributes.
 Series getItem(int index)
          Default indexer.
 int getLeft()
          Defines the position of the Chart's Left border in pixels
 Legend getLegend()
          Determines the Legend characteristics.
 ChartPen getLegendPen()
          Defines the Pen chararcteristics of the Legend.
 TeeEventListeners getListeners()
          Returns array list of objects that implement the TeeEventListener interface.
 int getMaxValuesCount()
          Returns maximum Point Count between all Active Series.
 double getMaxXValue(Axis axis)
          Returns the Maximum Value of the Series X Values List.
 double getMaxYValue(Axis axis)
          Returns the highest of all the current Series Y point values.
 int getMaxZOrder()
          Returns the highest of all Series ZOrder values.
 double getMinXValue(Axis axis)
          Returns the Minimum Value of the Series X Values List.
 double getMinYValue(Axis axis)
          Returns the Minimum Value of the Series Y Values List.
 int getNumPages()
          Returns the number of Chart pages according to current points per page.
 Page getPage()
          Accesses multiple page characteristics of the Chart.
 Panel getPanel()
          Accesses all visible Background attributes..
 Scroll getPanning()
          Sets the scrolling direction or denies scrolling.
 IChart getParent()
          Returns the IChart parent of the Chart.
 Printer getPrinter()
          Printing related attributes.
 boolean getPrinting()
          Determines when Chart is being printed.
 int getRight()
          Defines the position of the Chart's Right border in pixels
 int getScreenHeight()
           
 int getScreenWidth()
           
 SeriesCollection getSeries()
          Collection of Series contained in this Chart.
 Series getSeries(int seriesIndex)
          Returns the index value of Series
 int getSeriesCount()
          Returns the number of Series associated to this Chart.
 int getSeriesHeight3D()
          Internal use.
 int getSeriesIndexOf(Series value)
          Returns the Index of the Series passed as argument.
 java.lang.String getSeriesTitleLegend(int seriesIndex, boolean onlyActive)
          Returns the Series.Title string.
 int getSeriesWidth3D()
          Internal use.
 Footer getSubFooter()
          Defines the Text and formatting attributes to be drawn at the bottom of the Chart, just above the Footer text.
 Header getSubHeader()
          Defines the Text and formatting attributes to be drawn at the top of the Chart, just below the Header text.
 Header getSubTitle()
          Obsolete.
 Header getTitle()
          Obsolete.
 Tool getTool(int index)
          Gets the index'th tool in getTools() collection
 ToolAxis getToolCheckHidden()
           
 ToolsCollection getTools()
          Collection of Tool components contained in this Chart.
 ToolTip getToolTip()
          Displays a text box at the cursor.
 int getTop()
          Defines the position of the Chart's Top border in pixels
 Walls getWalls()
          Accesses left, bottom and back wall characteristics of the Chart.
 int getWidth()
          The Chart width in pixels.
 Zoom getZoom()
          Accesses the Zoom characteristics of the Chart.
 Image image(int width, int height)
          Returns an image of the chart of the defined width and height dimensions
protected  void internalDraw(IGraphics3D g)
          Main drawing procedure.
 double internalMinMax(Axis aAxis, boolean isMin, boolean isX)
          Internal use.
 boolean isAxisCustom(Axis axis)
          Returns True if Axis is a Custom Axis.
 boolean isAxisVisible(Axis a)
           
 boolean isDesignTime()
           
 boolean isFreeSeriesColor(Color color, boolean checkBackground)
          Returns whether the AColor parameter is used by any Series or not.
 boolean isValidDataSource(Series s, java.lang.Object source)
          Returns true if source can act as Series datasource.
 int maxMarkWidth()
          Returns the Maximum width of the Active Series Marks.
 int maxTextWidth()
          Returns the Maximum width in pixels of all Series Labels, whether active or not.
 Cursor mouseMoved(FrameworkMouseEvent e)
          Internal use.
 void mousePressed(FrameworkMouseEvent e)
          Internal use.
 void mouseReleased(FrameworkMouseEvent e)
          Internal use.
 void moveSeriesTo(Series value, int newIndex)
          Moves Series' index in Chart SeriesList.
 MultiLine multiLineTextWidth(java.lang.String s)
          Returns maximum linewidth of multiple line text.
 void paint()
           
 void paint(IGraphics3D g)
          Paints the Chart on the Drawing Canvas g.
 void paint(IGraphics3D g, int width, int height)
          Invoke a Chart repaint.
 void paint(IGraphics3D g, Rectangle rect)
          Paints the Chart in your preferred Canvas and region.
 boolean panAxis(boolean axisHorizontal, int pos1, int pos2, boolean panned)
           
protected  java.lang.Object readResolve()
           
 Rectangle recalcWidthHeight(Rectangle r)
          Internal use.
protected  void removeAllComponents()
           
protected  void removeListener(ITeeEventListener sender)
           
 void removeSeries(Series value)
          Removes a Series from the Chart series list, without disposing it.
 void restoreAxisScales()
          Restores the "remembered" axis scales when unzooming.
 java.util.Enumeration series()
           
 Series seriesLegend(int itemIndex, boolean onlyActive)
          Returns the series that corresponds to the Legend "ItemIndex" position, when the Legend style is "Series".
 void setAspect(Aspect value)
          3D view parameters.
 void setAutoRepaint(boolean value)
          Sets if this Chart should automatically repaint after a property change.
 void setAxes(Axes value)
          Accesses the five axes, Top, Left, Right, Bottom and z depthas well as custom axis objects.
 void setBrushCanvas(Color aColor, ChartBrush aBrush, Color aBackColor)
          Internal use.
 void setCancelMouse(boolean value)
          Cancels the mouse when set to True.
 void setChartBounds(Rectangle value)
          Sets the four sides of the Chart (Left, Top, Right and Bottom)
 void setChartRect(Rectangle value)
          Sets the rectangle to contain the four main Chart axes.
 void setCustomChartRect(boolean value)
           
 void setExport(Exports value)
          Accesses Chart export attributes.
 void setFooter(Footer value)
          Defines the Text and formatting attributes to be drawn at the bottom of the Chart.
 void setGraphics3D(IGraphics3D value)
          Accesses TeeChart Draw attributes.
 void setHeader(Header value)
          Defines the Text and formatting attributes to be drawn at the top of the Chart.
 void setHeight(int value)
          Sets the Chart Height in pixels.
 void setImport(Imports value)
          Accesses Chart import attributes.
 void setItem(int index, Series value)
          Default indexer.
 void setLegend(Legend value)
          Determines the Legend characteristics.
 void setLegendPen(ChartPen value)
          Defines the Pen chararcteristics of the Legend.
 void setMaxZOrder(int value)
          Sets the highest of Series ZOrder value.
 void setPage(Page value)
          Accesses multiple page characteristics of the Chart.
 void setPanel(Panel value)
          Sets all visible Background attributes..
 void setPanning(Scroll panning)
          Sets the scrolling direction or denies scrolling.
 void setParent(IChart value)
          Internal use.
 void setPrinter(Printer value)
          Printing related attributes.
 void setPrinting(boolean value)
          Determines when Chart is being printed.
 void setSeries(SeriesCollection value)
          Sets the index value of Series
 void setSubFooter(Footer value)
          Defines the Text and formatting properties to be drawn at the bottom of the Chart, just above the Footer text.
 void setSubHeader(Header value)
          Defines the Text and formatting attributes to be drawn at the top of the Chart, just below the Header text.
 void setToolCheckHidden(ToolAxis tool)
           
 void setTools(ToolsCollection value)
          Collection of Tool components contained in this Chart.
 void setWalls(Walls value)
          Accesses left, bottom and back wall characteristics of the Chart.
 void setWidth(int value)
          Sets the Chart width in pixels.
 void setZoom(Zoom zoom)
          Sets the Zoom characteristics of the Chart.
 java.util.Enumeration tools()
          Returns collection of Tool components contained in this Chart.
 void undoZoom()
          Obsolete.
 
Methods inherited from class com.steema.teechart.TeeBase
getChart, invalidate, setBooleanProperty, setChart, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.steema.teechart.IBaseChart
invalidate
 

Field Detail

aspect

protected Aspect aspect

cancelMouse

public boolean cancelMouse

iClicked

public transient boolean iClicked

axes

protected Axes axes

graphics3D

protected transient IGraphics3D graphics3D

legend

protected Legend legend

series

protected SeriesCollection series

toolCheckHidden

protected ToolAxis toolCheckHidden

parent

protected transient IChart parent

page

protected Page page

restoredAxisScales

protected transient boolean restoredAxisScales

legendPen

protected transient ChartPen legendPen

printing

protected transient boolean printing

clipWhenMetafiling

public boolean clipWhenMetafiling

clipWhenPrinting

public boolean clipWhenPrinting

seriesWidth3D

protected transient int seriesWidth3D

seriesHeight3D

protected transient int seriesHeight3D

maxZOrder

protected transient int maxZOrder

chartBounds

protected Rectangle chartBounds

chartRect

protected Rectangle chartRect

zoom

protected Zoom zoom

left

public AxisSavedScales left

top

public AxisSavedScales top

right

public AxisSavedScales right

bottom

public AxisSavedScales bottom

originalCursor

public Cursor originalCursor

isDirty

public boolean isDirty

invertedRotation

protected boolean invertedRotation
Constructor Detail

Chart

public Chart()

Chart

public Chart(IChart parent)

Chart

public Chart(IChart parent,
             Cursor cursor)
Method Detail

readResolve

protected java.lang.Object readResolve()

clone

public java.lang.Object clone()
Returns a clone of the Chart.

Overrides:
clone in class java.lang.Object
Returns:

image

public final Image image(int width,
                         int height)
Returns an image of the chart of the defined width and height dimensions

Specified by:
image in interface IBaseChart
Parameters:
width -
height -
Returns:

getChartBounds

public Rectangle getChartBounds()
(Read only) Used to get the four sides of the Chart (Left, Top, Right and Bottom)

Specified by:
getChartBounds in interface IBaseChart
Returns:
Rectangle

setChartBounds

public void setChartBounds(Rectangle value)
Sets the four sides of the Chart (Left, Top, Right and Bottom)

Parameters:
value - Rectangle

getToolCheckHidden

public ToolAxis getToolCheckHidden()
Specified by:
getToolCheckHidden in interface IBaseChart

setToolCheckHidden

public void setToolCheckHidden(ToolAxis tool)
Specified by:
setToolCheckHidden in interface IBaseChart

getWidth

public int getWidth()
The Chart width in pixels.

Specified by:
getWidth in interface IBaseChart
Returns:
int

setWidth

public void setWidth(int value)
Sets the Chart width in pixels.

Specified by:
setWidth in interface IBaseChart
Parameters:
value - int

getHeight

public int getHeight()
The Chart Height in pixels.

Specified by:
getHeight in interface IBaseChart
Returns:
int

setHeight

public void setHeight(int value)
Sets the Chart Height in pixels.

Specified by:
setHeight in interface IBaseChart
Parameters:
value - int

getLeft

public int getLeft()
Defines the position of the Chart's Left border in pixels

Specified by:
getLeft in interface IBaseChart
Returns:

getRight

public int getRight()
Defines the position of the Chart's Right border in pixels

Specified by:
getRight in interface IBaseChart
Returns:

getTop

public int getTop()
Defines the position of the Chart's Top border in pixels

Specified by:
getTop in interface IBaseChart
Returns:

getChartRectBottom

protected int getChartRectBottom()

chartRectWidth

protected int chartRectWidth()

chartRectHeight

protected int chartRectHeight()

doChangedBrush

public void doChangedBrush(ChartBrush value)
Internal use.

Specified by:
doChangedBrush in interface IBaseChart
Parameters:
value -

doChangedFont

public void doChangedFont(ChartFont value)
Internal use.

Specified by:
doChangedFont in interface IBaseChart
Parameters:
value -

canDrawPanelBack

public boolean canDrawPanelBack()
Internal use.

Specified by:
canDrawPanelBack in interface IBaseChart
Returns:

getPrinting

public boolean getPrinting()
Determines when Chart is being printed.

Specified by:
getPrinting in interface IBaseChart
Returns:
boolean

setPrinting

public void setPrinting(boolean value)
Determines when Chart is being printed.

Specified by:
setPrinting in interface IBaseChart
Parameters:
value - boolean

setCancelMouse

public void setCancelMouse(boolean value)
Cancels the mouse when set to True.

Specified by:
setCancelMouse in interface IBaseChart
Parameters:
value -

changeSeriesType

public static Series changeSeriesType(Series series,
                                      java.lang.Class newClass)
                               throws java.lang.IllegalArgumentException
Changes the Series from one type to another, for example from Bar Series
Series to Line Series

Parameters:
series -
newClass -
Returns:
Throws:
java.lang.IllegalArgumentException

changeAllSeriesType

public static void changeAllSeriesType(Chart chart,
                                       java.lang.Class newClass)
                                throws java.lang.IllegalArgumentException
Changes all Series on the Chart from one Series type to another.

Parameters:
chart -
newClass -
Throws:
java.lang.IllegalArgumentException

removeAllComponents

protected void removeAllComponents()

getListeners

public TeeEventListeners getListeners()
Returns array list of objects that implement the TeeEventListener interface.

Returns:
TeeEventListeners

removeListener

protected void removeListener(ITeeEventListener sender)

isValidDataSource

public boolean isValidDataSource(Series s,
                                 java.lang.Object source)
Returns true if source can act as Series datasource.

Parameters:
s -
source -
Returns:

restoreAxisScales

public void restoreAxisScales()
Restores the "remembered" axis scales when unzooming.

Specified by:
restoreAxisScales in interface IBaseChart

getNumPages

public int getNumPages()
Returns the number of Chart pages according to current points per page.

Specified by:
getNumPages in interface IBaseChart
Returns:

getToolTip

public ToolTip getToolTip()
Displays a text box at the cursor.

Specified by:
getToolTip in interface IBaseChart
Returns:
ToolTip

activeSeriesLegend

public Series activeSeriesLegend(int itemIndex)
Returns the Active series (visible) that corresponds to the ItemIndex position in the Legend.
When the Legend style is "Series", returns the series that corresponds to the Legend "ItemIndex" position. The "OnlyActive" parameter, when false takes into account all series, visibly active or not.

Specified by:
activeSeriesLegend in interface IBaseChart
Parameters:
itemIndex - int
Returns:
Series that corresponds to the ItemIndex position in the Legend

getSeriesTitleLegend

public java.lang.String getSeriesTitleLegend(int seriesIndex,
                                             boolean onlyActive)
Returns the Series.Title string.

Specified by:
getSeriesTitleLegend in interface IBaseChart
Parameters:
seriesIndex - int
onlyActive - boolean
Returns:
String

internalDraw

protected void internalDraw(IGraphics3D g)
Main drawing procedure. Paints all Chart contents.

Parameters:
g - IGraphics3D

getZoom

public Zoom getZoom()
Accesses the Zoom characteristics of the Chart.

Specified by:
getZoom in interface IBaseChart
Returns:
Zoom

setZoom

public void setZoom(Zoom zoom)
Sets the Zoom characteristics of the Chart.

Specified by:
setZoom in interface IBaseChart
Parameters:
zoom -

getPanning

public Scroll getPanning()
Sets the scrolling direction or denies scrolling.

Specified by:
getPanning in interface IBaseChart
Returns:
Scroll

setPanning

public void setPanning(Scroll panning)
Sets the scrolling direction or denies scrolling.

Specified by:
setPanning in interface IBaseChart
Parameters:
panning -

checkZoomPanning

protected void checkZoomPanning(FrameworkMouseEvent e)

broadcastMouseEvent

protected Cursor broadcastMouseEvent(FrameworkMouseEvent e)

broadcastMouseEvent

protected Cursor broadcastMouseEvent(FrameworkMouseEvent e,
                                     Cursor c)

broadcastToolEvent

protected void broadcastToolEvent(ChartDrawEvent ce)

broadcastEvent

public void broadcastEvent(TeeEvent event)
Specified by:
broadcastEvent in interface IBaseChart

broadcastEvent

public TeeEvent broadcastEvent(Series s,
                               SeriesEventStyle e)
Internal use.

Specified by:
broadcastEvent in interface IBaseChart
Parameters:
s -
e -
Returns:

getSeriesIndexOf

public int getSeriesIndexOf(Series value)
Returns the Index of the Series passed as argument.

Specified by:
getSeriesIndexOf in interface IBaseChart
Parameters:
value -
Returns:

getSeries

public SeriesCollection getSeries()
Collection of Series contained in this Chart.

Specified by:
getSeries in interface IBaseChart
Returns:
SeriesCollection

getSeries

public Series getSeries(int seriesIndex)
Returns the index value of Series

Specified by:
getSeries in interface IBaseChart
Parameters:
seriesIndex -
Returns:

setSeries

public void setSeries(SeriesCollection value)
Sets the index value of Series

Parameters:
value -

mousePressed

public void mousePressed(FrameworkMouseEvent e)
Internal use.

Parameters:
e -

panAxis

public boolean panAxis(boolean axisHorizontal,
                       int pos1,
                       int pos2,
                       boolean panned)

mouseMoved

public Cursor mouseMoved(FrameworkMouseEvent e)
Internal use.

Parameters:
e -
Returns:

doMouseMove

public Cursor doMouseMove(int x,
                          int y,
                          Cursor c)

doZoom

public void doZoom(double topx,
                   double topy,
                   double bottomx,
                   double bottomy,
                   double leftx,
                   double lefty,
                   double rightx,
                   double righty)
Internal use.
Activates call to Zoom. Use getZoom().zoomRect or zoomPercent

Specified by:
doZoom in interface IBaseChart
Parameters:
topx -
topy -
bottomx -
bottomy -
leftx -
lefty -
rightx -
righty -

doZoom

public void doZoom(Point.Double top,
                   Point.Double bot,
                   Point.Double lef,
                   Point.Double rig)
Specified by:
doZoom in interface IBaseChart

mouseReleased

public void mouseReleased(FrameworkMouseEvent e)
Internal use.

Parameters:
e -

undoZoom

public void undoZoom()
Obsolete. Please use tChart1.Zoom.Undo method.


setBrushCanvas

public void setBrushCanvas(Color aColor,
                           ChartBrush aBrush,
                           Color aBackColor)
Internal use.

Specified by:
setBrushCanvas in interface IBaseChart
Parameters:
aColor -
aBrush -
aBackColor -

canClip

public boolean canClip()
Returns the number of active (visible) series.
CanClip returns if the Chart Drawing Canvas has the capability of "clipping" lines and polygons.
"Clipping" means the feature that allows hiding drawing outside the rectangle or polygon specifed by the developer.
CanClip returns false when the Chart is displayed in OpenGL 3D, or when the Chart is printed and the TeeClipWhenPrinting constant is true, or when the Chart is converted to a metafile image and the TeeClipWhenMetafiling constant is true.
By default all display drivers and printers support clipping. You can turn off the clipping constants in case the printer or display driver has a bug related to clipping.
See also:
ClipPoints, TeeClipWhenPrinting, TeeClipWhenMetafiling, ClipCanvas, UnClipCanvas, ClipRoundRectangle and ClipPolygon.

Specified by:
canClip in interface IBaseChart
Returns:
boolean

recalcWidthHeight

public Rectangle recalcWidthHeight(Rectangle r)
Internal use.

Specified by:
recalcWidthHeight in interface IBaseChart
Parameters:
r -
Returns:

getAxisSeries

public Series getAxisSeries(Axis axis)
Returns the first Series that depends on the specified Axis.
If no Series depends on Axis, the null value is returned.

Parameters:
axis - Axis
Returns:
Series

internalMinMax

public double internalMinMax(Axis aAxis,
                             boolean isMin,
                             boolean isX)
Internal use.

Specified by:
internalMinMax in interface IBaseChart
Parameters:
aAxis -
isMin -
isX -
Returns:

maxTextWidth

public int maxTextWidth()
Returns the Maximum width in pixels of all Series Labels, whether active or not.
This applies only to Series which have Labels.

Specified by:
maxTextWidth in interface IBaseChart
Returns:
int

maxMarkWidth

public int maxMarkWidth()
Returns the Maximum width of the Active Series Marks.
Series Marks must be Visible. This can be used to adjust the Chart Margins in order to accomodate the biggest Series Mark.

Specified by:
maxMarkWidth in interface IBaseChart
Returns:
int

multiLineTextWidth

public MultiLine multiLineTextWidth(java.lang.String s)
Returns maximum linewidth of multiple line text.

Specified by:
multiLineTextWidth in interface IBaseChart
Parameters:
s -
Returns:

getMaxXValue

public double getMaxXValue(Axis axis)
Returns the Maximum Value of the Series X Values List.

Specified by:
getMaxXValue in interface IBaseChart
Parameters:
axis - Axis
Returns:
double

getMaxYValue

public double getMaxYValue(Axis axis)
Returns the highest of all the current Series Y point values.

Specified by:
getMaxYValue in interface IBaseChart
Parameters:
axis - Axis
Returns:
double

getMinXValue

public double getMinXValue(Axis axis)
Returns the Minimum Value of the Series X Values List.

Specified by:
getMinXValue in interface IBaseChart
Parameters:
axis - Axis
Returns:
double

getMinYValue

public double getMinYValue(Axis axis)
Returns the Minimum Value of the Series Y Values List.

Specified by:
getMinYValue in interface IBaseChart
Parameters:
axis - Axis
Returns:
double

isFreeSeriesColor

public boolean isFreeSeriesColor(Color color,
                                 boolean checkBackground)
Returns whether the AColor parameter is used by any Series or not.

Parameters:
color - Color
checkBackground - boolean When true, uses current Chart background
Returns:
boolean

freeSeriesColor

public Color freeSeriesColor(boolean checkBackground)
Returns a color from the default color palette not used by any Series.
The CheckBackGround parameter controls if the returned color should or shouldn't be the Chart BackColor color. This function returns a Color which is not used by any Series in the Chart.

Specified by:
freeSeriesColor in interface IBaseChart
Parameters:
checkBackground - boolean
Returns:
Color

paint

public void paint(IGraphics3D g,
                  Rectangle rect)
Paints the Chart in your preferred Canvas and region.

Specified by:
paint in interface IBaseChart
Parameters:
g - IGraphics3D
rect - Rectangle

paint

public void paint()

paint

public void paint(IGraphics3D g)
Paints the Chart on the Drawing Canvas g.

Specified by:
paint in interface IBaseChart
Parameters:
g - IGraphics3D

paint

public void paint(IGraphics3D g,
                  int width,
                  int height)
Invoke a Chart repaint.

Parameters:
g -
width -
height -

getItem

public Series getItem(int index)
Default indexer.

Example:

 tChart1[0].Color=Color.Blue;
  is equivalent to
 tChart1.Series[0].Color=Color.Blue;
 

Parameters:
index - int
Returns:
Series

setItem

public void setItem(int index,
                    Series value)
Default indexer.

Parameters:
index - int
value - Series

isAxisVisible

public boolean isAxisVisible(Axis a)
Specified by:
isAxisVisible in interface IBaseChart

getFirstActiveSeries

public Series getFirstActiveSeries()
Returns first active (visible) series.

Specified by:
getFirstActiveSeries in interface IBaseChart
Returns:
Series

formattedValueLegend

public java.lang.String formattedValueLegend(Series aSeries,
                                             int valueIndex)
Returns the String to display at Legend for a given series and point index.
In other words it returns the string representation of a Series Point value just as it would appear in Chart.Legend. The ValueIndex parameter is the point index. Legend.TextStyle and all other TChartLegend methods are used to create the resulting string.

Specified by:
formattedValueLegend in interface IBaseChart
Parameters:
aSeries - Series
valueIndex - int
Returns:
String

applyGapSize

protected void applyGapSize(Axis axis,
                            Point p)

doDrawLegend

public Rectangle doDrawLegend(IGraphics3D g,
                              Rectangle tmp)
Internal use.

Specified by:
doDrawLegend in interface IBaseChart
Parameters:
g -
tmp -
Returns:

drawRightWallAfter

public boolean drawRightWallAfter()
Internal use.
Tests if RightWall can be last plotted

Specified by:
drawRightWallAfter in interface IBaseChart
Returns:

drawBackWallAfter

public boolean drawBackWallAfter(int z)
Specified by:
drawBackWallAfter in interface IBaseChart

drawLeftWallFirst

public boolean drawLeftWallFirst()
Internal use. Tests if LeftWall can be last plotted.

Specified by:
drawLeftWallFirst in interface IBaseChart
Returns:

countActiveSeries

public int countActiveSeries()
Returns the number of active (visible) series.
In other words it is a count of Series in Chart that have their Active property set to true.

Specified by:
countActiveSeries in interface IBaseChart
Returns:
int Number of Active (visible) Series.

isAxisCustom

public boolean isAxisCustom(Axis axis)
Returns True if Axis is a Custom Axis.

Specified by:
isAxisCustom in interface IBaseChart
Parameters:
axis -
Returns:

seriesLegend

public Series seriesLegend(int itemIndex,
                           boolean onlyActive)
Returns the series that corresponds to the Legend "ItemIndex" position, when the Legend style is "Series".
The "OnlyActive" parameter, when false, takes into account all series, visibly active or not.

Specified by:
seriesLegend in interface IBaseChart
Parameters:
itemIndex - int
onlyActive - boolean
Returns:
Series

formattedLegend

public java.lang.String formattedLegend(int seriesOrValueIndex)
Returns the text string corresponding to a Legend position.
The Legend position depends on Legend.LegendStyle.
If LegendStyle is lsSeries, then the text string will be the SeriesOrValueIndexth Active Series Title.
If LegendStyle is lsValues, then the text string will be the formatted SeriesOrValueIndexth value of the first Active Series in the Chart.
If LegendStyle is lsAuto and only one Active Series exists in the Chart, then the LegendStyle is considered to be lsValues.
If there's more than one Active Series then LegendStyle will be lsSeries.

Specified by:
formattedLegend in interface IBaseChart
Parameters:
seriesOrValueIndex - int
Returns:
String

getMaxValuesCount

public int getMaxValuesCount()
Returns maximum Point Count between all Active Series.

Specified by:
getMaxValuesCount in interface IBaseChart
Returns:

getPanel

public Panel getPanel()
Accesses all visible Background attributes..

Specified by:
getPanel in interface IBaseChart
Returns:
Panel

setPanel

public void setPanel(Panel value)
Sets all visible Background attributes..

Parameters:
value -

setParent

public void setParent(IChart value)
Internal use. Sets instance that implements the IChart interface.

Parameters:
value - IChart

getPrinter

public Printer getPrinter()
Printing related attributes.

Returns:
Printer

setPrinter

public void setPrinter(Printer value)
Printing related attributes.

Parameters:
value -

getPage

public Page getPage()
Accesses multiple page characteristics of the Chart.

Specified by:
getPage in interface IBaseChart
Returns:
Page

setPage

public void setPage(Page value)
Accesses multiple page characteristics of the Chart.

Parameters:
value -

getLegend

public Legend getLegend()
Determines the Legend characteristics.
Legend determines the text and drawing attributes of Chart's textual representation of Series and Series values.
The Legend class draws a rectangle and for each Series in a Chart (or for each point in a Series) outputs a text representation of that Series (or that point). You can use the Legend.LegendStyle and Legend.TextStyle to control the text used to draw the legend.
The Legend can be positioned at Left, Right, Top and Bottom chart sides using Legend.Alignment.
Use Legend.Visible to show / hide the Legend.
Inverted makes Legend draw text starting from bottom.
Frame, Font and Color allow you to change the Legend appearance.
Legend.ColorWidth determines the percent width of each item's "colored" mark.
Legend.FirstValue controls which Series (or Series point) will be used to draw first Legend item.

Specified by:
getLegend in interface IBaseChart
Returns:
Legend

setLegend

public void setLegend(Legend value)
Determines the Legend characteristics.
Legend determines the text and drawing attributes of Chart's textual representation of Series and Series values.
The Legend class draws a rectangle and for each Series in a Chart (or for each point in a Series) outputs a text representation of that Series (or that point). You can use the Legend.LegendStyle and Legend.TextStyle to control the text used to draw the legend.
The Legend can be positioned at Left, Right, Top and Bottom chart sides using Legend.Alignment.
Use Legend.Visible to show / hide the Legend.
Inverted makes Legend draw text starting from bottom.
Frame, Font and Color allow you to change the Legend appearance.
Legend.ColorWidth determines the percent width of each item's "colored" mark.
Legend.FirstValue controls which Series (or Series point) will be used to draw first Legend item.

Specified by:
setLegend in interface IBaseChart
Parameters:
value -

getHeader

public Header getHeader()
Defines the Text and formatting attributes to be drawn at the top of the Chart.
Use Text to enter the desired Header lines, set Visible to true and change Font, Frame and Brush. Use Alignment to control text output position.

Specified by:
getHeader in interface IBaseChart
Returns:
Header

setHeader

public void setHeader(Header value)
Defines the Text and formatting attributes to be drawn at the top of the Chart.
Use Text to enter the desired Header lines, set Visible to true and change Font, Frame and Brush. Use Alignment to control text output position.

Parameters:
value -

getTitle

public Header getTitle()
Obsolete. Please use Header instead.

Returns:
Header

getSubTitle

public Header getSubTitle()
Obsolete. Please use SubHeader instead.

Returns:
Header

getSubHeader

public Header getSubHeader()
Defines the Text and formatting attributes to be drawn at the top of the Chart, just below the Header text.
Use Text to enter the desired SubHeader lines, set Visible to true and change Font, Frame and Brush.
Use Alignment to control text output position.

Returns:
Header

setSubHeader

public void setSubHeader(Header value)
Defines the Text and formatting attributes to be drawn at the top of the Chart, just below the Header text.
Use Text to enter the desired SubHeader lines, set Visible to true and change Font, Frame and Brush.
Use Alignment to control text output position.

Parameters:
value -

getFooter

public Footer getFooter()
Defines the Text and formatting attributes to be drawn at the bottom of the Chart.
Use Text to enter the desired Footer lines, set Visible to true and change Font, Frame and Brush.
Use Alignment to control text output position.

Specified by:
getFooter in interface IBaseChart
Returns:
Footer

setFooter

public void setFooter(Footer value)
Defines the Text and formatting attributes to be drawn at the bottom of the Chart.
Use Text to enter the desired Footer lines, set Visible to true and change Font, Frame and Brush.
Use Alignment to control text output position.

Parameters:
value -

getSubFooter

public Footer getSubFooter()
Defines the Text and formatting attributes to be drawn at the bottom of the Chart, just above the Footer text.
Use Text to enter the desired SubFooter lines, set Visible to true and change Font, Frame and Brush.
Use Alignment to control text output position.

Returns:
Footer

setSubFooter

public void setSubFooter(Footer value)
Defines the Text and formatting properties to be drawn at the bottom of the Chart, just above the Footer text.
Use the Text property to enter the desired SubFooter lines, set Visible to true and change the Font, Frame and Brush properties.
Use the Alignment property to control text output position.

Parameters:
value -

getAspect

public Aspect getAspect()
3D view parameters.

Specified by:
getAspect in interface IBaseChart
Returns:
Aspect

setAspect

public void setAspect(Aspect value)
3D view parameters.

Parameters:
value -

getGraphics3D

public IGraphics3D getGraphics3D()
Accesses TeeChart Draw attributes.

Specified by:
getGraphics3D in interface IBaseChart
Returns:
IGraphics3D

setGraphics3D

public void setGraphics3D(IGraphics3D value)
Accesses TeeChart Draw attributes.

Specified by:
setGraphics3D in interface IBaseChart
Parameters:
value -

getTool

public Tool getTool(int index)
Gets the index'th tool in getTools() collection

Parameters:
index - int
Returns:
Tool

getTools

public ToolsCollection getTools()
Collection of Tool components contained in this Chart.

Specified by:
getTools in interface IBaseChart
Returns:
ToolsCollection

setTools

public void setTools(ToolsCollection value)
Collection of Tool components contained in this Chart.

Parameters:
value -

getWalls

public Walls getWalls()
Accesses left, bottom and back wall characteristics of the Chart.

Specified by:
getWalls in interface IBaseChart
Returns:
Walls

setWalls

public void setWalls(Walls value)
Accesses left, bottom and back wall characteristics of the Chart.

Parameters:
value -

getAxes

public Axes getAxes()
Accesses the five axes, Top, Left, Right, Bottom and z depthas well as custom axis objects.

Specified by:
getAxes in interface IBaseChart
Returns:
Axes

setAxes

public void setAxes(Axes value)
Accesses the five axes, Top, Left, Right, Bottom and z depthas well as custom axis objects.

Parameters:
value -

getExport

public Exports getExport()
Accesses Chart export attributes.

Returns:
Exports

setExport

public void setExport(Exports value)
Accesses Chart export attributes.

Parameters:
value -

getImport

public Imports getImport()
Accesses Chart import attributes.

Returns:
Imports

setImport

public void setImport(Imports value)
Accesses Chart import attributes.

Parameters:
value -

getSeriesHeight3D

public int getSeriesHeight3D()
Internal use.

Specified by:
getSeriesHeight3D in interface IBaseChart
Returns:

getSeriesWidth3D

public int getSeriesWidth3D()
Internal use.

Specified by:
getSeriesWidth3D in interface IBaseChart
Returns:

getLegendPen

public ChartPen getLegendPen()
Defines the Pen chararcteristics of the Legend.

Specified by:
getLegendPen in interface IBaseChart
Returns:

setLegendPen

public void setLegendPen(ChartPen value)
Defines the Pen chararcteristics of the Legend.

Specified by:
setLegendPen in interface IBaseChart
Parameters:
value -

moveSeriesTo

public void moveSeriesTo(Series value,
                         int newIndex)
Moves Series' index in Chart SeriesList.

Specified by:
moveSeriesTo in interface IBaseChart
Parameters:
value -
newIndex -

removeSeries

public void removeSeries(Series value)
Removes a Series from the Chart series list, without disposing it.

Specified by:
removeSeries in interface IBaseChart
Parameters:
value - Series

addSeries

public int addSeries(Series value)
Adds a new Series into the Chart.

Specified by:
addSeries in interface IBaseChart
Parameters:
value -
Returns:

getBottom

public int getBottom()
Returns the location in pixels of the bottom of the Chart Rectangle.

Specified by:
getBottom in interface IBaseChart
Returns:

getMaxZOrder

public int getMaxZOrder()
Returns the highest of all Series ZOrder values.

Specified by:
getMaxZOrder in interface IBaseChart
Returns:

setMaxZOrder

public void setMaxZOrder(int value)
Sets the highest of Series ZOrder value.

Specified by:
setMaxZOrder in interface IBaseChart
Parameters:
value -

getAutoRepaint

public boolean getAutoRepaint()
Returns if the Chart should automatically repaint itself when a property has been changed.

Specified by:
getAutoRepaint in interface IBaseChart
Returns:
boolean

setAutoRepaint

public void setAutoRepaint(boolean value)
Sets if this Chart should automatically repaint after a property change.

Specified by:
setAutoRepaint in interface IBaseChart
Parameters:
value - boolean

getCustomChartRect

public boolean getCustomChartRect()
Specified by:
getCustomChartRect in interface IBaseChart

setCustomChartRect

public void setCustomChartRect(boolean value)
Specified by:
setCustomChartRect in interface IBaseChart

getChartRect

public Rectangle getChartRect()
Returns the rectangle that contains the four main Chart axes.

Specified by:
getChartRect in interface IBaseChart
Returns:
Rectangle

setChartRect

public void setChartRect(Rectangle value)
Sets the rectangle to contain the four main Chart axes.

Specified by:
setChartRect in interface IBaseChart
Parameters:
value - Rectangle

getSeriesCount

public int getSeriesCount()
Returns the number of Series associated to this Chart.

Specified by:
getSeriesCount in interface IBaseChart
Returns:
int

series

public java.util.Enumeration series()

tools

public java.util.Enumeration tools()
Returns collection of Tool components contained in this Chart.

Returns:

doBaseInvalidate

public void doBaseInvalidate()
Specified by:
doBaseInvalidate in interface IBaseChart

getParent

public IChart getParent()
Returns the IChart parent of the Chart.

Specified by:
getParent in interface IBaseChart
Returns:

isDesignTime

public boolean isDesignTime()
Specified by:
isDesignTime in interface IBaseChart

getScreenHeight

public int getScreenHeight()
Specified by:
getScreenHeight in interface IBaseChart

getScreenWidth

public int getScreenWidth()
Specified by:
getScreenWidth in interface IBaseChart