Package quadbase.util
Interface IDataPointSet
public interface IDataPointSet
Properties for chart data points can be directly changed by calling methods on this interface.
A handle to an object that implements this interface can be obtained by calling the
gethDataPoints method defined in QbChart.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether or not the chart currently displays connecting lines for the data points.boolean[]areHidden(int colIndex) This function is used to get the hidden status of column values in the legend.booleanThis method returns whether the points are drawn uniformly.booleanReturns the display status of the data points.floatGets the ratio of the bar width and the distance between bars.intreturns number of Bottom N value in a chart This feature only works with chart with category only and ascending order has to be applied to the chartThis method gets the downTick candlestick color.This method gets the upTick candlestick color.floatThis method gets the "wicker"--the hi invalid input: '&' low extensions of candlesticks.Color[]Returns the color scheme for the data points plotted in the chart.Returns border color of the data points for some chart types.intReturns border thickness of the data points for some chart types.int[]This function returns the line thickness for 2D chartsintgetGridStep(int colIndex) Deprecated.Please use getTickerStep(int colIndex) The step size of ticker should equal step size of grid, except after label filtering for date-time chartgethHint()Used to get a handle to the IHint interface.Returns a handle to the properties of the labels at the top of data points.Returns a handle to the properties of the labels at the top of data points of secondary axis.getLabelFormat(int colIndex) This function is used to get the label format for the given column index.intgetLabelStep(int colIndex) This function returns the step size for the label display.intgetLabelUnit(int colIndex) This function is used to obtain the unit information of the label Label unit is associated with the individual column not the axis.int[]Returns the line styles used to draw the different connect lines.intDeprecated.Please use getDataLineThickness() and use @link ISecondaryChart#getDataLineThickness for secondary chartintGets the X axis shift value in pixels.floatGets the ratio of the max bar width to the plot area.intReturns the number of display characters for text.intgetMaxLabelAndTickerCount(int colIndex) This function returns the max number of the label and ticker display.This method return the value of the max Y cut-off point for scatter chartReturns the display name for null data column in chart.String[]getOrder(int seriesType) This function returns the data points in the series, category, or sum-by column.Returns all original text list for text replacementint[]Returns the array of data point shapes displayed in the chart.int[]Sets the point sizes for all the data points displayed in the chart.int[]getReplacedText(String originalText) Returns a replaced text for a given original textReturns all replaced text list for text replacementintgetSortOrder(int seriesType) return the sort order of the series, category, or sumby column to ascending or descending.intReturns alignment position for the stack section labels alignment position: QbChart.TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, QbChart.TOP_ALIGNMENT_INSIDE, QbChart.BOTTOM_ALIGNMENT_INSIDEintgetTickerStep(int colIndex) This function is used to retrieve the ticker step size for the given column index.intReturns alignment position for the top labels alignment position: QbChart.TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, QbChart.TOP_ALIGNMENT_INSIDE, QbChart.BOTTOM_ALIGNMENT_INSIDEReturns top label color for negative sideintreturns number of Top N value in a chart This feature only works with chart with category only and ascending order has to be applied to the chartfloatThis method returns translucent value of the chart (between 0 to 1.0, Transparent to solid) The default value is 0.5f For QbChart.OVERLAY, QbChart.RADAR ,2D QbChart.AREA and Stack Area-Col Combo onlyintReturns sorting order of the value column in Original, Ascending or Descending order.booleanReturns the display status of the data area for radar chart.booleanReturns whether or not a black border is drawn around the white data area for some chart types.booleanReturns whether or not a border is drawn around the data points for some chart types.booleanReturns a boolean value that specifies if connecting lines are drawn in the original dataset order.booleanReturns whether the Java2D Rotated Text method is using for 0, 90, 180...booleanReturns whether or not the display of dotted lines for missing or null data points is enabled.booleanReturns whether or not to show null data column in chart.booleanReturns whether a chart is drawn from end to end (no gap).booleanReturns whether the Java2D Rotate Text method is usedbooleanReturns whether every label is forced to display on the negative side of the axis.booleanReturns whether every label is forced to display on the positive side of the axis.booleanThis function return the state of data limit If FALSE, no data limit If TRUE, no data can go over axis max scale or go below axis min scalebooleanReturns whether or not to treat null data as zero values.booleanReturns true if the color of the data point border is black.booleanReturns the display status of the data point border.booleanReturns whether colors of chart data points are assigned to category names.booleanReturns whether or not to show null data in scatter.booleanReturns whether a 2D scatter is showing series in top label.booleanReturns whether or not the chart currently displays shadow on lines.booleanReturns whether or not the chart currently displays shadow on datapoints.booleanReturns whether a single color is used for all categories.booleanReturns whether the individual section labels in a StackBar, StackColumn, or StackArea Chart is visible.booleanReturns the whether the total label in a StackBar, StackColumn, or StackArea Chart is visible.booleanThis method returns whether the chart is translucent For QbChart.OVERLAY, QbChart.RADAR ,2D QbChart.AREA and Stack Area-Col Combo onlybooleanReturns whether a different color can be assigned to each column in column chart.booleanReturns a boolean value that specifies if X-Axis is drawn at the top.booleanReturns whether or not to treat zero values as null data.voidReplacing all occurrences of originalText in the chart with replacedTextvoidreverseOrder(int seriesType) This function reverses the order of the data points in the series, category, or sum-by column.voidsetAreaVisible(boolean b) Enables/Disables the display of data area in the radar chart.voidsetBarGapToWidthRatio(float x) Sets the bar gap to width ratio for bar/column charts.voidsetBlackBorderVisibleForWhiteArea(boolean b) Enables/Disables drawing of a black border around the white data area for some chart types.voidsetBorderVisible(boolean b) Enables/Disables drawing of a border around the data for some chart types.voidsetBottomNValue(boolean enable, int bottomVal) set to display up to number of Bottom N data points in a chart This feature only works with chart with category only and descending order has to be applied to the chartvoidsetCandleStickColors(Color upTickColor, Color downTickColor) This method sets the upTick and downTick candlestick colors.voidsetCandleStickWidth(float wickerWidth) This method sets the "wicker"--the hi invalid input: '&' low extensions of candlesticks.voidSets a color scheme for the data points plotted.voidSets a color scheme for the data points plotted.voidsetColorSeparators(Color[] color, Object[] value, int order) This method is used for defining the color of the chart based on separator value.voidsetConnectLinesInOriginalOrder(boolean origOrder) Specifies whether the connecting line between datapoints is drawn in the same order in the dataset.voidsetConnectLinesVisible(boolean b) Enables/Disables the drawing of lines connecting adjacent data points in a chart.voidSets border color of the data for some chart types.voidsetDataBorderThickness(int i) Sets border thickness of the data for some chart types.voidsetDataLabelInfo(IDataLabelInfo dataLabelInfo) Set the display text for primary data top labelvoidsetDataLineForNull(boolean b, boolean drawDottedLine) This function enables/disables drawing data lines for missing or null data points.voidsetDataLineThickness(int[] lineThickness) Sets the line thickness for all the data lines displayed in the chart.voidsetDisableJava2DForStraightText(boolean state) If the new state is true, the straight text (0, 90, 180...voidsetDottedLineForNull(boolean b) This function enables/disables drawing dotted lines for missing or null data points.voidsetDrawNullColumn(boolean b) Returns whether or not to show null data column in chart.voidsetEndToEnd(boolean state) Enables/Disables drawing of a chart from end to end, skip all the gaps.voidsetGridStep(int colIndex, int size) Deprecated.Please use getTickerStep(int colIndex, int size) The step size of ticker should equal step size of grid, except after label filtering for date-time chartvoidsetHidden(int colIndex, boolean[] b) This function sets the hidden status for the column values in the legend.voidsetJava2DRotateTextEnabled(boolean state) If the new state is true, rotated text would be rendered through Java2D.voidsetLabelFormat(int colIndex, IFormat format) This function sets the label format for the given column index.voidsetLabelOnNegativeSide(boolean state) If the new state is true, this method forces every label to display on the negative side of the axis, no matter the data value is positive or not.voidsetLabelOnPositiveSide(boolean state) If the new state is true, this method forces every label to display on the positive side of the axis, no matter the data value is positive or not.voidsetLabelStep(int colIndex, int size) This function sets the label step size for the given column.voidsetLabelStep(int colIndex, int size, int unit, boolean isAscending, Date startingDate) This function sets the label step size for the given column.voidsetLimitAtAxisScale(boolean state) This function sets the data limit at axis scale If sets, no data can go over axis max scale or go below axis min scale The default value is FALSEvoidsetLineStyles(int[] style) Sets the line styles for the connect data lines drawn in the chart.voidsetLineThickness(int thickness) Deprecated.Please use setDataLineThickness(int[] thickness) use @link ISecondaryChart#setDataLineThickness for secondary chartvoidsetLineXOffset(int offset) Shift the points drawn along the X axis away from the origin.voidsetMaxBarWidthRatioToPlotArea(float x) Sets the max bar width to plot area ratio for bar/column charts.voidsetMaxDisplayCharactersForText(int maxCh) Sets the number of display characters for text.voidsetMaxLabelAndTickerCount(int colIndex, int ct) This function sets the max number of display label and ticker for the given axis.voidThis method set the max Y cut-off point for scatter chartvoidsetNullColumnName(String str) Set the display name for null data column in chart.voidsetNullDataAsZero(boolean b) This function enables/disables treating null data as zero values.voidSets the order of the data points for the series, category, or sumby column.voidsetPointBorderColorBlack(boolean b) Set the color of data point border to black, otherwises, darker color of the symbol color.voidsetPointBorderVisible(boolean b) Enables/Disables the display of data point border in the chart.voidsetPointShapes(int[] shapes) Sets the point shapes for drawing the data points in the chart.voidsetPointSizes(int[] size) Sets the point size for all the data points displayed in the chart.voidsetPointsShapes(int[] shapes) voidsetPointsUniformForLine(boolean b) If new state is true, the points are drawn uniformly.voidsetPointsVisible(boolean b) Enables/Disables the display of data points in the chart.voidsetPositionFromOrigin(float chartMidPoint) Sets the chart position to be fixed from the origin of the canvasvoidsetSaveColorsForCategories(boolean b) Sets whether colors of chart data points will be assigned to category names.voidsetSecondaryDataLabelInfo(IDataLabelInfo dataLabelInfo) Set the display text for secondary data top labelvoidsetShowNullInScatter(boolean b) This function enables/disables showing null data in scatter chart.voidsetShowShadowOnLine(boolean b) Enables/Disables the drawing shadow on lines in a chart.voidsetShowShadowOnPoint(boolean b) Enables/Disables the drawing shadow on datapoints in a chart.voidsetSingleColorForCategories(boolean b) Sets whether a single color can be assigned to all categories.voidsetSortByOriginalOrder(int seriesType) Sets the sort order of the series, category, or sumby column to original data source order.voidsetSortOrder(int seriesType, int type) Sets the sort order of the series, category, or sumby column to original order, customize order, ascending order or descending order.voidsetSortSeriesByValue(boolean state) Sorts the series in the order of series sum such that the lowest sum would appear in front.voidsetStackLabelAlignment(int align) Sets alignment position for the stack section labels alignment position: QbChart.TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, QbChart.TOP_ALIGNMENT_INSIDE, QbChart.BOTTOM_ALIGNMENT_INSIDEvoidsetStackSectionLabelVisible(boolean state) Specifies whether the individual section labels in a StackBar, StackColumn or StackArea Chart is visible.voidsetStackSectionTotalLabelVisible(boolean state) Specifies whether the total label in a StackBar, StackColumn or StackArea Chart is visible.voidsetTickerStep(int colIndex, int size) This function is used to set the ticker step size for a particular column.voidsetTopLabelAlignment(int align) Sets alignment position for the top labels alignment position: QbChart.TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, QbChart.TOP_ALIGNMENT_INSIDE, QbChart.BOTTOM_ALIGNMENT_INSIDEvoidSets top label color for negative sidevoidsetTopNValue(boolean enable, int topVal) set to display up to number of Top N data points in a chart This feature only works with chart with category only and ascending order has to be applied to the chartvoidsetTranslucent(boolean b) If new state is true, the overlay parts of the chart are drawn in a partially transparent method.voidsetTranslucentValue(float val) This method sets the translucent value of the chart The default value is 0.5.voidsetUniqueBarColorForBarChart(boolean b) Sets whether a different color can be assigned to each bar in bar chart.voidsetUniqueColumnColorForColumnChart(boolean b) Sets whether a different color can be assigned to each column in column chart.voidsetValueSortOrder(int type) Sorts the value column in Original, Ascending or Descending order.voidsetXAxisDrawnAtTop(boolean shift) Specifies whether the X-Axis is drawn at the top of the chart.voidsetZeroAsNullData(boolean b) This function enables/disables treating zero values as null data.voidshowSeriesInTopLabel(boolean state) If the new state is true, this method would display series in top label.
-
Field Details
-
YEAR
static final int YEARConstants for the Ticker/Date/Time units- See Also:
-
MONTH
static final int MONTH- See Also:
-
WEEK
static final int WEEK- See Also:
-
DAY
static final int DAY- See Also:
-
HOUR
static final int HOUR- See Also:
-
MINUTE
static final int MINUTE- See Also:
-
SECOND
static final int SECOND- See Also:
-
TICKER
static final int TICKER- See Also:
-
-
Method Details
-
getOrder
This function returns the data points in the series, category, or sum-by column. The data points are returned in the same order that they appear in the chart.Associated QbChart properties: <b> SERIES_ORDER CATEGORY_ORDER SUMBY_ORDER </b>
- Parameters:
seriesType- The series type needed. Options are:QbChart.CATEGORY QbChart.SERIES QbChart.SUMBY
- Returns:
- An array of strings containing the data points for that column.
-
setOrder
Sets the order of the data points for the series, category, or sumby column.- Parameters:
seriesType- The series needed.data- The data points as a string array.- See Also:
-
reverseOrder
void reverseOrder(int seriesType) This function reverses the order of the data points in the series, category, or sum-by column.- Parameters:
seriesType- The series type needed. Options are:QbChart.CATEGORY QbChart.SERIES QbChart.SUMBY
-
setSortOrder
void setSortOrder(int seriesType, int type) Sets the sort order of the series, category, or sumby column to original order, customize order, ascending order or descending order.- Parameters:
seriesType- QbChart.CATEGORY, QbChart.SERIES, or QbChart.SUMBYtype- QbChart.ASCENDING, QbChart.DESCENDING, QbChart.ORIGINAL_DATA_ORDER or QbChart.CUSTOMIZE_DATA_ORDER
-
getSortOrder
int getSortOrder(int seriesType) return the sort order of the series, category, or sumby column to ascending or descending.- Parameters:
seriesType- QbChart.CATEGORY, QbChart.SERIES, or QbChart.SUMBY- Returns:
- the sort order type QbChart.ASCENDING, QbChart.DESCENDING, QbChart.ORIGINAL_DATA_ORDER or QbChart.CUSTOMIZE_DATA_ORDER
-
setSortByOriginalOrder
void setSortByOriginalOrder(int seriesType) Sets the sort order of the series, category, or sumby column to original data source order.- Parameters:
seriesType- QbChart.CATEGORY, QbChart.SERIES, or QbChart.SUMBY
-
setValueSortOrder
void setValueSortOrder(int type) Sorts the value column in Original, Ascending or Descending order.Associated QbChart property: VALUE_ORDER
- Parameters:
type- QbChart.ORIGINAL_DATA_ORDER, QbChart.ASCENDING or QbChart.DESCENDING
-
getValueSortOrder
int getValueSortOrder()Returns sorting order of the value column in Original, Ascending or Descending order.Associated QbChart property: VALUE_ORDER
- Returns:
- sort order type QbChart.ORIGINAL_DATA_ORDER, QbChart.ASCENDING or QbChart.DESCENDING
-
setSortSeriesByValue
void setSortSeriesByValue(boolean state) Sorts the series in the order of series sum such that the lowest sum would appear in front. For 3-D Column and Area charts only. -
setTopNValue
set to display up to number of Top N data points in a chart This feature only works with chart with category only and ascending order has to be applied to the chart- Parameters:
enable- the state of Top N value featuretopVal- number of display number- Throws:
Exception
-
setBottomNValue
set to display up to number of Bottom N data points in a chart This feature only works with chart with category only and descending order has to be applied to the chart- Parameters:
enable- the state of Bottom N value featurebottomVal- number of display number- Throws:
Exception
-
getTopNValue
int getTopNValue()returns number of Top N value in a chart This feature only works with chart with category only and ascending order has to be applied to the chart- Returns:
- the value of Top N, return -1 if this feature is disabled
-
getBottomNValue
int getBottomNValue()returns number of Bottom N value in a chart This feature only works with chart with category only and ascending order has to be applied to the chart- Returns:
- the value of Bottom N, return -1 if this feature is disabled
-
isUniqueColumnColorForColumnChart
boolean isUniqueColumnColorForColumnChart()Returns whether a different color can be assigned to each column in column chart. -
setUniqueColumnColorForColumnChart
void setUniqueColumnColorForColumnChart(boolean b) Sets whether a different color can be assigned to each column in column chart. -
setUniqueBarColorForBarChart
void setUniqueBarColorForBarChart(boolean b) Sets whether a different color can be assigned to each bar in bar chart. -
getColors
Color[] getColors()Returns the color scheme for the data points plotted in the chart. The Color Objects could also bequadbase.chart.QbPatterntype.- See Also:
-
isSingleColorForCategories
boolean isSingleColorForCategories()Returns whether a single color is used for all categories. Only for column/bar charts without series. -
setSingleColorForCategories
void setSingleColorForCategories(boolean b) Sets whether a single color can be assigned to all categories. Only for column/bar charts without series. -
isSaveColorsForCategories
boolean isSaveColorsForCategories()Returns whether colors of chart data points are assigned to category names. -
setSaveColorsForCategories
void setSaveColorsForCategories(boolean b) Sets whether colors of chart data points will be assigned to category names. -
setColors
Sets a color scheme for the data points plotted. The colors in the scheme could be of the typequadbase.chart.QbPatternAssociated QbChart property: DATACOLOR
- Parameters:
color- The array containing the color scheme for the points.The size of the array depends on the chart type: For a plain column chart with no series or category, it is N, where N is the number of points in the category column. For a stack column chart with no series, it is M, where M is the number of points in the sum-by column. For a stack column chart with series, it is M x P, where P is the number of points in the series column.
-
setColors
Sets a color scheme for the data points plotted.Associated QbChart property: DATACOLOR
- Parameters:
color- The array containing the color scheme for the points.The size of the array depends on the chart type: For a plain column chart with no series or category, it is N, where N is the number of points in the category column. For a stack column chart with no series, it is M, where M is the number of points in the sum-by column. For a stack column chart with series, it is M x P, where P is the number of points in the series column.
rootColor- The color scheme for the root point
-
setColorSeparators
This method is used for defining the color of the chart based on separator value. The array size of color should always equals to array size of value + 1.
For example, GREEN invalid input: '<' 5 invalid input: '<' ORANGE invalid input: '<' 20 invalid input: '<' RED, all the columns between 5 and 20 should be orange. And the columns invalid input: '<' 20 should be red.
In ascending order, the value object array should be {Integer.valueOf(5), Integer.valueOf(20)}
In descending order, the value object array should be {Integer.valueOf(20), Integer.valueOf(5)}
Separator value Object can be String, java.lang.Number, Boolean or java.util.Date- Parameters:
color- The array containing the color scheme for separator pointsvalue- The array of separator object which can be java.lang.Number, String Boolean or java.util.Dateorder- Set the sort order of the column : QbChart.ASCENDING or QbChart.DESCENDING
-
gethLabel
ILabel gethLabel()Returns a handle to the properties of the labels at the top of data points. Properties of top labels can be directly changed by calling methods on this interface.- Returns:
- a handle to the interface quadbase.util.ILabel of top labels.
- See Also:
-
getTopLabelAlignment
int getTopLabelAlignment()Returns alignment position for the top labels alignment position: QbChart.TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, QbChart.TOP_ALIGNMENT_INSIDE, QbChart.BOTTOM_ALIGNMENT_INSIDE -
setTopLabelAlignment
void setTopLabelAlignment(int align) Sets alignment position for the top labels alignment position: QbChart.TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, QbChart.TOP_ALIGNMENT_INSIDE, QbChart.BOTTOM_ALIGNMENT_INSIDE- Parameters:
align- alignment position
-
getTopLabelColorOnNegativeSide
Color getTopLabelColorOnNegativeSide()Returns top label color for negative side -
setTopLabelColorOnNegativeSide
Sets top label color for negative side -
getStackLabelAlignment
int getStackLabelAlignment()Returns alignment position for the stack section labels alignment position: QbChart.TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, QbChart.TOP_ALIGNMENT_INSIDE, QbChart.BOTTOM_ALIGNMENT_INSIDE -
setStackLabelAlignment
void setStackLabelAlignment(int align) Sets alignment position for the stack section labels alignment position: QbChart.TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, QbChart.TOP_ALIGNMENT_INSIDE, QbChart.BOTTOM_ALIGNMENT_INSIDE- Parameters:
align- alignment position
-
gethSecondaryLabel
ILabel gethSecondaryLabel()Returns a handle to the properties of the labels at the top of data points of secondary axis. Properties of top labels can be directly changed by calling methods on this interface.- Returns:
- a handle to the interface quadbase.util.ILabel of top labels.
- See Also:
-
setStackSectionLabelVisible
void setStackSectionLabelVisible(boolean state) Specifies whether the individual section labels in a StackBar, StackColumn or StackArea Chart is visible. The top labels would also need to be set. -
isStackSectionLabelVisible
boolean isStackSectionLabelVisible()Returns whether the individual section labels in a StackBar, StackColumn, or StackArea Chart is visible. -
setStackSectionTotalLabelVisible
void setStackSectionTotalLabelVisible(boolean state) Specifies whether the total label in a StackBar, StackColumn or StackArea Chart is visible. The top labels would also need to be set. -
isStackSectionTotalLabelVisible
boolean isStackSectionTotalLabelVisible()Returns the whether the total label in a StackBar, StackColumn, or StackArea Chart is visible. -
setDataLabelInfo
Set the display text for primary data top label- Parameters:
dataLabelInfo- The display label for primary axis data- See Also:
-
setSecondaryDataLabelInfo
Set the display text for secondary data top label- Parameters:
dataLabelInfo- The display label for secondary axis data- See Also:
-
isLabelOnPositiveSide
boolean isLabelOnPositiveSide()Returns whether every label is forced to display on the positive side of the axis. For QbChart.COL and QbChart.BAR charts only. The default value is false for 2D charts and true for 3D charts.- Returns:
- the state
-
setLabelOnPositiveSide
void setLabelOnPositiveSide(boolean state) If the new state is true, this method forces every label to display on the positive side of the axis, no matter the data value is positive or not. Vice versa. For QbChart.COL and QbChart.BAR charts only. The default value is false for 2D charts and true for 3D charts.- Parameters:
state- The new state
-
isLabelOnNegativeSide
boolean isLabelOnNegativeSide()Returns whether every label is forced to display on the negative side of the axis. For QbChart.COL and QbChart.BAR charts only. The default value is false.- Returns:
- the state
-
setLabelOnNegativeSide
void setLabelOnNegativeSide(boolean state) If the new state is true, this method forces every label to display on the negative side of the axis, no matter the data value is positive or not. Vice versa. For QbChart.COL and QbChart.BAR charts only. The default value is false.- Parameters:
state- The new state
-
isShowSeriesInTopLabel
boolean isShowSeriesInTopLabel()Returns whether a 2D scatter is showing series in top label. For 2D QbChart.SCATTER charts only. The default value is false.- Returns:
- the state
-
showSeriesInTopLabel
void showSeriesInTopLabel(boolean state) If the new state is true, this method would display series in top label. For 2D QbChart.SCATTER charts only. The default value is false.- Parameters:
state- The new state
-
isJava2DRotateTextEnabled
boolean isJava2DRotateTextEnabled()Returns whether the Java2D Rotate Text method is used- Returns:
- the state
-
setJava2DRotateTextEnabled
void setJava2DRotateTextEnabled(boolean state) If the new state is true, rotated text would be rendered through Java2D.- Parameters:
state- The new state
-
isDisableJava2DForStraightText
boolean isDisableJava2DForStraightText()Returns whether the Java2D Rotated Text method is using for 0, 90, 180... degree text- Returns:
- the state
-
setDisableJava2DForStraightText
void setDisableJava2DForStraightText(boolean state) If the new state is true, the straight text (0, 90, 180... degree) would not be rendered through Java2D.- Parameters:
state- The new state
-
getMaxDisplayCharactersForText
int getMaxDisplayCharactersForText()Returns the number of display characters for text. A return value of one -1 will show all characters.- Returns:
- the max display characters
-
setMaxDisplayCharactersForText
void setMaxDisplayCharactersForText(int maxCh) Sets the number of display characters for text. Set display character to -1 to show all characters- Parameters:
maxCh- the max display characters
-
replace
Replacing all occurrences of originalText in the chart with replacedText- Parameters:
originalText- The original textreplacedText- The replaced text
-
getReplacedText
Returns a replaced text for a given original text- Parameters:
originalText- The original text- Returns:
- the replaced text
-
getOriginalTextList
Enumeration getOriginalTextList()Returns all original text list for text replacement- Returns:
- list of original text
-
getReplacedTextList
Enumeration getReplacedTextList()Returns all replaced text list for text replacement- Returns:
- list of replaced text
-
gethHint
IHint gethHint()Used to get a handle to the IHint interface. This can be used to set various properties associated with the hints displayed for the datapoints in the chart.Associated QbChart properties: <b> SHOW_DATAHINT DATAHINT_BACKGROUND DATAHINT_FONTCOLOR DATAHINT_FONT </b>
- Returns:
- A handle to an object that implements quadbase.util.IHint
- See Also:
-
getBarGapToWidthRatio
float getBarGapToWidthRatio()Gets the ratio of the bar width and the distance between bars. Only valid for bar/column/stack bar/stack column charts.- Returns:
- The bar width to gap ratio
- See Also:
-
setBarGapToWidthRatio
void setBarGapToWidthRatio(float x) Sets the bar gap to width ratio for bar/column charts. A lower number implies thick bars with very little spacing between adjacent bars.Associated QbChart property: BARWIDTH_RATIO
- Parameters:
x- The bar width to gap ration
-
getMaxBarWidthRatioToPlotArea
float getMaxBarWidthRatioToPlotArea()Gets the ratio of the max bar width to the plot area. Only valid for bar/column/stack bar/stack column/100% column/box charts.- Returns:
- The max bar width to plot area ratio
- See Also:
-
setMaxBarWidthRatioToPlotArea
void setMaxBarWidthRatioToPlotArea(float x) Sets the max bar width to plot area ratio for bar/column charts. Only valid for bar/column/stack bar/stack column/100% column/box charts.- Parameters:
x- The max bar width to plot area ratio
-
isEndToEnd
boolean isEndToEnd()Returns whether a chart is drawn from end to end (no gap). Only valid for 2D line/area/stackarea charts. The default value is true.- Returns:
- True if a chart is drawn from end to end. False otherwise.
-
setEndToEnd
void setEndToEnd(boolean state) Enables/Disables drawing of a chart from end to end, skip all the gaps. Only valid for 2D line/area/stackarea charts.- Parameters:
state- Set to true/false to enable/disable drawing of a chart from end to end
-
isBorderVisible
boolean isBorderVisible()Returns whether or not a border is drawn around the data points for some chart types.- Returns:
- True if border drawing is enabled. False otherwise.
- See Also:
-
setBorderVisible
void setBorderVisible(boolean b) Enables/Disables drawing of a border around the data for some chart types. Valid chart types are: 2D Bar/ Column, 2D Pie, 2D Area, 2D Stack Area 2D Stack Bar/ Column and 100% Column charts.Associated QbChart property: DRAW_DATABORDER
- Parameters:
b- Set to true/false to enable/disable drawing of a border around the data points.
-
isBlackBorderVisibleForWhiteArea
boolean isBlackBorderVisibleForWhiteArea()Returns whether or not a black border is drawn around the white data area for some chart types.- Returns:
- True if border drawing is enabled. False otherwise.
- See Also:
-
setBlackBorderVisibleForWhiteArea
void setBlackBorderVisibleForWhiteArea(boolean b) Enables/Disables drawing of a black border around the white data area for some chart types. Valid chart types are: 2D Bar/ Column, 2D Pie, 2D Area, 2D Stack Area 2D Stack Bar/ Column and 100% Column charts.Associated QbChart property: DRAW_DATABORDER
- Parameters:
b- Set to true/false to enable/disable drawing of a border around the data points.
-
getDataBorderColor
Color getDataBorderColor()Returns border color of the data points for some chart types.- Returns:
- Color of the border.
- See Also:
-
setDataBorderColor
Sets border color of the data for some chart types. Valid chart types are: 2D Bar/ Column, 2D Stack Bar/ Column and 100% Column charts.- Parameters:
c- border color
-
getDataBorderThickness
int getDataBorderThickness()Returns border thickness of the data points for some chart types.- Returns:
- border thickness.
- See Also:
-
setDataBorderThickness
void setDataBorderThickness(int i) Sets border thickness of the data for some chart types. Valid chart types are: 2D Bar/ Column, 2D Stack Bar/ Column and 100% Column charts.- Parameters:
c- border thickness
-
areConnectLinesVisible
boolean areConnectLinesVisible()Returns whether or not the chart currently displays connecting lines for the data points.- Returns:
- True if connecting lines are displayed. False otherwise.
- See Also:
-
setConnectLinesVisible
void setConnectLinesVisible(boolean b) Enables/Disables the drawing of lines connecting adjacent data points in a chart.Associated QbChart property: DRAW_LINE
- Parameters:
b- Set to true/false to enable/disable drawing of connecting lines.
-
isShowShadowOnLine
boolean isShowShadowOnLine()Returns whether or not the chart currently displays shadow on lines. The default value is true- Returns:
- True if shadow of lines are displayed. False otherwise.
- See Also:
-
setShowShadowOnLine
void setShowShadowOnLine(boolean b) Enables/Disables the drawing shadow on lines in a chart. The default value is true- Parameters:
b- Set to true/false to enable/disable drawing shadow on lines.
-
isShowShadowOnPoint
boolean isShowShadowOnPoint()Returns whether or not the chart currently displays shadow on datapoints. The default value is true- Returns:
- True if shadow of datapoints are displayed. False otherwise.
-
setShowShadowOnPoint
void setShowShadowOnPoint(boolean b) Enables/Disables the drawing shadow on datapoints in a chart. The default value is true- Parameters:
b- Set to true/false to enable/disable drawing shadow on datapoints.
-
getLineThickness
Deprecated.Please use getDataLineThickness() and use @link ISecondaryChart#getDataLineThickness for secondary chartThis function returns the data line thickness for 2D charts.- Returns:
- The data line thickness value.
-
setLineThickness
Deprecated.Please use setDataLineThickness(int[] thickness) use @link ISecondaryChart#setDataLineThickness for secondary chartSets the data line thickness for 2D charts.- Parameters:
thickness- The thickness value for drawing data lines.
-
getLineXOffset
int getLineXOffset()Gets the X axis shift value in pixels.- Returns:
- The X axis shift value.
-
setLineXOffset
void setLineXOffset(int offset) Shift the points drawn along the X axis away from the origin.Associated QbChart property: X_SHIFT
- Parameters:
offset- The value, in pixels, to shift the points along the X axis.
-
isDottedLineForNull
boolean isDottedLineForNull()Returns whether or not the display of dotted lines for missing or null data points is enabled.- Returns:
- True if missing points are connected by dotted lines, false otherwise.
-
setDottedLineForNull
void setDottedLineForNull(boolean b) This function enables/disables drawing dotted lines for missing or null data points.Associated QbChart property: SHOW_NULLDATALINE
- Parameters:
b- Set to true if dotted lines are to be displayed for missing data values, false otherwise.- See Also:
-
setDataLineForNull
void setDataLineForNull(boolean b, boolean drawDottedLine) This function enables/disables drawing data lines for missing or null data points.- Parameters:
b- Set to true if data lines are to be displayed for missing data valuesdrawDottedLine- Set to true if want to use dotted line style to display null data- See Also:
-
isZeroAsNullData
boolean isZeroAsNullData()Returns whether or not to treat zero values as null data.- Returns:
- True if treating zero values as null data, false otherwise.
-
setZeroAsNullData
void setZeroAsNullData(boolean b) This function enables/disables treating zero values as null data.- Parameters:
b- Set to true if treated zero values as null data, false otherwise.
-
isNullDataAsZero
boolean isNullDataAsZero()Returns whether or not to treat null data as zero values.- Returns:
- True if treating null data as zero values, false otherwise.
-
setNullDataAsZero
void setNullDataAsZero(boolean b) This function enables/disables treating null data as zero values.- Parameters:
b- Set to true if treating null data as zero values, false otherwise.
-
isShowNullInScatter
boolean isShowNullInScatter()Returns whether or not to show null data in scatter.- Returns:
- True if showing null data in scatter, false otherwise.
-
setShowNullInScatter
void setShowNullInScatter(boolean b) This function enables/disables showing null data in scatter chart.- Parameters:
b- Set to true if showing null data in scatter, false otherwise.
-
isDrawNullColumn
boolean isDrawNullColumn()Returns whether or not to show null data column in chart.- Returns:
- True if showing null data column in chart, false otherwise.
-
setDrawNullColumn
void setDrawNullColumn(boolean b) Returns whether or not to show null data column in chart. -
getNullColumnName
String getNullColumnName()Returns the display name for null data column in chart.- Returns:
- the display name of null data column in chart.
-
setNullColumnName
Set the display name for null data column in chart.- Parameters:
str- the display name of null data column in chart.
-
arePointsVisible
boolean arePointsVisible()Returns the display status of the data points.- Returns:
- True if data point display is enabled, false otherwise.
-
setPointsVisible
void setPointsVisible(boolean b) Enables/Disables the display of data points in the chart.Associated QbChart property: DRAW_POINT
- Parameters:
b- Set the display status for the data points in the chart.
-
arePointsUniformForLine
boolean arePointsUniformForLine()This method returns whether the points are drawn uniformly. This feature only works for 2D Line Chart with no series.- Returns:
- True if data point are drawn uniformly, false otherwise.
-
setPointsUniformForLine
void setPointsUniformForLine(boolean b) If new state is true, the points are drawn uniformly. This feature only works for 2D Line Chart with no series.- Parameters:
b- Set the data points to draw uniformly.
-
isPointBorderVisible
boolean isPointBorderVisible()Returns the display status of the data point border.- Returns:
- True if data point border display is enabled, false otherwise.
-
setPointBorderVisible
void setPointBorderVisible(boolean b) Enables/Disables the display of data point border in the chart.- Parameters:
b- Set the display status for the data point border in the chart.
-
isPointBorderColorBlack
boolean isPointBorderColorBlack()Returns true if the color of the data point border is black. Otherwises, returns flase if the data point border is the darker color of the symbol color- Returns:
- the status of black data point border color.
-
setPointBorderColorBlack
void setPointBorderColorBlack(boolean b) Set the color of data point border to black, otherwises, darker color of the symbol color.- Parameters:
b- Set the color for the data point border to black.
-
isAreaVisible
boolean isAreaVisible()Returns the display status of the data area for radar chart.- Returns:
- True if data area display is enabled, false otherwise.
-
setAreaVisible
void setAreaVisible(boolean b) Enables/Disables the display of data area in the radar chart.- Parameters:
b- Set the display status for the data area in the chart.
-
getPointShapes
int[] getPointShapes()Returns the array of data point shapes displayed in the chart.- Returns:
- The array of data point shapes.
- See Also:
-
setPointShapes
void setPointShapes(int[] shapes) Sets the point shapes for drawing the data points in the chart. Only valid if display of points is enabled.Associated QbChart property: DATASHAPE
- Parameters:
shapes- The array containing the shapes for all the points. The number of points in this array should match the number used in the setColors() function.Available shape values are: QbChart.NOSYMBOL QbChart.CROSS QbChart.CIRCLE QbChart.SQUARE QbChart.TRIANGLE QbChart.PLUS QbChart.DASH QbChart.STAR QbChart.DIAMOND
- See Also:
-
getPointsShapes
int[] getPointsShapes() -
setPointsShapes
void setPointsShapes(int[] shapes) -
getPointSizes
int[] getPointSizes()Sets the point sizes for all the data points displayed in the chart.- Returns:
- The array of data point sizes.
- See Also:
-
setPointSizes
void setPointSizes(int[] size) Sets the point size for all the data points displayed in the chart.Associated QbChart property: DATASIZE
- Parameters:
size- The array of ints containing all the data point sizes.- See Also:
-
getLineStyles
int[] getLineStyles()Returns the line styles used to draw the different connect lines. The number of connect lines drawn depends on the chart type. See getColors() to get the length of the return array.- Returns:
- The array of line styles.
- See Also:
-
setLineStyles
void setLineStyles(int[] style) Sets the line styles for the connect data lines drawn in the chart. A line style basically defines a solid line or various types of dotted/dashed lines.Associated QbChart property: LINESTYLE
- Parameters:
style- The array containing all the line styles.A line style number, z, satisfies the equation: z = 256*fill + empty where fill is the number of fill pixels (solid part of dashed line) and empty is the number of blank pixels (empty part of dashed line) with fill < 256 and empty < 256. By setting well-defined numbers for z, users can create different types of connect lines.- See Also:
-
getDataLineThickness
int[] getDataLineThickness()This function returns the line thickness for 2D charts- Returns:
- The array of data line thickness.
-
setDataLineThickness
void setDataLineThickness(int[] lineThickness) Sets the line thickness for all the data lines displayed in the chart.- Parameters:
lineThickness- The array of ints containing all the data line thickness.
-
getGridStep
Deprecated.Please use getTickerStep(int colIndex) The step size of ticker should equal step size of grid, except after label filtering for date-time chartThis function is used to retrieve the grid step size for the given column index. Grid step sizes are associated with individual columns and not with a particular axis. Associated QbChart property:<b> GRID_STEPSIZE </b>- Parameters:
colIndex- The column index for which the grid step size is desired.- Returns:
- The grid step size.
- See Also:
-
setGridStep
Deprecated.Please use getTickerStep(int colIndex, int size) The step size of ticker should equal step size of grid, except after label filtering for date-time chartThis function is used to set the grid step size for a particular column. A step size is the frequency of grid lines displayed for an axis. e.g. A step size of 2 means draw a grid line for every 2nd point on the axis. Grid step sizes are associated with individual columns and not with a particular axis.- Parameters:
colIndex- The column index for which the grid step size is set.size- The step size.- See Also:
-
getTickerStep
int getTickerStep(int colIndex) This function is used to retrieve the ticker step size for the given column index. Ticker step sizes are associated with individual columns and not with a particular axis. Associated QbChart property:<b> TICKER_STEPSIZE </b>- Parameters:
colIndex- The column index for which the ticker step size is desired.- Returns:
- The ticker step size.
- See Also:
-
setTickerStep
void setTickerStep(int colIndex, int size) This function is used to set the ticker step size for a particular column. A step size is the frequency of ticker displayed for an axis. e.g. A step size of 2 means draw a ticker for every 2nd point on the axis. For label filtered date-time chart, a step size of 2 means draw one ticker between labels. (2 equally gap between labels) Ticker step sizes are associated with individual columns and not with a particular axis.- Parameters:
colIndex- The column index for which the ticker step size is set.size- The step size.- See Also:
-
getLabelFormat
This function is used to get the label format for the given column index. Associated QbChart property:<b> DATA_LABEL_FORMAT </b>- Parameters:
colIndex- The column index for which the label format is desired.- Returns:
- An object of type IFormat, which contains the label format.
- See Also:
-
setLabelFormat
This function sets the label format for the given column index.- Parameters:
colIndex- The column index.format- The object of type IFormat containing the label format.- See Also:
-
getLabelStep
int getLabelStep(int colIndex) This function returns the step size for the label display. Label step sizes are associated with individual columns and not with a particular axis. Associated QbChart property:<b> DATA_LABEL_STEPSIZE </b>- Parameters:
colIndex- The column index for which the label step size is desired.- Returns:
- The label step size for that column.
-
setLabelStep
void setLabelStep(int colIndex, int size) This function sets the label step size for the given column. This number indicates how frequently the labels are drawn along the axis. Label step sizes are associated with individual columns and not with a particular axis.- Parameters:
colIndex- The column index.size- The label step size desired.- See Also:
-
getMaxLabelAndTickerCount
int getMaxLabelAndTickerCount(int colIndex) This function returns the max number of the label and ticker display. Max number of the label and ticker is associated with individual columns and not with a particular axis. This feature is disabled if the return value is less than 1- Parameters:
colIndex- The column index for which the max count of label and ticker is desired.- Returns:
- The max count for number of the label and ticker.
-
setMaxLabelAndTickerCount
void setMaxLabelAndTickerCount(int colIndex, int ct) This function sets the max number of display label and ticker for the given axis. This number indicates the max number of the labels are drawn along the axis. The max count of label and ticker is associated with individual columns and not with a particular axis. Set the value to -1 in order to disable this feature- Parameters:
colIndex- The column index.ct- The max count for number of the label and ticker desired.- See Also:
-
setLabelStep
This function sets the label step size for the given column. This number indicates how frequently the labels are drawn along the axis. Label step sizes are associated with individual columns and not with a particular axis. If the column type is TIME/DATE/TIMESTAMP, it can do time-filtering (filter the label by SECOND/MINUTE/HOUR/DAY/MONTH/YEAR)- Parameters:
colIndex- The column index.size- The label step size desired.unit- The label interval unit: IDataPointSet.TICKER IDataPointSet.SECOND IDataPointSet.MINUTE IDataPointSet.HOUR IDataPointSet.DAY IDataPointSet.MONTH IDataPointSet.YEARisAscending- Set data ordering ( order sorting is required for time-filtering)startingDate- Set the date to start filtering If startingDate == null, it will find the best fit date to do filtering- See Also:
-
getLabelUnit
int getLabelUnit(int colIndex) This function is used to obtain the unit information of the label Label unit is associated with the individual column not the axis. UsesetLabelStep(.....)to set the label unit. No API forsetlabelUnitis implemented such that the unit can be consistent with the input data type of the column- Parameters:
colIndex- the columnIndex of the column- Returns:
- an integer that represents the unit. -1 (IDataPointSet.TICKER) means it has no unit or the column is not of Date type.
-
areHidden
boolean[] areHidden(int colIndex) This function is used to get the hidden status of column values in the legend. This status is associated with individual columns and not with a particular axis. Associated QbChart property:<b> HIDE_LEGENDITEMS </b>- Parameters:
colIndex- The column index for which the status is desired.- Returns:
- A boolean array containing the hidden status of each value.
- See Also:
-
setHidden
void setHidden(int colIndex, boolean[] b) This function sets the hidden status for the column values in the legend. This status is associated with individual columns and not with a particular axis.- Parameters:
colIndex- The column index.b- A boolean array containing the hide status.- See Also:
-
setLimitAtAxisScale
void setLimitAtAxisScale(boolean state) This function sets the data limit at axis scale If sets, no data can go over axis max scale or go below axis min scale The default value is FALSE- Parameters:
state- A boolean of set limit at axis scale
-
isLimitAtAxisScale
boolean isLimitAtAxisScale()This function return the state of data limit If FALSE, no data limit If TRUE, no data can go over axis max scale or go below axis min scale- Returns:
- the state of data limit
-
isTranslucent
boolean isTranslucent()This method returns whether the chart is translucent For QbChart.OVERLAY, QbChart.RADAR ,2D QbChart.AREA and Stack Area-Col Combo only- Returns:
- the state
-
setTranslucent
void setTranslucent(boolean b) If new state is true, the overlay parts of the chart are drawn in a partially transparent method. The default value is false. This method requires JDK 1.2 or above For QbChart.OVERLAY, QbChart.RADAR, 2D QbChart.AREA and Stack Area-Col Combo only- Parameters:
state- The new state
-
getTranslucentValue
float getTranslucentValue()This method returns translucent value of the chart (between 0 to 1.0, Transparent to solid) The default value is 0.5f For QbChart.OVERLAY, QbChart.RADAR ,2D QbChart.AREA and Stack Area-Col Combo only- Returns:
- the state
-
setTranslucentValue
void setTranslucentValue(float val) This method sets the translucent value of the chart The default value is 0.5. (between 0 to 1.0, Transparent to solid) This method requires JDK 1.2 or above For QbChart.OVERLAY, QbChart.RADAR, 2D QbChart.AREA and Stack Area-Col Combo only- Parameters:
state- The new state
-
setPositionFromOrigin
void setPositionFromOrigin(float chartMidPoint) Sets the chart position to be fixed from the origin of the canvas- Parameters:
chartMidPoint- The distance of the chart from the origin of the canvas represented as a percentage of the width
-
setCandleStickWidth
void setCandleStickWidth(float wickerWidth) This method sets the "wicker"--the hi invalid input: '&' low extensions of candlesticks. The value represents the ratio of the wicker width invalid input: '&' candlestick width and is to be between 0.1f to 1.0f, inclusive. The default value is 0.3 -
getCandleStickWidth
float getCandleStickWidth()This method gets the "wicker"--the hi invalid input: '&' low extensions of candlesticks. The value represents the ratio of the wicker width invalid input: '&' candlestick width and is to be between 0.1f to 1.0f, inclusive. The default value is 0.3 -
setCandleStickColors
This method sets the upTick and downTick candlestick colors. The default upTickColor is Color.green. The default downTickColor is Color.red. -
getCandleStickUpColor
Color getCandleStickUpColor()This method gets the upTick candlestick color. default upTickColor is Color.green -
getCandleStickDownColor
Color getCandleStickDownColor()This method gets the downTick candlestick color. The default downTickColor is Color.red. -
setXAxisDrawnAtTop
void setXAxisDrawnAtTop(boolean shift) Specifies whether the X-Axis is drawn at the top of the chart. Default x-axis position is at the bottom. -
isXAxisDrawnAtTop
boolean isXAxisDrawnAtTop()Returns a boolean value that specifies if X-Axis is drawn at the top. -
setConnectLinesInOriginalOrder
void setConnectLinesInOriginalOrder(boolean origOrder) Specifies whether the connecting line between datapoints is drawn in the same order in the dataset. Default value of false would result in connecting datapoints in ascending x-axis values. -
isConnectLinesInOriginalOrder
boolean isConnectLinesInOriginalOrder()Returns a boolean value that specifies if connecting lines are drawn in the original dataset order. -
setMaxYCutOffPointForScatter
This method set the max Y cut-off point for scatter chart- Parameters:
value- of the max Y cut-off point for scatter chart
-
getMaxYCutOffPointForScatter
Double getMaxYCutOffPointForScatter()This method return the value of the max Y cut-off point for scatter chart- Returns:
- value of the max Y cut-off point for scatter chart
-