public class ChartWidget extends BBjWidget implements SaveableWidget, EmailableWidget, DataFillableWidget
Modifier and Type | Field and Description |
---|---|
static BBjNumber |
ColorThemeAgate
|
static BBjNumber |
ColorThemeAntiquePewter
|
static BBjNumber |
ColorThemeAntler
|
static BBjNumber |
ColorThemeBamboo
|
static BBjNumber |
ColorThemeBeachStrata
|
static BBjNumber |
ColorThemeBerryPreserves
|
static BBjNumber |
ColorThemeBerryTart
|
static BBjNumber |
ColorThemeBiscayneBay
|
static BBjNumber |
ColorThemeBlackberries
|
static BBjNumber |
ColorThemeBloodOrange
|
static BBjNumber |
ColorThemeBlue
|
static BBjNumber |
ColorThemeBlueFrost
|
static BBjNumber |
ColorThemeBlueJewel
|
static BBjNumber |
ColorThemeBluesAndBrowns
|
static BBjNumber |
ColorThemeBreezy
|
static BBjNumber |
ColorThemeBreezyToo
|
static BBjNumber |
ColorThemeBrown
|
static BBjNumber |
ColorThemeBrownFur
|
static BBjNumber |
ColorThemeCamo
|
static BBjNumber |
ColorThemeCampsite
|
static BBjNumber |
ColorThemeCanary
|
static BBjNumber |
ColorThemeChocolateRaspberry
|
static BBjNumber |
ColorThemeCitrus
|
static BBjNumber |
ColorThemeCoastline
|
static BBjNumber |
ColorThemeColorful1
|
static BBjNumber |
ColorThemeColorful2
|
static BBjNumber |
ColorThemeColorful3
|
static BBjNumber |
ColorThemeColorful4
|
static BBjNumber |
ColorThemeColorful5
|
static BBjNumber |
ColorThemeColorful6
|
static BBjNumber |
ColorThemeColorful7
|
static BBjNumber |
ColorThemeCoral
|
static BBjNumber |
ColorThemeCranberry
|
static BBjNumber |
ColorThemeCranberryTart
|
static BBjNumber |
ColorThemeDarkToLight
|
static BBjNumber |
ColorThemeDeepBlueSea
|
static BBjNumber |
ColorThemeDefault
|
static BBjNumber |
ColorThemeDismal
|
static BBjNumber |
ColorThemeDivergentBlueTanGreen
|
static BBjNumber |
ColorThemeDivergentBlueTanRed
|
static BBjNumber |
ColorThemeDivergentBlueWhiteRed
|
static BBjNumber |
ColorThemeDivergentRedOrangeRed
|
static BBjNumber |
ColorThemeDriedRoses
|
static BBjNumber |
ColorThemeEarlyAmerican
|
static BBjNumber |
ColorThemeEarthTones1
|
static BBjNumber |
ColorThemeEarthTones2
|
static BBjNumber |
ColorThemeEarthTones3
|
static BBjNumber |
ColorThemeEscape
|
static BBjNumber |
ColorThemeEveningThunder
|
static BBjNumber |
ColorThemeFeathers
|
static BBjNumber |
ColorThemeFlorida
|
static BBjNumber |
ColorThemeGray
|
static BBjNumber |
ColorThemeGrayscaleTransparent
|
static BBjNumber |
ColorThemeGreen
|
static BBjNumber |
ColorThemeHeirloom
|
static BBjNumber |
ColorThemeHomestyle
|
static BBjNumber |
ColorThemeIcyLeaves
|
BBjNumber |
ColorThemeIndex
The index of the color theme associated with the widget, if applicable
|
static BBjNumber |
ColorThemeLakeside
|
static BBjNumber |
ColorThemeLavender
|
static BBjNumber |
ColorThemeMargarita
|
static BBjNumber |
ColorThemeMistyGarden
|
static BBjNumber |
ColorThemeMountainMist
|
static BBjNumber |
ColorThemeMountainSunset
|
static BBjNumber |
ColorThemeOliveBranch
|
static BBjNumber |
ColorThemeOrange
|
static BBjNumber |
ColorThemePeacock
|
static BBjNumber |
ColorThemePetals
|
static BBjNumber |
ColorThemePomegranate
|
static BBjNumber |
ColorThemePowderedCookie
|
static BBjNumber |
ColorThemePurple
|
static BBjNumber |
ColorThemePurpleBerry
|
static BBjNumber |
ColorThemeRed
|
static BBjNumber |
ColorThemeRetro
|
static BBjNumber |
ColorThemeRooster
|
static BBjNumber |
ColorThemeRope
|
static BBjNumber |
ColorThemeRosemary
|
static BBjNumber |
ColorThemeSandyBeach
|
static BBjNumber |
ColorThemeSeaFoam
|
static BBjNumber |
ColorThemeSepia
|
static BBjNumber |
ColorThemeSky
|
static BBjNumber |
ColorThemeTomorrowDark
|
static BBjNumber |
ColorThemeTomorrowLight
|
static BBjNumber |
ColorThemeTropicalSunset
|
static BBjNumber |
ColorThemeWatermelon
|
static BBjNumber |
ColorThemeWinterRobin
|
BBjVector |
CustomChartColors!
A BBjVector containing one or more Java Color objects to be used when customizing the ChartWidget's colors
|
static BBjNumber |
DATA_ITEM_LABEL_POSITION_INSIDE_BOTTOM
A constant that indicates a category-based chart's data item label will be placed inside the item toward the bottom, used with the ChartWidget::setChartDataItemLabels() method.
|
static BBjNumber |
DATA_ITEM_LABEL_POSITION_INSIDE_CENTER
A constant that indicates a category-based chart's data item label will be placed inside the item at the center, used with the ChartWidget::setChartDataItemLabels() method and the default when the position is not specified.
|
static BBjNumber |
DATA_ITEM_LABEL_POSITION_INSIDE_LEFT
A constant that indicates a category-based chart's data item label will be placed inside the item toward the left, used with the ChartWidget::setChartDataItemLabels() method.
|
static BBjNumber |
DATA_ITEM_LABEL_POSITION_INSIDE_RIGHT
A constant that indicates a category-based chart's data item label will be placed inside the item toward the right, used with the ChartWidget::setChartDataItemLabels() method.
|
static BBjNumber |
DATA_ITEM_LABEL_POSITION_INSIDE_TOP
A constant that indicates a category-based chart's data item label will be placed inside the item toward the top, used with the ChartWidget::setChartDataItemLabels() method.
|
static BBjNumber |
DATA_ITEM_LABEL_POSITION_OUTSIDE_BOTTOM
A constant that indicates a category-based chart's data item label will be placed outside the item toward the bottom, used with the ChartWidget::setChartDataItemLabels() method.
|
static BBjNumber |
DATA_ITEM_LABEL_POSITION_OUTSIDE_LEFT
A constant that indicates a category-based chart's data item label will be placed outside the item toward the left, used with the ChartWidget::setChartDataItemLabels() method.
|
static BBjNumber |
DATA_ITEM_LABEL_POSITION_OUTSIDE_RIGHT
A constant that indicates a category-based chart's data item label will be placed outside the item toward the right, used with the ChartWidget::setChartDataItemLabels() method.
|
static BBjNumber |
DATA_ITEM_LABEL_POSITION_OUTSIDE_TOP
A constant that indicates a category-based chart's data item label will be placed outside the item toward the top, used with the ChartWidget::setChartDataItemLabels() method.
|
static HorizontalAlignment |
HAlignCenter!
A constant to define horizontal alignment of the chart legend's container
|
static HorizontalAlignment |
HAlignLeft!
A constant to define horizontal alignment of the chart legend's container
|
static HorizontalAlignment |
HAlignRight!
A constant to define horizontal alignment of the chart legend's container
|
BBjImage |
LastRenderedImage!
The last rendered version of the chart in a BBjImage format used for the Customize window's preview
|
static BBjNumber |
LEGENDSHAPE_CAPSULE
A constant to define the legend items' shape
|
static BBjNumber |
LEGENDSHAPE_CIRCLE
A constant to define the legend items' shape
|
static BBjNumber |
LEGENDSHAPE_DIAMOND
A constant to define the legend items' shape
|
static BBjNumber |
LEGENDSHAPE_ELLIPSE
A constant to define the legend items' shape
|
static BBjNumber |
LEGENDSHAPE_RECTANGLE
A constant to define the legend items' shape
|
static BBjNumber |
LEGENDSHAPE_ROUNDEDRECTANGLE
A constant to define the legend items' shape
|
static BBjNumber |
LEGENDSHAPE_SQUARE
A constant to define the legend items' shape
|
static RectangleEdge |
SideBottom!
A constant to define the bottom edge used when setting the position of the chart legend
|
static RectangleEdge |
SideLeft!
A constant to define the left edge used when setting the position of the chart legend
|
static RectangleEdge |
SideRight!
A constant to define the right edge used when setting the position of the chart legend
|
static RectangleEdge |
SideTop!
A constant to define the top edge used when setting the position of the chart legend
|
BBjString |
TipBackColor$
The background color of the chart's tip, specified as a hex color string
|
BBjNumber |
TipBackColorOpacity
The background color's opacity of the chart's tip, specified as a number between 0 and 1 (0 = transparent, 1 = opaque)
|
BBjNumber |
TipDisplayTime
The display time in seconds of the chart's tip
|
BBjString |
TipForeColor$
The foreground color of the chart's tip, specified as a hex color string
|
BBjNumber |
TipForeColorOpacity
The foreground color's opacity of the chart's tip, specified as a number between 0 and 1 (0 = transparent, 1 = opaque)
|
static VerticalAlignment |
VAlignBottom!
A constant to define vertical alignment of the chart legend's container
|
static VerticalAlignment |
VAlignCenter!
A constant to define vertical alignment of the chart legend's container
|
static VerticalAlignment |
VAlignTop!
A constant to define vertical alignment of the chart legend's container
|
BASIS_UTILITY_DEVICE_PIXEL_RATIO_KEY_NAME$, DevicePixelRatio!
BASIS_DASHBOARD_UTILITY_FILL_ERROR_ACTION_KEY_NAME$, CachedImage!, DashboardWidget!, FillErrorAction, ON_FILL_ERROR_IGNORE, ON_FILL_ERROR_STOP, ON_FILL_ERROR_WARN, UserData!
Modifier and Type | Method and Description |
---|---|
void |
addChartDomainMarker(BBjString p_key$,
BBjString p_markerColorDesc$,
BBjNumber p_markerOpacity,
BBjString p_label$,
BBjString p_labelColorDesc$,
BBjNumber p_labelOpacity,
RectangleAnchor p_rectangleAnchor!,
TextAnchor p_textAnchor!)
Adds a threshold marker for the chart's domain (markers are typically added to plots to highlight or draw attention to specific values) - note that this applies only to category-based charts (BarCharts, LineCharts, AreaCharts) and XYCharts that have a domain and range axis.
|
void |
addChartRangeMarker(BBjNumber p_value,
BBjString p_colorDesc$,
BBjNumber p_opacity,
BBjString p_label$,
BBjString p_labelColorDesc$,
BBjNumber p_labelOpacity,
RectangleAnchor p_rectangleAnchor!,
TextAnchor p_textAnchor!)
Adds a threshold marker for the chart's range (markers are typically added to plots to highlight or draw attention to specific values) - note that this applies only to category-based charts (BarCharts, LineCharts, AreaCharts) and XYCharts that have a domain and range axis.
|
static Color |
adjustColorBrightness(Color p_color!,
BBjNumber p_fraction)
Lighten or Darken a Color by a specified amount
|
static Color |
adjustColorOpacity(Color p_color!,
BBjNumber p_fraction)
Sets the opacity for a Color to a specified amount
|
static Color |
adjustColorSaturation(Color p_color!,
BBjNumber p_fraction)
Saturate or Desaturate a Color by a specified amount
|
static BBjVector |
adjustColorVectorBrightness(BBjVector p_colorVector!,
BBjNumber p_fraction)
Lighten or Darken every color in the vector by a specified amount
|
static BBjVector |
adjustColorVectorOpacity(BBjVector p_colorVector!,
BBjNumber p_fraction)
Increase or decrease the opacity for every color in the vector to a specified amount
|
static BBjVector |
adjustColorVectorOpacityToFixedAmount(BBjVector p_colorVector!,
BBjNumber p_opacity)
Sets the opacity to a fixed amount for every color in the vector
|
static BBjVector |
adjustColorVectorSaturation(BBjVector p_colorVector!,
BBjNumber p_fraction)
Saturate or Desaturate every color in the vector by a specified amount
|
void |
cloneCommonChartWidgetParameters(ChartWidget widget!)
A method used internally to propagate a chart widget's properties to a cloned version of the chart
|
static BBjImage |
createCombinedImage(BBjImage p_imageBottom!,
BBjImage p_imageTop!,
BBjNumber p_width,
BBjNumber p_height)
Creates a BBjImage by overlaying one image on top of another, specifying the final image dimensions
|
static BBjImage |
createCombinedImagesWithText(BBjImage p_imageBottom!,
BBjImage p_imageMiddle!,
BBjString p_text$,
BBjNumber p_width,
BBjNumber p_height)
Creates a BBjImage by combining two images with text
|
static BBjImage |
createCombinedImageWithText(BBjImage p_image!,
BBjString p_text$,
BBjNumber p_width,
BBjNumber p_height)
Creates a BBjImage by combining an existing image with text
|
static BBjImage |
createImageFromText(BBjString p_text$,
BBjNumber p_width,
BBjNumber p_height)
Creates a BBjImage by drawing automatically-sized text on a graphics context
|
static BBjImage |
createImageFromText(BBjString p_text$,
BBjString p_foreColor$,
BBjNumber p_foreOpacity,
BBjString p_backColor$,
BBjNumber p_backOpacity,
BBjString p_fontFile$,
BBjString p_fontStyle$,
BBjNumber p_width,
BBjNumber p_height)
Creates a BBjImage by drawing automatically-sized text on a graphics context
|
static BBjImage |
createImageFromText(BBjString p_text$,
BBjString p_foreColor$,
BBjNumber p_foreOpacity,
BBjString p_backColor$,
BBjNumber p_backOpacity,
Font p_font!,
BBjNumber p_width,
BBjNumber p_height)
Creates a BBjImage by drawing text on a graphics context
|
static BBjImage |
createImageFromText(BBjString p_text$,
BBjString p_foreColor$,
BBjNumber p_foreOpacity,
Font p_font!,
BBjNumber p_width,
BBjNumber p_height)
Creates a BBjImage by drawing text on a transparent background
|
static RadialGradientPaint |
createRadialGradientPaint(Color p_color1!,
Color p_color2!,
Point2D p_center!)
Gets a radial gradient paint based off of two colors and the center point relative to the entire chart
|
static Color |
darkenColor(Color p_color!,
BBjNumber p_fraction)
Make a color darker
|
void |
email(BBjNumber p_parentX,
BBjNumber p_parentY,
BBjNumber p_parentWidth,
BBjNumber p_parentHeight)
Displays a dialog that facilitates emailing a screenshot of the chart as an attachment to one or more recipients
|
void |
exportData(BBjNumber p_parentX,
BBjNumber p_parentY,
BBjNumber p_parentWidth,
BBjNumber p_parentHeight)
Displays an export dialog that allows the user to export the widget's data to a CSV file with several output options
|
void |
fillJDBCXYSeries(XYSeries p_series!,
BBjRecordSet p_rs!,
BBjVector p_columns!)
Given a BBjRecordSet and a vector of columns, fill an XYSeries with the resultant two columns of numerical data
|
void |
fillJDBCXYSeries(XYSeries p_series!,
BBjString p_connectString$,
BBjString p_sql$)
Given an SQL query, fill an XYSeries with the resultant two columns of numerical data
|
void |
fillJDBCXYSeries(XYSeries p_series!,
BBjString p_connectString$,
BBjString p_sql$,
BBjString p_mode$)
Given an SQL query, fill an XYSeries with the resultant two columns of numerical data
|
static BBjColor |
getBBjColor(Color p_color!)
Method to create a BBjColor from a Java Color, taking into account an alpha channel if it exists
|
static BBjColor |
getBBjColorWithAlphaFromHexString(BBjString p_colorHexString$,
BBjNumber p_opacity)
Method to create a BBjColor with an alpha channel from a hex string
|
DataItem |
getChartDataItemFromPoint(BBjNumber p_x,
BBjNumber p_y)
Gets the chart's last data item with an area that encloses the specified coordinates
|
BBjVector |
getChartDataItemsFromPoint(BBjNumber p_x,
BBjNumber p_y)
Gets all of the chart's data items with an area that encloses the specified coordinates
|
DecimalFormat |
getChartDomainAxisFormat()
Returns the custom decimal format for the XYChart's domain axis (x-axis) numbers - note that this applies only to an XYChart
|
BBjString |
getChartFontFile()
Gets the customized font file for the chart.
|
BBjNumber |
getChartHeight()
Returns the height of the chart
|
DecimalFormat |
getChartRangeAxisFormat()
Returns the custom decimal format for the chart's range axis (y-axis) numbers
|
BBjNumber |
getChartRangeAxisToCurrency()
Return a BBjNumber indicating if the range axis was set to show its values formatted as currency for the current locale
|
BBjNumber |
getChartRangeAxisToPercent()
Return a BBjNumber indicating if the range axis was set to show its values formatted as a percentage.
|
BBjNumber |
getChartWidth()
Returns the width of the chart
|
static BBjVector |
getColorTheme(BBjNumber p_colorThemeIndex)
Gets a pre-defined color theme vector
|
static BBjNumber |
getColorThemeCount()
Gets the total number of color themes
|
static BBjString |
getColorThemeDescription(BBjNumber p_colorThemeIndex)
Gets the description of the specified color theme
|
static Color |
getColorWithAlpha(BBjColor p_color!,
BBjNumber p_opacity)
Method to create a Java Color with an alpha channel from a BBjColor where opacity = (0-1)
|
static Color |
getColorWithAlpha(Color p_color!,
BBjNumber p_opacity)
Method to create a Java Color with an alpha channel from a Java Color by specifying an opacity amount.
|
static Color |
getColorWithAlphaFromHexString(BBjString p_colorHexString$,
BBjNumber p_opacity)
Method to create a Java Color with an alpha channel from a hex string
|
Object |
getDataset() |
static BBjVector |
getDefaultChartColors()
Gets the default colors for a chart
|
BBjNumber |
getDevicePixelRatio()
Gets the screen's device pixel ratio used for modifying ChartWidgets
|
static Font |
getFont(BBjFont p_font!)
Create a java font from a BBjFont
|
BBjNumber |
getFontScalingFactor()
Gets the custom font scaling factor for the chart as set by the original dashboard program.
|
static BBjString |
getHexStringFromColor(Color p_color!)
Method to get a hex representation of a Java Color with an alpha channel
|
static BBjVector |
getHSBValuesFromRGBColor(Color p_color!)
Method to convert a RGB Color to its corresponding HSB (Java) values and return an array containing the 3 HSB values
|
static BBjVector |
getHSLValuesFromRGBColor(Color p_color!)
Method to convert a RGB Color to its corresponding HSL (CSS) values and return an array containing the 3 HSL values
|
static Color |
getJavaColor(BBjColor p_color!)
Method to create a Java Color from a BBjColor
|
static Color |
getJavaColor(BBjString p_colorHexString$)
Method to create a Java Color from a hex color string
|
DefaultCategoryDataset |
getJDBCCategoryDataset(BBjRecordSet p_rs!,
BBjVector p_columns!)
Given a BBjRecordSet and a BBjVector containing the columns of interest, return a DefaultCategoryDataset filled with the desired data
|
DefaultCategoryDataset |
getJDBCCategoryDataset(BBjString p_connectString$,
BBjString p_sql$)
Given an SQL query, return a DefaultCategoryDataset filled with the desired data
|
DefaultCategoryDataset |
getJDBCCategoryDataset(BBjString p_connectString$,
BBjString p_sql$,
BBjString p_mode$)
Given an SQL query, return a DefaultCategoryDataset filled with the desired data
|
DefaultPieDataset |
getJDBCPieDataset(BBjRecordSet p_rs!,
BBjVector p_columns!)
Given a BBjRecordSet and a BBjVector containing the columns of interest return a DefaultCategoryDataset filled with the desired data
|
DefaultPieDataset |
getJDBCPieDataset(BBjString p_connectString$,
BBjString p_sql$)
Given an SQL query, return a DefaultPieDataset filled with the desired data
|
DefaultPieDataset |
getJDBCPieDataset(BBjString p_connectString$,
BBjString p_sql$,
BBjString p_mode$)
Given an SQL query, return a DefaultPieDataset filled with the desired data
|
BBjNumber |
getLegendFontSize()
Gets the font size for the chart's legend items.
|
static Color |
getRGBColorFromHSLValues(BBjNumber p_hue,
BBjNumber p_saturation,
BBjNumber p_lightness)
Method to create a java RGB Color from its corresponding HSL (CSS) values
|
BBjNumber |
getUserFontScalingFactor()
Gets the custom font scaling factor or the chart as set by the user in the Customize screen.
|
static BBjVector |
getVectorOfJavaColorsFromDivergentHexColorStrings(BBjNumber p_numColors,
BBjString p_colorDescStart$,
BBjString p_colorDescMiddle$,
BBjString p_colorDescFinish$,
BBjNumber p_alphaStart!,
BBjNumber p_alphaMiddle!,
BBjNumber p_alphaFinish!)
Method to create a vector of divergent colors with a specified starting, middle, and ending range.
|
static BBjVector |
getVectorOfJavaColorsFromHexColorStrings(BBjNumber p_numColors,
BBjString p_colorDescStart$,
BBjString p_colorDescFinish$,
BBjNumber p_alphaStart!,
BBjNumber p_alphaFinish!)
Method to create a vector of Java Colors with a specified starting and ending range
|
BBjNumber |
hasLegend()
Indicates whether the chart has a legend
|
BBjNumber |
is3D()
Indicates whether the chart is 3D or Flat
|
BBjNumber |
isAreaChart()
Indicates whether the chart is an Area Chart
|
BBjNumber |
isBarChart()
Indicates whether the chart is a Bar Chart
|
BBjNumber |
isDataSetEmpty()
Indicates whether a chart's underlying dataset is empty or not
|
BBjNumber |
isFlat()
Indicates whether the chart is 3D or Flat
|
BBjNumber |
isLineChart()
Indicates whether the chart is a Line Chart
|
BBjNumber |
isPieChart()
Indicates whether the chart is a Pie Chart
|
BBjNumber |
isRingChart()
Indicates whether the chart is a Ring Chart
|
BBjNumber |
isStackedAreaChart()
Indicates whether the chart is a Stacked Area Chart
|
BBjNumber |
isStackedBarChart()
Indicates whether the chart is a Stacked Bar Chart
|
BBjNumber |
isStackedPercentageBarChart()
Indicates whether the chart is a Stacked Percentage Bar Chart
|
BBjNumber |
isXYChart()
Indicates whether the chart is an XY Chart
|
static Color |
lightenColor(Color p_color!,
BBjNumber p_fraction)
Make a color lighter
|
static BBjVector |
makeColorVectorFromCommaDelimitedHexColorString(BBjString p_colorString!)
Return a vector of java colors given a comma delimited string of hex colors
|
static BBjVector |
makeColorVectorFromCommaDelimitedHexColorString(BBjString p_colorString!,
BBjNumber p_opacity)
Return a vector of java colors given a comma delimited string of hex colors and an opacity amount to be applied to all colors
|
static BBjVector |
makeLargerColorVectorByDarkening(BBjVector p_colorVector!,
BBjNumber p_size)
Gets a larger vector of colors by repeating the source vector, darkening it each time
|
static BBjVector |
makeLargerColorVectorByLightening(BBjVector p_colorVector!,
BBjNumber p_size)
Gets a larger vector of colors by repeating the source vector, lightening it each time
|
static BBjVector |
makeLargerColorVectorByReducingOpacity(BBjVector p_colorVector!,
BBjNumber p_size)
Gets a larger vector of colors by repeating the source vector, decreasing the opacity each time
|
void |
OnClearTip(BBjTimerEvent p_event!)
Removes the chart's tip that is shown after clicking on a data entity.
|
void |
refresh()
Refreshes the chart, which results in the widget showing an up-to-date version of the chart based on the underlying dataset.
|
void |
resize(BBjNumber p_width,
BBjNumber p_height)
Resizes the widget using the provided with and height
|
void |
restoreCustomColorTheme()
Restores any custom colors assigned to the chart by the program (after removing user customized theme color)
|
static BBjVector |
reverseColorVector(BBjVector p_colorVector!)
Reverses the order of the colors in a vector
|
static BBjVector |
rotateColorVector(BBjVector p_colorVector!,
BBjNumber p_amount)
Rotate the colors in a vector forwards or backwards by a specified amount.
|
static Color |
saturateColor(Color p_color!,
BBjNumber p_fraction)
Make a color more or less saturated
|
void |
save()
Interactively saves a screenshot of the chart as a PNG file on the client
|
static void |
saveColorThemePaletteImagesToDirectory(BBjString p_outputDirectory$,
BBjString p_namePrefix$,
BBjNumber p_width,
BBjNumber p_height)
Generates a series of PNG image files that are a visual representation of each Color Theme's palette
|
static void |
saveColorVectorAsPaletteImage(BBjVector p_colorVector!,
BBjString p_outputFilename$,
BBjNumber p_width,
BBjNumber p_height)
Generates a color palette PNG image file that is a visual representation of all Colors in the supplied vector
|
void |
setChartBackground(BBjNumber p_red,
BBjNumber p_green,
BBjNumber p_blue,
BBjNumber p_opacity)
Sets a background color for the entire chart
|
void |
setChartBackground(BBjString p_colorHexString$,
BBjNumber p_opacity)
Sets a background color for the entire chart
|
void |
setChartBackground(Paint p_paint!)
Sets a background paint for the entire chart
|
void |
setChartBackgroundGradient(BBjString p_colors!,
BBjNumber p_orientation)
Sets the colors for the chart's background as a gradient
|
void |
setChartBackgroundImage(BBjImage p_image!,
BBjNumber p_opacity)
Sets a background image for the entire chart
|
void |
setChartBackgroundImage(BBjString p_imageFile$,
BBjNumber p_opacity)
Sets a background image for the entire chart
|
void |
setChartColors(BBjNumber p_numColors,
BBjString p_colorDescStart$,
BBjString p_colorDescFinish$,
BBjNumber p_alphaStart!,
BBjNumber p_alphaFinish!)
Sets the colors for the chart by generating a series of colors given a starting and ending color
|
void |
setChartColors(BBjNumber p_numColors,
Color p_colorStart!,
Color p_colorFinish!)
Sets the colors for the chart by generating a series of colors given starting and ending Java Colors which may include an opacity
|
void |
setChartColors(BBjString p_colors!)
Sets the colors for the chart given a fixed number of hex color descriptions in a string
|
void |
setChartColors(BBjString p_colors!,
BBjNumber p_opacity)
Sets the colors for the chart given a fixed number of hex color descriptions in a string and an opacity value
|
void |
setChartColors(BBjString p_colorDescStart$,
BBjString p_colorDescFinish$,
BBjNumber p_alphaStart!,
BBjNumber p_alphaFinish!)
Sets the colors for the chart dynamically by generating a series of colors given a starting and ending color with opacities
|
void |
setChartColors(BBjString p_colorDescStart$,
BBjString p_colorDescMiddle$,
BBjString p_colorDescFinish$,
BBjNumber p_alphaStart!,
BBjNumber p_alphaMiddle!,
BBjNumber p_alphaFinish!)
Sets the colors for the chart dynamically by generating a series of divergent colors given a starting, middle, and ending color with opacities
|
void |
setChartColors(BBjVector p_colors!)
Sets the colors for the chart given a fixed number of Java Colors in a BBjVector
|
void |
setChartColorTheme(BBjNumber p_colorThemeIndex)
Sets the colors for the chart given a color theme number
|
void |
setChartDataItemLabelFormat(BBjString p_customLabelFormat$)
Sets a custom label format for the chart's label items - note that this applies only to category-based charts (BarCharts, LineCharts, AreaCharts) and XYCharts that have a domain and range axis
|
void |
setChartDataItemLabelFormat(BBjString p_customLabelFormat$,
NumberFormat p_numberFormat!,
NumberFormat p_percentageFormat!)
Sets a custom label format for the chart's label items by providing a label string and NumberFormatters for the number and percentage fields - note that this applies only to category-based charts (BarCharts, LineCharts, AreaCharts) and XYCharts that have a domain and range axis
|
void |
setChartDataItemLabels(BBjString p_colorHexString$)
Enables data item labels in a chart, displaying the range value in the specified color - note that this applies only to category-based charts (BarCharts, LineCharts, AreaCharts) and XYCharts that have a domain and range axis
|
void |
setChartDataItemLabels(BBjString p_colorHexString$,
BBjNumber p_labelLocation)
Enables data item labels in a chart, displaying the range value in the specified color and position - note that this applies only to category-based charts (BarCharts, LineCharts, AreaCharts) and XYCharts that have a domain and range axis
|
void |
setChartDataItemLabels(BBjString p_colorHexString$,
ItemLabelAnchor p_itemLabelAnchor!,
TextAnchor p_textAnchor!,
TextAnchor p_rotationAnchor!,
BBjNumber p_angle)
Enables data item labels in a chart, displaying the range value in the specified color and position - note that this applies only to category-based charts, such as BarCharts, LineCharts, AreaCharts, etc.
|
void |
setChartDomainAxisFontScaling(BBjNumber p_scaleFonts)
Sets whether the font for the domain axis should be scaled down when the axis contains a large number of entries
|
void |
setChartDomainAxisFormat(BBjString p_format$)
Sets a format for the XYChart's domain axis (x-axis) numbers, allowing you for format numbers with digits, decimals, spaces, separators, currency symbols, and arbitrary text - note that this applies only to an XYChart
|
void |
setChartDomainAxisMargins(BBjNumber p_lowerMargin,
BBjNumber p_upperMargin)
Sets the lower and upper margins on the domain axis as a percentage of the length of the axis
|
void |
setChartDomainAxisNumLines(BBjNumber p_numLines)
Sets maximum number of lines used to display a label on the chart's domain (x axis) when applicable
|
void |
setChartDomainAxisTitle(BBjString p_title$)
Sets the title for the domain axis
|
void |
setChartDomainAxisVisible(BBjNumber p_visible)
Sets whether the domain axis is visible or not
|
void |
setChartDomainMarker(BBjString p_key$,
BBjString p_colorDesc$,
BBjNumber p_opacity)
Sets a threshold marker for the chart's domain.
|
void |
setChartDomainMarker(BBjString p_key$,
BBjString p_colorDesc$,
BBjNumber p_opacity,
BBjNumber p_markerType)
Sets a threshold marker for the chart's domain.
|
void |
setChartDomainMarker(BBjString p_key$,
Color p_color!)
Sets a threshold marker for the chart's domain.
|
void |
setChartEmptyDisplayImage(BBjString p_imageFile$)
Sets the image that will appear in the widget if the chart contains no data
|
void |
setChartEmptyDisplayText(BBjString p_displayText$)
Sets the text that will appear in the widget if the chart contains no data.
|
void |
setChartFontColor(BBjColor p_color!,
BBjNumber p_opacity)
Sets the color for the fonts used in the chart for the labels, legend, title, etc.
|
void |
setChartFontColor(BBjString p_colorHexString$,
BBjNumber p_opacity)
Sets the color for the fonts used in the chart for the labels, legend, title, etc.
|
void |
setChartFontColors(BBjString p_colors!,
BBjNumber p_opacity)
Sets the colors for the fonts used in the chart for the labels, legend, title, etc.
|
void |
setChartFontFile(BBjString p_fontFile$)
Sets a font for the chart.
|
void |
setChartFontFile(BBjString p_fontFile$,
BBjNumber p_throwError)
Sets a font for the chart.
|
void |
setChartFontSizes(BBjNumber p_titleSize,
BBjNumber p_subtitleSize,
BBjNumber p_legendItemSize,
BBjNumber p_labelSize,
BBjNumber p_domainItemSize,
BBjNumber p_rangeItemSize,
BBjNumber p_annotationSize)
Sets the size for the various fonts used in the chart for the labels, legend, title, etc.
|
void |
setChartFontStyles(BBjNumber p_titleStyle,
BBjNumber p_subtitleStyle,
BBjNumber p_legendItemStyle,
BBjNumber p_labelStyle,
BBjNumber p_domainItemStyle,
BBjNumber p_rangeItemStyle,
BBjNumber p_annotationStyle)
Sets the style (plain/bold/italic) for the various fonts used in the chart for the labels, legend, title, etc.
|
void |
setChartLegendBackground(BBjString p_colorHexString$,
BBjNumber p_opacity)
Applies the background color for the legend
|
void |
setChartLegendFrame(BBjNumber p_width,
BBjString p_colorHexString$,
BBjNumber p_opacity)
Applies the border width and color for the legend
|
void |
setChartLegendPadding(BBjNumber p_top,
BBjNumber p_right,
BBjNumber p_bottom,
BBjNumber p_left)
Sets the padding between the legend border and the legend items
|
void |
setChartLegendShape(BBjNumber p_shape,
BBjNumber p_outlineWidth,
BBjString p_colorHexString$,
BBjNumber p_opacity)
Sets the parameters for a chart's legend shape.
|
void |
setChartLegendShape(BBjNumber p_shape,
BBjNumber p_outlineWidth,
Color p_outlineColor!)
Sets the parameters for a chart's legend shape.
|
void |
setChartLegendShapeRadius(BBjNumber p_radius)
Sets the radius for a chart's legend shape (typically a circle) in pixels, overriding the default.
|
void |
setChartLegendShapeRadiusScalingFactor(BBjNumber p_factor)
Sets a scaling factor for the radius of a chart's legend shape (typically a circle) as a percentage of the orginal value, overriding the default.
|
void |
setChartMaximumDomainLabelWidthRatio(BBjNumber p_widthRatio)
Sets a scaling factor that affects the domain axis label width.
|
void |
setChartPadding(BBjNumber p_top,
BBjNumber p_right,
BBjNumber p_bottom,
BBjNumber p_left)
Sets the padding between the chart border and the chart drawing area
|
void |
setChartPlotShadow(BBjNumber p_size,
BBjString p_colorString!,
BBjNumber p_opacity,
BBjNumber p_distance,
BBjNumber p_angle)
Sets a diffused shadow for the plot, which adds a shadow to the plot contents (bars, lines, pie slices, etc.).
|
void |
setChartRangeAxisFormat(BBjString p_format$)
Sets a format for the chart's range axis (y-axis) numbers, allowing you to format numbers with digits, decimals, spaces, separators, currency symbols, and arbitrary text.
|
void |
setChartRangeAxisMinimumSize(BBjNumber p_minimumSize)
Sets the minimum size allowed for the axis range when it is automatically calculated
|
void |
setChartRangeAxisTitle(BBjString p_title$)
Sets the title for the range axis
|
void |
setChartRangeAxisToCurrency()
Sets the range axis to show its values formatted as currency for the current locale
|
void |
setChartRangeAxisToCurrencyWithFractionalDigits(BBjNumber p_fractionDigits)
Sets the range axis to show its values formatted as currency for the current locale with the provided number of fractional digits.
|
void |
setChartRangeAxisToPercent()
Sets the range axis to show its values formatted as a percentage, which multiplies the values by 100 and appends the percent sign
|
void |
setChartRangeAxisUseIntegers(BBjNumber p_useIntegers)
Sets whether the range axis is limited to integer values or not
|
void |
setChartRangeAxisVisible(BBjNumber p_visible)
Sets whether the range axis is visible or not
|
void |
setChartRangeColors(BBjString p_colors!)
Sets the colors for the chart's bars as a gradient going across the range
|
void |
setChartRangeColors(BBjString p_colors!,
BBjNumber p_opacity)
Sets the colors for the chart's bars as a gradient going across the range
|
void |
setChartRangeColors(BBjString p_colorDescStart$,
BBjString p_colorDescFinish$,
BBjNumber p_alphaStart!,
BBjNumber p_alphaFinish!)
Sets the range Paint for each bar in the chart
|
void |
setChartRangeColors(BBjVector p_colors!)
Sets the range Paint for each bar in the chart
|
void |
setChartRangeMarker(BBjNumber p_value,
BBjString p_colorDesc$,
BBjNumber p_opacity)
Sets a threshold marker for the chart's range.
|
void |
setChartRangeMarker(BBjNumber p_value,
Color p_color!)
Sets a threshold marker for the chart's range.
|
void |
setChartTitle(BBjString p_chartTitle$)
Sets the title of the chart
|
void |
setChartTitles(BBjString p_chartTitle$,
BBjString p_chartDomainTitle$,
BBjString p_chartRangeTitle$)
Sets the main chart title, domain title, and range title for all category charts (bar, line, area, etc.)
|
void |
setDevicePixelRatio(BBjNumber p_pixelRatio)
Sets the screen's device pixel ratio used for modifying ChartWidgets
|
void |
setFontScalingFactor(BBjNumber p_factor)
Sets a font scaling factor for the chart via a dashboard program.
|
void |
setGradientShadingAmount(BBjNumber p_gradientShadingAmount)
Sets the gradient shanding amount for the entire chart.
|
void |
setLegendBackground(BBjString p_colorHexString$,
BBjNumber p_opacity)
Sets a background color for the legend
|
void |
setLegendBackground(Paint p_paint!)
Sets a background paint for the legend
|
void |
setLegendLabelFormat(BBjString p_customLabelFormat$)
Define a custom label format for chart's legend items
|
void |
setLegendLabelFormat(BBjString p_customLabelFormat$,
NumberFormat p_numberFormat!,
NumberFormat p_percentageFormat!)
Define a custom label format for the chart's legend items by providing a label string and NumberFormatters for the number and percentage fields.
|
void |
setLegendPosition(RectangleEdge p_side!,
HorizontalAlignment p_halign!,
VerticalAlignment p_valign!)
Sets the position of the legend in the chart
|
void |
setPlotBackground(BBjNumber p_red,
BBjNumber p_green,
BBjNumber p_blue,
BBjNumber p_opacity)
Sets a background color for the plot, not the entire chart
|
void |
setPlotBackground(BBjString p_colorHexString$,
BBjNumber p_opacity)
Sets a background color for the plot, not the entire chart
|
void |
setPlotBackground(Paint p_paint!)
Sets a background paint for the plot, not the entire chart
|
void |
setPlotBackgroundImage(BBjImage p_image!,
BBjNumber p_opacity)
Sets a background image for the plot, not the whole chart
|
void |
setPlotBackgroundImage(BBjString p_imageFile$,
BBjNumber p_opacity)
Sets a background image for the plot, not the whole chart
|
void |
setRangeValues(BBjNumber p_minRangeValue,
BBjNumber p_maxRangeValue)
Sets the minimum and maximum values for the range of the chart's plot
|
void |
setUserFontScalingFactor(BBjNumber p_factor)
Sets a font scaling factor for the chart based on the user's preferences.
|
void |
showTip(BBjString p_tip$)
Shows the chart's tip after clicking on a data entity.
|
static BBjVector |
shuffleColorVector(BBjVector p_colorVector!)
Shuffles the order of the colors in a vector
|
static void |
viewCategoryDataSet(DefaultCategoryDataset p_dataset!)
Creates a table representation of the supplied DefaultCategoryDataset and displays it in a message box.
|
void |
viewData()
Exports the widget's data to a CSV file and displays it in the application associated with CSV files on the client's machine
|
static void |
viewPieDataSet(DefaultPieDataset p_dataset!)
Creates a table representation of the supplied DefaultCategoryDataset and displays it in a message box.
|
void |
writePNGToServerOnCreation(BBjString p_imageFile$)
Programmatically saves a screenshot of the chart as a PNG file on the server with the specified path after the chart has been created
|
void |
writePNGToServerOnCreation(BBjString p_imageFile$,
BBjNumber p_width,
BBjNumber p_height)
Programmatically saves a screenshot of the chart at the desired width and height as a PNG file on the server with the specified path after the chart has been created
|
create, destroy, display, isDestroyed, logQueryPerformance
active, getClientSlash, getFillError, getFillErrorDesc, getImage, getImage, imageFileSaveDialog, logError, name, previewImage, previewText, setActive, setFillErrorDisplayImage, setFillErrorDisplayText, setLastSaveDir, spacesValid, title
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clearDataSet, fill, fill, getColumns, getConnectString, getRecordSet, getSQL
public BBjString TipForeColor$
public BBjNumber TipForeColorOpacity
public BBjString TipBackColor$
public BBjNumber TipBackColorOpacity
public BBjNumber TipDisplayTime
public BBjImage LastRenderedImage!
public BBjNumber ColorThemeIndex
public BBjVector CustomChartColors!
public static RectangleEdge SideTop!
public static RectangleEdge SideLeft!
public static RectangleEdge SideBottom!
public static RectangleEdge SideRight!
public static HorizontalAlignment HAlignLeft!
public static HorizontalAlignment HAlignCenter!
public static HorizontalAlignment HAlignRight!
public static VerticalAlignment VAlignTop!
public static VerticalAlignment VAlignCenter!
public static VerticalAlignment VAlignBottom!
public static BBjNumber DATA_ITEM_LABEL_POSITION_INSIDE_CENTER
public static BBjNumber DATA_ITEM_LABEL_POSITION_INSIDE_TOP
public static BBjNumber DATA_ITEM_LABEL_POSITION_OUTSIDE_TOP
public static BBjNumber DATA_ITEM_LABEL_POSITION_INSIDE_BOTTOM
public static BBjNumber DATA_ITEM_LABEL_POSITION_OUTSIDE_BOTTOM
public static BBjNumber DATA_ITEM_LABEL_POSITION_INSIDE_LEFT
public static BBjNumber DATA_ITEM_LABEL_POSITION_OUTSIDE_LEFT
public static BBjNumber DATA_ITEM_LABEL_POSITION_INSIDE_RIGHT
public static BBjNumber DATA_ITEM_LABEL_POSITION_OUTSIDE_RIGHT
public static BBjNumber LEGENDSHAPE_CIRCLE
public static BBjNumber LEGENDSHAPE_SQUARE
public static BBjNumber LEGENDSHAPE_RECTANGLE
public static BBjNumber LEGENDSHAPE_ROUNDEDRECTANGLE
public static BBjNumber LEGENDSHAPE_CAPSULE
public static BBjNumber LEGENDSHAPE_ELLIPSE
public static BBjNumber LEGENDSHAPE_DIAMOND
public static BBjNumber ColorThemeGreen
public static BBjNumber ColorThemeRed
public static BBjNumber ColorThemeBlue
public static BBjNumber ColorThemeOrange
public static BBjNumber ColorThemeBrown
public static BBjNumber ColorThemePurple
public static BBjNumber ColorThemeGray
public static BBjNumber ColorThemeCitrus
public static BBjNumber ColorThemeSeaFoam
public static BBjNumber ColorThemeEarthTones1
public static BBjNumber ColorThemeLakeside
public static BBjNumber ColorThemeCoastline
public static BBjNumber ColorThemeBlueFrost
public static BBjNumber ColorThemeLavender
public static BBjNumber ColorThemeSky
public static BBjNumber ColorThemeFlorida
public static BBjNumber ColorThemeMountainSunset
public static BBjNumber ColorThemeColorful1
public static BBjNumber ColorThemeTomorrowLight
public static BBjNumber ColorThemeTomorrowDark
public static BBjNumber ColorThemeWatermelon
public static BBjNumber ColorThemeHeirloom
public static BBjNumber ColorThemeColorful2
public static BBjNumber ColorThemeEarthTones2
public static BBjNumber ColorThemeEarthTones3
public static BBjNumber ColorThemeColorful3
public static BBjNumber ColorThemeColorful4
public static BBjNumber ColorThemeColorful5
public static BBjNumber ColorThemeColorful6
public static BBjNumber ColorThemeColorful7
public static BBjNumber ColorThemeDarkToLight
public static BBjNumber ColorThemeMargarita
public static BBjNumber ColorThemeBlueJewel
public static BBjNumber ColorThemeSandyBeach
public static BBjNumber ColorThemeRooster
public static BBjNumber ColorThemeDismal
public static BBjNumber ColorThemeDeepBlueSea
public static BBjNumber ColorThemeTropicalSunset
public static BBjNumber ColorThemeOliveBranch
public static BBjNumber ColorThemeBamboo
public static BBjNumber ColorThemeBloodOrange
public static BBjNumber ColorThemePeacock
public static BBjNumber ColorThemeEveningThunder
public static BBjNumber ColorThemePurpleBerry
public static BBjNumber ColorThemeDriedRoses
public static BBjNumber ColorThemeRosemary
public static BBjNumber ColorThemeCranberry
public static BBjNumber ColorThemeMistyGarden
public static BBjNumber ColorThemeGrayscaleTransparent
public static BBjNumber ColorThemeBluesAndBrowns
public static BBjNumber ColorThemeDivergentBlueWhiteRed
public static BBjNumber ColorThemeDivergentRedOrangeRed
public static BBjNumber ColorThemeDivergentBlueTanRed
public static BBjNumber ColorThemeDivergentBlueTanGreen
public static BBjNumber ColorThemeBiscayneBay
public static BBjNumber ColorThemeDefault
public static BBjNumber ColorThemeEarlyAmerican
public static BBjNumber ColorThemeCampsite
public static BBjNumber ColorThemeBerryPreserves
public static BBjNumber ColorThemeCranberryTart
public static BBjNumber ColorThemePomegranate
public static BBjNumber ColorThemeBerryTart
public static BBjNumber ColorThemeAntler
public static BBjNumber ColorThemeAntiquePewter
public static BBjNumber ColorThemeChocolateRaspberry
public static BBjNumber ColorThemePowderedCookie
public static BBjNumber ColorThemeWinterRobin
public static BBjNumber ColorThemeBeachStrata
public static BBjNumber ColorThemeFeathers
public static BBjNumber ColorThemeCamo
public static BBjNumber ColorThemeAgate
public static BBjNumber ColorThemeBrownFur
public static BBjNumber ColorThemeBreezy
public static BBjNumber ColorThemePetals
public static BBjNumber ColorThemeCoral
public static BBjNumber ColorThemeMountainMist
public static BBjNumber ColorThemeRope
public static BBjNumber ColorThemeSepia
public static BBjNumber ColorThemeEscape
public static BBjNumber ColorThemeIcyLeaves
public static BBjNumber ColorThemeBlackberries
public static BBjNumber ColorThemeCanary
public static BBjNumber ColorThemeBreezyToo
public static BBjNumber ColorThemeRetro
public static BBjNumber ColorThemeHomestyle
public void setDevicePixelRatio(BBjNumber p_pixelRatio)
setDevicePixelRatio
in class BBjWidget
p_pixelRatio
- A BBjNumber specifying the screen's pixel ratio to use when creating the widget's graphicsBBjWidget's DevicePixelRatio static field variable for more information.
public BBjNumber getDevicePixelRatio()
getDevicePixelRatio
in class BBjWidget
to override the value derived from this method
public void cloneCommonChartWidgetParameters(ChartWidget widget!)
public void refresh()
refresh
in interface RefreshableWidget
public void resize(BBjNumber p_width, BBjNumber p_height)
public BBjNumber isFlat()
public BBjNumber is3D()
public BBjNumber isDataSetEmpty()
The method traverses the underlying dataset to determine if the widget is empty or not, which is slightly different than the getNumRows() method. For example, a PieChartWidget might have 4 slices defined, all with zero values, so the getNumRows() method would return the number 4. However, the isDataSetEmpty() method would return 1, because even though there were four slices all values for the slices were zero. Note that if you change a widget's SQL via the setSQL() method, you would have to execute the refresh() method on the widget before executing this method, otherwise this method will be checking the widget's dataset for the previous SQL statement. Just setting the SQL statement doesn't force the widget to execute the new SQL statement and fill out the dataset, but the refresh() method does do that. This means that you could execute the setSQL() method, the refresh() method, then executing this method would check the result set of the new SQL statement.
public BBjNumber isAreaChart()
public BBjNumber isBarChart()
public BBjNumber isLineChart()
public BBjNumber isPieChart()
public BBjNumber isRingChart()
public BBjNumber isStackedAreaChart()
public BBjNumber isStackedBarChart()
public BBjNumber isStackedPercentageBarChart()
public BBjNumber isXYChart()
public BBjNumber hasLegend()
public void setChartEmptyDisplayImage(BBjString p_imageFile$)
Some charts, like the pie chart, do not display anything at all when the underlying dataset is empty. To avoid the widget from appearing blank, you may specify an image or text that will be placed on top of the empty widget. Note that all chart customizations, such as background images and gradients, will still be honored and the text will be placed on top of the regularly rendered chart.
See Also: ChartWidget::setChartEmptyDisplayText()
p_imageFile$
- A string with the path to an image to display over the empty chart. The path may be fully qualified or rely on the prefix.public void setChartEmptyDisplayText(BBjString p_displayText$)
Some charts, like the pie chart, do not display anything at all when the underlying dataset is empty. To avoid the widget from appearing empty, you may specify an image or text that will be placed on top of the empty widget. Note that all chart customizations, such as background images and gradients, will still be honored and the text will be placed on top of the regularly rendered chart.
See Also: ChartWidget::setChartEmptyDisplayImage()
p_displayText$
- A string with the text to display instead of the empty chartpublic void setChartTitle(BBjString p_chartTitle$)
p_chartTitle$
- A string with the title to be displayed in the chartpublic void setChartTitles(BBjString p_chartTitle$, BBjString p_chartDomainTitle$, BBjString p_chartRangeTitle$)
This can be called at any time on the widget and facilitates changing the titles on a chart in response to a filter or click event which may cause the SQL and data to change. This method may be called on a PieChartWidget as well, but only the main title will be changed.
p_chartTitle$
- A string with the main title to be displayed in the chartp_chartDomainTitle$
- A string with the domain title to be displayed in the chartp_chartRangeTitle$
- A string with the range title to be displayed in the chartpublic void setChartPadding(BBjNumber p_top, BBjNumber p_right, BBjNumber p_bottom, BBjNumber p_left)
p_top
- The padding amount for the top of the chart in pixelsp_right
- The padding amount for the right side of the chart in pixelsp_bottom
- The padding amount for the bottom of the chart in pixelsp_left
- The padding amount for the left side of the chart in pixelspublic void setChartDomainAxisMargins(BBjNumber p_lowerMargin, BBjNumber p_upperMargin)
p_lowerMargin
- The lower, or left side in vertical orientation, margin as a percentage of the axis length. For example, 0.05 would indicate a margin that is 5% of the total length.p_upperMargin
- The upper, or right side in vertical orientation, margin as a percentage of the axis length. For example, 0.05 would indicate a margin that is 5% of the total length.public void setChartDomainAxisVisible(BBjNumber p_visible)
p_visible
- A number that indicates the axis visibility. 0 = Invisible, 1 = visible (default)public void setChartDomainAxisTitle(BBjString p_title$)
This can be used to dynamically change the axis title, such as in response to a refresh event. Even if the chart was originally created without this axis title, calling this method will add the title to the chart.
Note that for an XYChartWidget, setting the domain title via setDomainAxisLabels() will override this method.
p_title$
- The new title for the domain axispublic void setChartRangeAxisTitle(BBjString p_title$)
This can be used to dynamically change the axis title, such as in response to a refresh event. Even if the chart was originally created without this axis title, calling this method will add the title to the chart.
p_title$
- The new title for the range axispublic void setChartRangeAxisVisible(BBjNumber p_visible)
p_visible
- A number that indicates the axis visibility. 0 = Invisible, 1 = visible (default)public void setChartRangeAxisMinimumSize(BBjNumber p_minimumSize)
p_minimumSize
- A number that indicates the numeric range that the range axis will span. The number must be greater than 0.public void setChartRangeAxisToCurrencyWithFractionalDigits(BBjNumber p_fractionDigits)
The number of fractional digits will usually be in the range of 0 to 3.
p_fractionDigits
- The number of fractional digits to display. A value of 0 indicates that only integer values will be used, whereas a value of 2 indicates that two fractional digits should be included. This translates to showing pennies when the locale determines that the currency value uses dollars.public void setChartRangeAxisToCurrency()
Use the setChartRangeAxisToCurrencyWithFractionalDigits() method to use a currency format and specify how many fractional digits to display.
public void setChartRangeAxisToPercent()
public BBjNumber getChartRangeAxisToPercent()
When the range axis is set to show values as a percentage, the range values will be multiplied by 100 and the percent sign will be appended to the value.
public BBjNumber getChartRangeAxisToCurrency()
public void setChartRangeAxisUseIntegers(BBjNumber p_useIntegers)
p_useIntegers
- A number that indicates whether to use integers or not. 0 = Standard (default), 1 = Integerspublic void setChartRangeAxisFormat(BBjString p_format$)
Note that this method overrides any other axis formatting such as the setChartRangeAxisToCurrency(), setChartRangeAxisToCurrencyWithFractionalDigits(), and setChartRangeAxisToPercent() methods. To clear this format and use another formatting style like setChartRangeAxisToCurrency(), call this method first specifying an empty string for the p_format$ parameter.
Internally the JFreeCharts use a Java NumberFormatter to define a custom format. This method bridges the gap and allows you to specify a format mask using BBj's masking characters, which will then be converted to a Java NumberFormat automatically. Special mask characters such as #, 0, ., $, and & should be successfully converted. A few of the commonly used special symbols are:
0
Digit#
Digit, zero shows as absent.
Decimal separator,
Grouping separator-
Minus sign%
Multiply by 100 and show as a percentage&
Currency sign'
Escape any of the above special characters''
Single quoteSome examples would be:
widget!.setChartRangeAxisFormat("Total: $##0.00") -> Total: $12.34
widget!.setChartRangeAxisFormat("#0M") -> $123M if the default locale of the JVM yields a dollar sign for the currency symbol
widget!.setChartRangeAxisFormat("#0M") -> €123M if the default locale of the JVM yields a euro for the currency symbol
p_format$
- A string that defines the desired format using BBj's masking characterspublic DecimalFormat getChartRangeAxisFormat()
public void setChartDomainAxisFormat(BBjString p_format$)
Internally the JFreeCharts use a Java NumberFormatter to define a custom format. This method bridges the gap and allows you to specify a format mask using BBj's masking characters, which will then be converted to a Java NumberFormat automatically. Special mask characters such as #, 0, ., $, and & should be successfully converted. A few of the commly used special symbols are:
0
Digit#
Digit, zero shows as absent.
Decimal separator,
Grouping separator-
Minus sign%
Multiply by 100 and show as percentage&
Currency sign'
Escape any of the above special characters''
Single quoteSome examples would be:
widget!.setChartDomainAxisFormat("Total: $##0.00") -> Total: $12.34
widget!.setChartDomainAxisFormat("#0M") -> $123M if the default locale of the JVM yields a dollar sign for the currency symbol
widget!.setChartDomainAxisFormat("#0M") -> €123M if the default locale of the JVM yields a euro for the currency symbol
p_format$
- A string that defines the desired format using BBj's masking characterspublic DecimalFormat getChartDomainAxisFormat()
public void setChartDataItemLabelFormat(BBjString p_customLabelFormat$)
Note that if you provide a format string that results in a label that cannot fit within the data entity, such as a bar in the BarChart, then the label may not be displayed. If this happens, you can either reduce the length of the string, reduce the font size for the chart's labels, or modify the label's placement. To change the label's font size, you can execute the ChartWidget::setChartFontSizes() method, specifying a smaller-than-default value for the label size. For example:
myBarChart!.setChartFontSizes(0, 0, 0, 9, 0, 0, 0)
will only set the label size to 9px while leaving the other chart fonts at their default sizes.
See the related ChartWidget::setChartDataItemLabels() method to modify the label's position.
p_customLabelFormat$
- A string defining the desired label format. The default label format is {2}.
An example label format would be "{2}%" and would display a bar's value as "45%" instead of the default "45"
public void setChartDataItemLabelFormat(BBjString p_customLabelFormat$, NumberFormat p_numberFormat!, NumberFormat p_percentageFormat!)
A sample use case would be:
which would cause the label to display the key followed by the value formatted as currency. That way it would show up in a format similar to:myBarChart!.setChartDataItemLabelFormat("{1}: {2}", java.text.NumberFormat.getCurrencyInstance(), java.text.NumberFormat.getPercentInstance())
If the currency format is not specified, the value would display as "218.0" which does not include the pennies or currency unit.Current: $218.10
Note that if you provide a format string that results in a label that cannot fit within the data entity, such as a bar in the BarChart, then the label may not be displayed. If this happens, you can either reduce the length of the string, reduce the font size for the chart's labels, or modify the label's placement. To change the label's font size, you can execute the ChartWidget::setChartFontSizes() method, specifying a smaller-than-default value for the label size. For example:
myBarChart!.setChartFontSizes(0, 0, 0, 9, 0, 0, 0)
will only set the label size to 9px while leaving the other chart fonts at their default sizes.
See the related ChartWidget::setChartDataItemLabels() method to modify the label's position.
p_customLabelFormat$
- A string defining the desired label format. The default label format is {2}.
An example label format would be "{2}%" and would display a bar's value as "45%" instead of the default "45"
p_numberFormat!
- A NumberFormat object that formats the range value {2} of the dataset entry as a number with the specified format. For an XYChartWidget, this provides the formatter for the x-values {1}.p_percentageFormat!
- A NumberFormat object that formats the range value {2} of the dataset entry as a percentage with the specified format. For an XYChartWidget, this provides the formatter for the y-values {2}.NumberFormat documentation for more information.
,
HTML-formatted sample program,
Downloadable sample programpublic void setChartDataItemLabels(BBjString p_colorHexString$)
This method signature only specifies the label text color and uses default values for the label's position. See the other method signatures to control the label position.
Note that the legacy setLabelsInBarChartColor() method also enables data item labels but uses default positioning and only works with BarCharts.
See the related ChartWidget::setChartDataItemLabelFormat() method to modify the label's formatting.
p_colorHexString$
- A string with a hex description of the color for marker. Example: "#ffccaa" or "#fca"public void setChartDataItemLabels(BBjString p_colorHexString$, BBjNumber p_labelLocation)
This method signature offers a simplified positioning model that places the labels vertically relative to the data item. See the other method signature that offers complete control over the label position but uses the JFreeChart's custom classes for positioning parameters.
Note that the legacy setLabelsInBarChartColor() method also enables data item labels but uses default positioning and only works with BarCharts.
See the related ChartWidget::setChartDataItemLabelFormat() method to modify the label's formatting.
p_colorHexString$
- A string with a hex description of the color for marker. Example: "#ffccaa" or "#fca"p_labelLocation
- The location of the label relative to the data item as defined by one of the following static fields
public void setChartDataItemLabels(BBjString p_colorHexString$, ItemLabelAnchor p_itemLabelAnchor!, TextAnchor p_textAnchor!, TextAnchor p_rotationAnchor!, BBjNumber p_angle)
This method signature offers the developer complete control over the label's position, but uses the JFreeChart's custom classes for positioning. See other method signatures for simplified positioning.
Note that the legacy setLabelsInBarChartColor() method also enables data item labels but uses default positioning and only works with BarCharts.
See the related ChartWidget::setChartDataItemLabelFormat() method to modify the label's formatting.
The rectangle anchor will typically be a value like RectangleAnchor.TOP, RectangleAnchor.CENTER, RectangleAnchor.TOP_LEFT, RectangleAnchor.BOTTOM_RIGHT.
The text anchor will typically be a value like TextAnchor.TOP, TextAnchor.CENTER, TextAnchor.CENTER_LEFT, TextAnchor.CENTER_RIGHT, TextAnchor.TOP_LEFT, TextAnchor.BOTTOM_RIGHT.
p_colorHexString$
- A string with a hex description of the color for marker. Example: "#ffccaa" or "#fca"p_itemLabelAnchor!
- The anchor point for the label's rectangle (passing in null() will use the default of ItemLabelAnchor.CENTER)p_textAnchor!
- The anchor point for the label's text in the rectangle (passing in null() will use the default of TextAnchor.CENTER)p_rotationAnchor!
- The anchor point for the label's rotation (passing in null() will use the default of TextAnchor.CENTER)p_angle
- The angle of rotation in degrees for the label (passing in 0 will result in the default of non-rotated text)public void setChartDomainAxisFontScaling(BBjNumber p_scaleFonts)
p_scaleFonts
- A number that indicates whether to scale the fonts or not. 0 = DoNotScaleFonts, 1 = ScaleFonts (default)public void setChartMaximumDomainLabelWidthRatio(BBjNumber p_widthRatio)
The default is 1.5, and higher values will cause the labels to be more likely to overrun each other instead of being truncated. Values from 1 to 3 should produce reasonably good results
p_widthRatio
- A number that indicates domain width ratiopublic void setChartDomainAxisNumLines(BBjNumber p_numLines)
The default number of lines is one. You can use this method to increase the number of lines available for a domain label. When two or more lines are specified, the label may wrap to fill the available space. Setting this value to an integer greater than one may cause the labels to be wrapped in unexpected places. Note that this only applies to charts that have a domain axes, so it will have no effect on a PieChart, for example.
p_numLines
- An integer that determines the maximum number of lines to use for each label. Possible values are integers greater than zero.public void setUserFontScalingFactor(BBjNumber p_factor)
Specifying a scaling factor less than 1 decreases the fonts. Specifying a scaling factor greater than 1 increases the fonts.
p_factor
- A multiplication factor that will be applied to the base font size. If the base font is 10 points, and p_factor is 1.2, then the resultant base font size will be 12 points.public BBjNumber getUserFontScalingFactor()
BBjNumber
- A multiplication factor that is applied to the base font size. If the base font is 10 points, and p_factor is 1.2, then the resultant base font size will be 12 points.public void setFontScalingFactor(BBjNumber p_factor)
Specifying a scaling factor less than 1 decreases the fonts. Specifying a scaling factor greater than 1 increases the fonts.
p_factor
- A multiplication factor that will be applied to the base font size. If the base font is 10 points, and p_factor is 1.2, then the resultant base font size will be 12 points.public BBjNumber getFontScalingFactor()
BBjNumber
- A multiplication factor that is applied to the base font size. If the base font is 10 points, and p_factor is 1.2, then the resultant base font size will be 12 points.public void setChartFontColor(BBjString p_colorHexString$, BBjNumber p_opacity)
p_shadowHexString$
- A hex color string. An example would be "#ff00cc" or "#f0c"p_opacity
- The desired opacity value (0-1). 0 = Fully Transparent, 1 = Fully Opaque.public void setChartFontColors(BBjString p_colors!, BBjNumber p_opacity)
Note that specifying specific font colors will override any colors that may have been set via the setChartFontColor() method.
Note if you specify an empty string for any element, then the default color will be used for that element. This makes it easy to modify individual element font colors in a single method. For example, the following code will set all fonts to black (hex 0) with an opacity of 50% resulting in a light gray color. The next line will then override those colors and set the title to a dark blue, the domain to a dark red, and the range to a dark green color.
Note that all colors are hex color strings. An example would be "#ff00cc" or "#f0c"widget!.setChartFontColor("#000000", .5) widget!.setChartFontColors("#1a4065, , , , #732626, #267326, ", 0.9)
p_titleColor
- The font color for the titlep_subtitleColor
- The font color for the subtitles (domain/range titles)p_legendItemColor
- The font color for the legend itemsp_labelColor
- The font color for the labels (pie chart labels, and embedded pie or bar chart labels, data item labels for category-based and XYCharts)p_domainItemColor
- The font color for the items on the domain axisp_rangeItemColor
- The font color for the items on the range axisp_annotationColor
- The font color for the annotationspublic void setChartFontSizes(BBjNumber p_titleSize, BBjNumber p_subtitleSize, BBjNumber p_legendItemSize, BBjNumber p_labelSize, BBjNumber p_domainItemSize, BBjNumber p_rangeItemSize, BBjNumber p_annotationSize)
Note that if you specify a font size of 0 for any element, then the default size will be used for that element. This makes it easy to modify individual element font sizes in a single method. For example, the following code will set the domain font size to 10, the range font size to 12, and will leave all other elements at their default font size.
widget!.setChartFontSizes(0, 0, 0, 0, 10, 12, 0)
Note that specifying specific element font sizes will still be affected by any font scaling that may have been set via the setFontScaling()
method.
p_titleSize
- The font size for the titlep_subtitleSize
- The font size for the subtitles (domain/range titles)p_legendItemSize
- The font size for the legend itemsp_labelSize
- The font size for the labels (pie chart labels, and embedded pie or bar chart labels)p_domainItemSize
- The font size for the items on the domain axisp_rangeItemSize
- The font size for the items on the range axisp_annotationSize
- The font size for the annotationspublic void setChartFontStyles(BBjNumber p_titleStyle, BBjNumber p_subtitleStyle, BBjNumber p_legendItemStyle, BBjNumber p_labelStyle, BBjNumber p_domainItemStyle, BBjNumber p_rangeItemStyle, BBjNumber p_annotationStyle)
Because the chart's fonts are ultimately used by the Java JFreeChart library, the values for the possible styles are the same constants used for the Java Font object, which are listed below:
If you specify a font style of -1 for any element in the parameter list, then the default style will be used for that element. This makes it easy to modify individual element font styles in a single method. For example, the following code will set the title font style to ITALIC, the label font to BOLD, and will leave all other elements at their default style.
widget!.setChartFontStyles(BBjFont.FONT_ITALIC, -1, -1, BBjFont.FONT_BOLD, -1, -1, -1)
p_titleStyle
- The font style for the title (-1, 0, 1, or 2)p_subtitleStyle
- The font style for the subtitles (domain/range titles) (-1, 0, 1, or 2)p_legendItemStyle
- The font style for the legend items (-1, 0, 1, or 2)p_labelStyle
- The font style for the labels (pie chart labels, and embedded pie or bar chart labels) (-1, 0, 1, or 2)p_domainItemStyle
- The font style for the items on the domain axis (-1, 0, 1, or 2)p_rangeItemStyle
- The font style for the items on the range axis (-1, 0, 1, or 2)p_annotationStyle
- The font style for the annotations (-1, 0, 1, or 2)public void setChartFontColor(BBjColor p_color!, BBjNumber p_opacity)
p_color!
- A BBjColorp_opacity
- The desired opacity value (0-1). 0 = Fully Transparent, 1 = Fully Opaque.public void setChartFontFile(BBjString p_fontFile$)
This method calls the setChartFontFile() method specifying true for the p_throwError parameter
p_fontFile$
- A string that contains the path to the desired font file.public void setChartFontFile(BBjString p_fontFile$, BBjNumber p_throwError)
You may specify any font given a fully qualified path, a font name or path that can be found via the current PREFIX setting, or any font located in the
The following code sets the widget's font by specifying the name of the font file that's located in the dashboard utility's font directory:
The following code sets the widget's font by specifying the fully qualified font name:
widget!.setChartFontFile("SourceSansPro-Regular.ttf")
widget!.setChartFontFile("/Users/bbj/Fonts/TypewriterKeys.ttf")
p_fontFile$
- A string that contains the path to the desired font file.p_throwError
- A number indicating whether to throw an error if the specified font file is not valid. 0 = No Error, 1 = Throw Errorpublic BBjString getChartFontFile()
public BBjNumber getLegendFontSize()
public void writePNGToServerOnCreation(BBjString p_imageFile$)
p_imageFile$
- A string with the path of the file on the server to which the PNG image is to be writtenpublic void writePNGToServerOnCreation(BBjString p_imageFile$, BBjNumber p_width, BBjNumber p_height)
p_imageFile$
- A string with the path of the file on the server to which the PNG image is to be writtenp_width
- The width in pixels of the desired PNG filep_height
- The height in pixels of the desired PNG filepublic void save()
save
in interface SaveableWidget
public void email(BBjNumber p_parentX, BBjNumber p_parentY, BBjNumber p_parentWidth, BBjNumber p_parentHeight)
email
in interface EmailableWidget
p_parentX
- X location of the parent windowp_parentY
- Y location of the parent windowp_parentWidth
- Width of the parent windowp_parentHeight
- Height of the parent windowpublic void viewData()
viewData
in interface DataFillableWidget
public void exportData(BBjNumber p_parentX, BBjNumber p_parentY, BBjNumber p_parentWidth, BBjNumber p_parentHeight)
exportData
in interface DataFillableWidget
p_parentX
- X location of the parent windowp_parentY
- Y location of the parent windowp_parentWidth
- Width of the parent windowp_parentHeight
- Height of the parent windowpublic BBjNumber getChartWidth()
public BBjNumber getChartHeight()
public void setGradientShadingAmount(BBjNumber p_gradientShadingAmount)
p_gradientShadingAmount
- The gradient amount for shadingpublic static BBjVector getDefaultChartColors()
public void setChartColors(BBjString p_colorDescStart$, BBjString p_colorDescFinish$, BBjNumber p_alphaStart!, BBjNumber p_alphaFinish!)
The colors for the chart are considered to be dynamic, as the number of colors in the range will be regerated whenever the underlying dataset changes, such as in response to a refresh event.
p_colorDescStart$
- A string with a hex description of the starting color for the range of colors. Example: "#ffccaa" or "#fca"p_colorDescFinish$
- A string with a hex description of the last color for the range of colors.p_alphaStart!
- A number from 0-1 that determines the starting opacity level (0 = transparent, 1 = opaque)p_alphaFinish!
- A number from 0-1 that determines the starting opacity level (0 = transparent, 1 = opaque)public void setChartColors(BBjString p_colorDescStart$, BBjString p_colorDescMiddle$, BBjString p_colorDescFinish$, BBjNumber p_alphaStart!, BBjNumber p_alphaMiddle!, BBjNumber p_alphaFinish!)
The colors for the chart are considered to be dynamic, as the number of colors in the range will be regerated whenever the underlying dataset changes, such as in response to a refresh event.
p_colorDescStart$
- A string with a hex description of the starting color for the range of colors. Example: "#ffccaa" or "#fca"p_colorDescFinish$
- A string with a hex description of the last color for the range of colors.p_alphaStart!
- A number from 0-1 that determines the starting opacity level (0 = transparent, 1 = opaque)p_alphaFinish!
- A number from 0-1 that determines the starting opacity level (0 = transparent, 1 = opaque)public void setChartColors(BBjNumber p_numColors, BBjString p_colorDescStart$, BBjString p_colorDescFinish$, BBjNumber p_alphaStart!, BBjNumber p_alphaFinish!)
p_numColors
- The number of colors in the vectorp_colorDescStart$
- A string with a hex description of the starting color for the range of colors. Example: "#ffccaa" or "#fca"p_colorDescFinish$
- A string with a hex description of the last color for the range of colors.p_alphaStart!
- A number from 0-1 that determines the starting opacity level (0 = transparent, 1 = opaque)p_alphaFinish!
- A number from 0-1 that determines the starting opacity level (0 = transparent, 1 = opaque)public void setChartColors(BBjNumber p_numColors, Color p_colorStart!, Color p_colorFinish!)
p_numColors
- The number of colors in the vectorp_colorStart!
- A Java Color to be used as the starting color for the range of colors.p_colorFinish!
- A Java Color to be used as the last color for the range of colors.public void setChartColors(BBjString p_colors!)
p_colors!
- A comma delimited string of hex descriptions of the range of colors. Ex: "#000000, #ffcc00, #ffffff".public void setChartColors(BBjString p_colors!, BBjNumber p_opacity)
p_colors!
- A comma delimited string of hex descriptions of the range of colors. Ex: "#000000, $ffcc00, #ffffff".p_opacity
- A number from 0-1 that determines the starting opacity level for all colors (0 = transparent, 1 = opaque)public void setChartColors(BBjVector p_colors!)
p_colors!
- A vector filled with Java Color objectsColor documentation for more information.
public void setChartColorTheme(BBjNumber p_colorThemeIndex)
p_colorThemeIndex
- The number of the color theme to apply to the chartpublic void restoreCustomColorTheme()
public void setChartRangeColors(BBjString p_colorDescStart$, BBjString p_colorDescFinish$, BBjNumber p_alphaStart!, BBjNumber p_alphaFinish!)
p_colorDescStart$
- A string with a hex description of the starting color for the range of colors. Example: "#ffccaa" or "#fca"p_colorDescFinish$
- A string with a hex description of the last color for the range of colors.p_alphaStart!
- A number from 0-1 that determines the starting opacity level (0 = transparent, 1 = opaque)p_alphaFinish!
- A number from 0-1 that determines the starting opacity level (0 = transparent, 1 = opaque)public void setChartRangeColors(BBjString p_colors!)
p_colors!
- A comma delimited string of hex descriptions of the range of colors. Ex: "#000000, $ffcc00, #ffffff".public void setChartRangeColors(BBjString p_colors!, BBjNumber p_opacity)
p_colors!
- A comma delimited string of hex descriptions of the range of colors. Ex: "#000000, $ffcc00, #ffffff".p_opacity
- A number from 0-1 that determines the starting opacity level for all colors (0 = transparent, 1 = opaque)public void setChartRangeColors(BBjVector p_colors!)
p_colors!
- A BBjVector filled with Java Color objectspublic void setChartBackgroundGradient(BBjString p_colors!, BBjNumber p_orientation)
p_colors!
- A comma delimited string of hex descriptions of the range of colors. The colors go from top to bottom, or left to right, depending on the orientation. Ex: "#000000, $ffcc00, #ffffff".p_orientation
- The gradient's orientation, same as the charts: ORIENTATION_VERTICAL = 0, ORIENTATION_HORIZONTAL = 1.public void setChartBackground(BBjNumber p_red, BBjNumber p_green, BBjNumber p_blue, BBjNumber p_opacity)
p_red
- The Red value for the color (0-1)p_green
- The Green value for the color (0-1)p_blue
- The Blue value for the color (0-1)p_opacity
- The desired opacity value for the color (0-1). 0 = Fully Transparent, 1 = Fully Opaque.public void setChartBackground(BBjString p_colorHexString$, BBjNumber p_opacity)
p_colorHexString$
- A hex color string. An example would be "#ff00cc" or "#f0c"p_opacity
- The desired opacity value for the color (0-1). 0 = Fully Transparent, 1 = Fully Opaque.public void setChartBackground(Paint p_paint!)
p_paint!
- A java.awt.paint objectPaint documentation for more information.
public void setChartLegendShapeRadius(BBjNumber p_radius)
p_radius
- The circle's radius in pixelspublic void setChartLegendShapeRadiusScalingFactor(BBjNumber p_factor)
Specifying a scaling factor less than 1 decreases the size of the legend shapes. Specifying a scaling factor greater than 1 increases size of the legend shapes. Note that the legend shape must be an integer, although the scaling factor does not need to be an integer. This means that you may provide a floating point scaling factor, but the final shape radius will be rounded to the nearest integer.
p_factor
- The amount to scale the legend shape radius by. Values <1 make it smaller and values >1 make it bigger.public void setChartLegendShape(BBjNumber p_shape, BBjNumber p_outlineWidth, Color p_outlineColor!)
Note that due to the underlying JFreeChart implementation, this method works on all chart types EXCEPT for PieCharts and charts that extend a PieChart, such as a RingChart.
The possible values for the shape are
A sample use case would be to set the shape to a Capsule with a 2 pixel red border:
barChartWidget!.setChartLegendShape(ChartWidget.getLEGENDSHAPE_CAPSULE(), 2, ChartWidget.getJavaColor("#ff0000"))
p_shape
- The legend's shape (a constant defined in the ChartWidget class)p_outlineWidth
- The stroke, or outline width of the shape in pixelsp_outlineColor!
- The Java Color used to paint the shape's outlinepublic void setChartLegendShape(BBjNumber p_shape, BBjNumber p_outlineWidth, BBjString p_colorHexString$, BBjNumber p_opacity)
Note that due to the underlying JFreeChart implementation, this method works on all chart types EXCEPT for PieCharts and charts that extend a PieChart, such as a RingChart.
The possible values for the shape are
A sample use case would be to set the shape to a Capsule with a 2 pixel red border:
barChartWidget!.setChartLegendShape(ChartWidget.getLEGENDSHAPE_CAPSULE(), 2, ChartWidget.getJavaColor("#ff0000"))
p_shape
- The legend's shape (a constant defined in the ChartWidget class)p_outlineWidth
- The stroke, or outline width of the shape in pixelsp_colorHexString$
- A hex color string for the shape's outline color. An example would be "#ff00cc" or "#f0c"p_opacity
- The desired opacity value for the outline color (0-1). 0 = Fully Transparent, 1 = Fully Opaque.public void setPlotBackground(BBjNumber p_red, BBjNumber p_green, BBjNumber p_blue, BBjNumber p_opacity)
p_red
- The Red value for the color (0-1)p_green
- The Green value for the color (0-1)p_blue
- The Blue value for the color (0-1)p_opacity
- The desired opacity value for the color (0-1). 0 = Fully Transparent, 1 = Fully Opaque.public void setPlotBackground(BBjString p_colorHexString$, BBjNumber p_opacity)
p_colorHexString$
- A hex color string. An example would be "#ff00cc" or "#f0c"p_opacity
- The desired opacity value for the color (0-1). 0 = Fully Transparent, 1 = Fully Opaque.public void setPlotBackground(Paint p_paint!)
p_paint!
- A java.awt.paint objectPaint documentation for more information.
public void setLegendBackground(BBjString p_colorHexString$, BBjNumber p_opacity)
p_colorHexString$
- A hex color string for the legend background color. An example would be "#ff00cc" or "#f0c"p_opacity
- The desired opacity value for the color (0-1). 0 = Fully Transparent, 1 = Fully Opaque.public void setLegendBackground(Paint p_paint!)
p_paint!
- A java.awt.paint objectPaint documentation for more information.
public void setLegendPosition(RectangleEdge p_side!, HorizontalAlignment p_halign!, VerticalAlignment p_valign!)
Use code like widget!.getSideLeft(), widget!.getHAlignLeft(), widget!.getVAlignTop(), etc.
p_side
- The side of the chart (Top, Left, Bottom, Right)p_halign
- The horizontal alignment (Left, Center, Right)p_valign
- The vertical alignment (Top, Center, Bottom)public void setChartLegendBackground(BBjString p_colorHexString$, BBjNumber p_opacity)
p_colorHexString$
- A hex color string for the legend background color. An example would be "#ff00cc" or "#f0c"p_opacity
- The desired opacity value for the color (0-1). 0 = Fully Transparent, 1 = Fully Opaque.public void setChartLegendFrame(BBjNumber p_width, BBjString p_colorHexString$, BBjNumber p_opacity)
p_width
- The width of the borderp_colorHexString$
- A hex color string for the border color. An example would be "#ff00cc" or "#f0c"p_opacity
- The desired opacity value for the color (0-1). 0 = Fully Transparent, 1 = Fully Opaque.public void setChartLegendPadding(BBjNumber p_top, BBjNumber p_right, BBjNumber p_bottom, BBjNumber p_left)
p_top
- The padding amount for the top of the chart in pixelsp_right
- The padding amount for the right side of the chart in pixelsp_bottom
- The padding amount for the bottom of the chart in pixelsp_left
- The padding amount for the left side of the chart in pixelspublic void setLegendLabelFormat(BBjString p_customLabelFormat$)
p_customLabelFormat$
- A string defining the desired label format
An example label format would be "{0}: {1} ({2})" and would display as "Apple: 40 (40%)"
{0} = The text portion of the dataset entry
{1} = The numeric portion of the dataset entry
{2} = The numeric portion of the dataset entry followed by a percent signpublic void setLegendLabelFormat(BBjString p_customLabelFormat$, NumberFormat p_numberFormat!, NumberFormat p_percentageFormat!)
A sample use case would be:
which would cause the label to display the key followed by the value formatted as currency. That way it would show up in a format similar to:widget!.setLegendLabelFormat("{0}: {1}", java.text.NumberFormat.getCurrencyInstance(), java.text.NumberFormat.getPercentInstance())
If the currency format is not specified, the value would display as "218.0" which does not include the pennies or currency unit.Current: $218.10
p_customLabelFormat$
- A string defining the desired label format
An example label format would be "{0}: {1} ({2})" and would display as "Apple: 40 (40%)"
p_numberFormat!
- A NumberFormat object that formats the numeric portion {1} of the dataset entryp_percentageFormat!
- A NumberFormat object that formats the percentage portion {2} of the dataset entryNumberFormat documentation for more information.
public void addChartRangeMarker(BBjNumber p_value, BBjString p_colorDesc$, BBjNumber p_opacity, BBjString p_label$, BBjString p_labelColorDesc$, BBjNumber p_labelOpacity, RectangleAnchor p_rectangleAnchor!, TextAnchor p_textAnchor!)
This method allows you to add multiple range markers to a chart while specifying the label text and position. In contrast, the setChartRangeMarker() methods only allow to you specify a single marker and does not include a label for the marker.
Typically a marker will be drawn by the renderer as a line perpendicular to the range axis, however this is entirely up to the renderer. Note that this does not apply to charts without a range, such as a PieChart or RingChart.
The rectangle anchor will typically be a value like RectangleAnchor.TOP, RectangleAnchor.CENTER, RectangleAnchor.TOP_LEFT, RectangleAnchor.BOTTOM_RIGHT.
The text anchor will typically be a value like TextAnchor.TOP, TextAnchor.CENTER, TextAnchor.CENTER_LEFT, TextAnchor.CENTER_RIGHT, TextAnchor.TOP_LEFT, TextAnchor.BOTTOM_RIGHT.
Note that the range marker label will not display in a 3DLineChart due to a limitation in the underlying JFreeCharts libary. The range marker will still be rendered, but the label will be absent unless it's a different type of category chart.
p_value
- The position (determined by value) at which the marker will be placedp_markerColorDesc$
- A string with a hex description of the color for the marker. Example: "#ffccaa" or "#fca"p_markerOpacity
- A number from 0-1 that determines the starting opacity level (0 = transparent, 1 = opaque)p_label$
- The text for the label that accompanies the markerp_labelColorDesc$
- A string with a hex description of the color for the label. Example: "#ffccaa" or "#fca"p_labelOpacity
- A number from 0-1 that determines the starting opacity level (0 = transparent, 1 = opaque)p_rectangleAnchor!
- The anchor point for the label's rectangle (passing in null() will use the default of RectangleAnchor.CENTER which is horizontally in the middle of the marker)p_textAnchor!
- The anchor point for the label's text in the rectangle (passing in null() will use the default of TextAnchor.TOP_CENTER which is vertically below the marker)public void setChartRangeMarker(BBjNumber p_value, BBjString p_colorDesc$, BBjNumber p_opacity)
Note that the addChartRangeMarker() method allows you to add multiple threshold markers specifying the value, color, label, label color, and label position.
Typically a marker will be drawn by the renderer as a line perpendicular to the range axis, however this is entirely up to the renderer. Note that this does not apply to charts without a range, such as a PieChart or RingChart.
p_value
- The position (determined by value) at which the marker will be placedp_colorDesc$
- A string with a hex description of the color for marker. Example: "#ffccaa" or "#fca"p_opacity
- A number from 0-1 that determines the starting opacity level (0 = transparent, 1 = opaque)public void setChartRangeMarker(BBjNumber p_value, Color p_color!)
Typically a marker will be drawn by the renderer as a line perpendicular to the range axis, however this is entirely up to the renderer. Note that this does not apply to charts without a range, such as a PieChart or RingChart
p_value
- The position (determined by value) at which the marker will be placedp_color
- A Java Color that indicates the marker's colorpublic void addChartDomainMarker(BBjString p_key$, BBjString p_markerColorDesc$, BBjNumber p_markerOpacity, BBjString p_label$, BBjString p_labelColorDesc$, BBjNumber p_labelOpacity, RectangleAnchor p_rectangleAnchor!, TextAnchor p_textAnchor!)
This method allows you to add multiple domain markers to a chart while specifying the label text and position. In contrast, the setChartDomainMarker() methods only allow to you specify a single marker and does not include a label for the marker.
Typically a marker will be drawn by the renderer as a line perpendicular to the domain axis, however this is entirely up to the renderer. Note that this does not apply to charts without a domain, such as a PieChart or RingChart.
The rectangle anchor will typically be a value like RectangleAnchor.TOP, RectangleAnchor.CENTER, RectangleAnchor.TOP_LEFT, RectangleAnchor.BOTTOM_RIGHT.
The text anchor will typically be a value like TextAnchor.TOP, TextAnchor.CENTER, TextAnchor.CENTER_LEFT, TextAnchor.CENTER_RIGHT, TextAnchor.TOP_LEFT, TextAnchor.BOTTOM_RIGHT.
p_key$
- The column key corresponding to the point on the domain at which the marker will be placedp_markerColorDesc$
- A string with a hex description of the color for the marker. Example: "#ffccaa" or "#fca"p_markerOpacity
- A number from 0-1 that determines the starting opacity level (0 = transparent, 1 = opaque)p_label$
- The text for the label that accompanies the markerp_labelColorDesc$
- A string with a hex description of the color for the label. Example: "#ffccaa" or "#fca"p_labelOpacity
- A number from 0-1 that determines the starting opacity level (0 = transparent, 1 = opaque)p_rectangleAnchor!
- The anchor point for the label's rectangle (passing in null() will use the default of RectangleAnchor.CENTER)p_textAnchor!
- The anchor point for the label's text in the rectangle (passing in null() will use the default of TextAnchor.CENTER)public void setChartDomainMarker(BBjString p_key$, BBjString p_colorDesc$, BBjNumber p_opacity, BBjNumber p_markerType)
Note that the addChartDomainMarker() method allows you to add multiple threshold markers specifying the value, color, label, label color, and label position.
Typically a marker will be drawn by the renderer as a line perpendicular to the domain axis, however this is entirely up to the renderer. Note that this does not apply to charts without a domain, such as a PieChart or RingChart
p_key$
- The column key corresponding to the point on the domain at which the marker will be placedp_colorDesc$
- A string with a hex description of the color for marker. Example: "#ffccaa" or "#fca"p_opacity
- A number from 0-1 that determines the starting opacity level (0 = transparent, 1 = opaque)p_markerType
- A number that determines how the marker will be drawn. 0 = Region, 1 = Linepublic void setChartDomainMarker(BBjString p_key$, BBjString p_colorDesc$, BBjNumber p_opacity)
Typically a marker will be drawn by the renderer as a line perpendicular to the domain axis, however this is entirely up to the renderer. Note that this does not apply to charts without a domain, such as a PieChart or RingChart
p_key$
- The column key corresponding to the point on the domain at which the marker will be placedp_colorDesc$
- A string with a hex description of the color for marker. Example: "#ffccaa" or "#fca"p_opacity
- A number from 0-1 that determines the starting opacity level (0 = transparent, 1 = opaque)public void setChartDomainMarker(BBjString p_key$, Color p_color!)
Typically a marker will be drawn by the renderer as a line perpendicular to the domain axis, however this is entirely up to the renderer. Note that this does not apply to charts without a domain, such as a PieChart or RingChart
p_key$
- The column key corresponding to the point on the domain at which the marker will be placedp_color
- A Java Color that indicates the marker's colorpublic void setRangeValues(BBjNumber p_minRangeValue, BBjNumber p_maxRangeValue)
Note that this does not apply to charts without a range, such as a PieChart or RingChart
p_minRangeValue
- The minimum value for the rangep_maxRangeValue
- The maximum value for the rangepublic void setChartBackgroundImage(BBjImage p_image!, BBjNumber p_opacity)
p_image!
- The image to be used for the backgroundp_opacity
- The desired opacity value for the image (0-1). 0 = Fully Transparent, 1 = Fully Opaque.public void setChartBackgroundImage(BBjString p_imageFile$, BBjNumber p_opacity)
p_imageFile$
- A string with the path to the image to be used for the backgroundp_opacity
- The desired opacity value for the image (0-1). 0 = Fully Transparent, 1 = Fully Opaque.public void setPlotBackgroundImage(BBjImage p_image!, BBjNumber p_opacity)
p_image!
- The image to be used for the backgroundp_opacity
- The desired opacity value for the image (0-1). 0 = Fully Transparent, 1 = Fully Opaque.public void setPlotBackgroundImage(BBjString p_imageFile$, BBjNumber p_opacity)
p_imageFile$
- A string with the path to the image to be used for the backgroundp_opacity
- The desired opacity value for the image (0-1). 0 = Fully Transparent, 1 = Fully Opaque.public void setChartPlotShadow(BBjNumber p_size, BBjString p_colorString!, BBjNumber p_opacity, BBjNumber p_distance, BBjNumber p_angle)
Note that this does not work properly with 3DPieCharts as of JFreeCharts 1.0.19
p_size
- The shadow size in pixels which affects the shadows diffusion. Smaller sizes make smaller, more crisp shadows. Larger sizes result in larger, more blurry shadows.p_colorString!
- A string with a hex description of the shadow color. Example: "#ffccaa" or "#fca"p_opacity
- A number from 0-1 that determines the starting opacity level (0 = transparent, 1 = opaque)p_distance
- The shadow offset distance in pixelsp_angle
- The shadow offset angle in degreespublic void showTip(BBjString p_tip$)
This method is called automatically by default when the user left-clicks on a chart if the program hasn't registered a callback for the click event. Note that you can have your program register for the click event, create a custom message for the tip, then use this method to tell the widget to display your custom message.
p_tip$
- The string of text to show in the tippublic void OnClearTip(BBjTimerEvent p_event!)
p_event!
- The BBjTimerEvent that caused this method to executepublic DefaultCategoryDataset getJDBCCategoryDataset(BBjString p_connectString$, BBjString p_sql$)
p_connectString$
- The connection string with which to make the database connectionp_sql$
- The SQL query to executeDefaultCategoryDataset documentation for more information.
public DefaultCategoryDataset getJDBCCategoryDataset(BBjString p_connectString$, BBjString p_sql$, BBjString p_mode$)
p_connectString$
- The connection string with which to make the database connectionp_sql$
- The SQL query to executep_mode$
- A string comprised of a list of properties and values separated by commas that will be passed to the database or JDBC connection at connect time. For example: "USER = myusername, PWD = mypass, AUTOCOMMIT = N"
DefaultCategoryDataset documentation for more information.
public DefaultCategoryDataset getJDBCCategoryDataset(BBjRecordSet p_rs!, BBjVector p_columns!)
p_rs!
- The BBjRecordSet containing the data used to populate the chartp_columns!
- A BBjVector that contains an ordered list of the columns to be used for the charts's data. The entries may be a string corresponding to a field name, or a 0-based index of the column number. If null() is passed in for the p_columns! vector then the first three columns of the BBjRecordSet will be used.DefaultCategoryDataset documentation for more information.
public DefaultPieDataset getJDBCPieDataset(BBjString p_connectString$, BBjString p_sql$)
p_connectString$
- The connection string with which to make the database connectionp_sql$
- The SQL query to executeDefaultPieDataset documentation for more information.
public DefaultPieDataset getJDBCPieDataset(BBjString p_connectString$, BBjString p_sql$, BBjString p_mode$)
p_connectString$
- The connection string with which to make the database connectionp_sql$
- The SQL query to executep_mode$
- A string comprised of a list of properties and values separated by commas that will be passed to the database or JDBC connection at connect time. For example: "USER = myusername, PWD = mypass, AUTOCOMMIT = N"
DefaultPieDataset documentation for more information.
public DefaultPieDataset getJDBCPieDataset(BBjRecordSet p_rs!, BBjVector p_columns!)
p_rs!
- The BBjRecordSet containing the data used to populate the chartp_columns!
- A BBjVector that contains an ordered list of the columns to be used for the charts's data. The entries may be a string corresponding to a field name, or a 0-based index of the column number. If null() is passed in for the p_columns! vector then the first two columns of the BBjRecordSet will be used.DefaultPieDataset documentation for more information.
public void fillJDBCXYSeries(XYSeries p_series!, BBjString p_connectString$, BBjString p_sql$)
p_series!
- The series to be filled with datap_connectString$
- The connection string with which to make the database connectionp_sql$
- The SQL query to executepublic void fillJDBCXYSeries(XYSeries p_series!, BBjString p_connectString$, BBjString p_sql$, BBjString p_mode$)
p_series!
- The series to be filled with datap_connectString$
- The connection string with which to make the database connectionp_sql$
- The SQL query to executep_mode$
- A string comprised of a list of properties and values separated by commas that will be passed to the database or JDBC connection at connect time. For example: "USER = myusername, PWD = mypass, AUTOCOMMIT = N"
public void fillJDBCXYSeries(XYSeries p_series!, BBjRecordSet p_rs!, BBjVector p_columns!)
p_series!
- The series to be filled with datap_rs!
- The BBjRecordSet containing the data used to populate the seriesp_columns!
- A BBjVector that contains an ordered list of the columns to be used for the series data. The entries may be a string corresponding to a field name, or a 0-based index of the column number. If null() is passed in for the p_columns! vector then the first two columns of the BBjRecordSet will be used.public static Font getFont(BBjFont p_font!)
p_font!
- A BBjFontpublic static RadialGradientPaint createRadialGradientPaint(Color p_color1!, Color p_color2!, Point2D p_center!)
p_color1!
- The starting Colorp_color2!
- The ending Colorp_center!
- The center from which the radius extendsRadialGradientPaint documentation for more information.
public static Color darkenColor(Color p_color!, BBjNumber p_fraction)
p_color!
- Color to make darker.p_fraction
- Darkness fraction (0-1).public static Color lightenColor(Color p_color!, BBjNumber p_fraction)
p_color!
- Color to make lighter.p_fraction
- Lightness fraction (0-1).public static Color saturateColor(Color p_color!, BBjNumber p_fraction)
p_color!
- Color to modify.p_fraction
- Saturation fraction (-1 to 1). Negative numbers decrease the saturation while postive numbers increase the saturation.public static void saveColorVectorAsPaletteImage(BBjVector p_colorVector!, BBjString p_outputFilename$, BBjNumber p_width, BBjNumber p_height)
p_colorVector!
- A BBjVector filled with Java Color objects.p_colorVector$
- A string with the filename to be used for the output image file.p_width
- The width of each palette entry in the imagep_height
- The height of each palette entry in the imagepublic static void saveColorThemePaletteImagesToDirectory(BBjString p_outputDirectory$, BBjString p_namePrefix$, BBjNumber p_width, BBjNumber p_height)
p_outputDirectory$
- The path that will be used as the output directory where the images will be saved.p_namePrefix$
- The prefix for the image names. A string that will be used before each theme when naming the images.p_width
- The width of each palette entry in the imagep_height
- The height of each palette entry in the imagepublic static BBjNumber getColorThemeCount()
public static BBjString getColorThemeDescription(BBjNumber p_colorThemeIndex)
p_colorThemeIndex
- The number of the desired color theme for which to return a descriptionpublic static BBjVector getColorTheme(BBjNumber p_colorThemeIndex)
p_colorThemeIndex
- Color theme indexChartWidget.getColorThemeSky() for an example
public static BBjVector makeColorVectorFromCommaDelimitedHexColorString(BBjString p_colorString!)
p_colorString!
- A comma delimited string of hex colors. An example parameter would be "#354751, #6e90b3, #efeeec" or "#345, #69b, #eee"public static BBjVector makeColorVectorFromCommaDelimitedHexColorString(BBjString p_colorString!, BBjNumber p_opacity)
p_colorString!
- A comma delimited string of hex colors. An example parameter would be "#354751, #6e90b3, #efeeec" or "#345, #69b, #eee"p_opacity
- The desired opacity value (0-1). 0 = Fully Transparent, 1 = Fully Opaque.public static Color adjustColorBrightness(Color p_color!, BBjNumber p_fraction)
p_color!
- The Java Color to be modifiedp_fraction
- The amount to lighten or darken the Color. A positive number will lighten the colors, a negative number will darken the colors. Possible values range from -1.0 to 1.0public static Color adjustColorSaturation(Color p_color!, BBjNumber p_fraction)
p_color!
- The Java Color to be modifiedp_fraction
- The amount to saturate the Color. A positive number will increase the saturation, a negative number will decrease the saturation. Possible values range from -1.0 to 1.0public static Color adjustColorOpacity(Color p_color!, BBjNumber p_fraction)
p_color!
- The Java Color to be modifiedp_fraction
- The amount to affec the opacity the Color. A positive number will increase the opacity, a negative number will decrease the opacity. Possible values range from -1.0 to 1.0public static BBjVector adjustColorVectorBrightness(BBjVector p_colorVector!, BBjNumber p_fraction)
p_colorVector!
- A vector filled with Colors to be modifiedp_fraction
- The amount to lighten or darken each Color. A positive number will lighten the colors, a negative number will darken the colors. Possible values range from -1.0 to 1.0public static BBjVector adjustColorVectorSaturation(BBjVector p_colorVector!, BBjNumber p_fraction)
p_colorVector!
- A vector filled with Colors to be modifiedp_fraction
- The amount to saturate each Color. A positive number will increase the saturation, a negative number will decrease the saturation. Possible values range from -1.0 to 1.0public static BBjVector adjustColorVectorOpacity(BBjVector p_colorVector!, BBjNumber p_fraction)
p_colorVector!
- A vector filled with Colors to be modifiedp_fraction
- The amount to adjust the opacity value for each Color. A positive number will increase the opacity (making it more opaque), a negative number will decrease the opacity (making it more transparent). Possible values range from -1.0 to 1.0public static BBjVector adjustColorVectorOpacityToFixedAmount(BBjVector p_colorVector!, BBjNumber p_opacity)
p_colorVector!
- A vector filled with Colors to be modifiedp_opacity
- The desired opacity value (0-1). 0 = Fully Transparent, 1 = Fully Opaque.public static BBjVector makeLargerColorVectorByLightening(BBjVector p_colorVector!, BBjNumber p_size)
p_colorVector!
- A vector filled with Colorsp_size
- The desired number of Colors in the resultant vectorpublic static BBjVector makeLargerColorVectorByDarkening(BBjVector p_colorVector!, BBjNumber p_size)
p_colorVector!
- A vector filled with Colorsp_size
- The desired number of Colors in the resultant vectorpublic static BBjVector makeLargerColorVectorByReducingOpacity(BBjVector p_colorVector!, BBjNumber p_size)
p_colorVector!
- A vector filled with Colorsp_size
- The desired number of Colors in the resultant vectorpublic static BBjVector rotateColorVector(BBjVector p_colorVector!, BBjNumber p_amount)
Supplying a positive number, such as +1, will cause the Colors to be rotated to the right, so the Color that was previously the last Color will now be the first Color. Suppliying a negative number, such as -1, will cause the Colors to be rotated to the left, so the Color that was previously the second Color will now be the first Color.
p_colorVector!
- A vector filled with Colorsp_amount
- The desired number of Colors in the resultant vectorpublic static BBjVector reverseColorVector(BBjVector p_colorVector!)
p_colorVector!
- A vector filled with Colorspublic static BBjVector shuffleColorVector(BBjVector p_colorVector!)
p_colorVector!
- A vector filled with Colorspublic static BBjColor getBBjColor(Color p_color!)
p_color!
- A java.awt.colorpublic static BBjColor getBBjColorWithAlphaFromHexString(BBjString p_colorHexString$, BBjNumber p_opacity)
p_colorHexString$
- A hex color string. An example would be "#ff00cc" or "#f0c"p_opacity
- The desired opacity value (0-1). 0 = Fully Transparent, 1 = Fully Opaque.public static Color getJavaColor(BBjColor p_color!)
p_color!
- A BBjColorpublic static Color getJavaColor(BBjString p_colorHexString$)
p_colorHexString$
- A hex color string. An example would be "#ff00cc" or "#f0c"public static Color getColorWithAlpha(BBjColor p_color!, BBjNumber p_opacity)
p_color!
- A BBjColorp_opacity
- The desired opacity value (0-1). 0 = Fully Transparent, 1 = Fully Opaque.public static Color getColorWithAlpha(Color p_color!, BBjNumber p_opacity)
p_color!
- A Colorp_opacity
- The desired opacity value (0-1). 0 = Fully Transparent, 1 = Fully Opaque.public static Color getColorWithAlphaFromHexString(BBjString p_colorHexString$, BBjNumber p_opacity)
p_colorHexString$
- A hex color string. An example would be "#ff00cc" or "#f0c"p_opacity
- The desired opacity value (0-1). 0 = Fully Transparent, 1 = Fully Opaque.public static BBjString getHexStringFromColor(Color p_color!)
p_color!
- A Java Colorpublic static BBjVector getVectorOfJavaColorsFromHexColorStrings(BBjNumber p_numColors, BBjString p_colorDescStart$, BBjString p_colorDescFinish$, BBjNumber p_alphaStart!, BBjNumber p_alphaFinish!)
p_numColors
- The number of colors in the resultant vectorp_colorDescStart$
- A hex color string of the starting color. An example would be "#ff0000" (Red).p_colorDescFinish$
- A hex color string of the ending color. An example would be "#0000ff" (Blue).p_alphaStart!
- The opacity value (0-1) of the starting colorp_alphaFinish!
- The opacity value (0-1) of the ending colorpublic static BBjVector getVectorOfJavaColorsFromDivergentHexColorStrings(BBjNumber p_numColors, BBjString p_colorDescStart$, BBjString p_colorDescMiddle$, BBjString p_colorDescFinish$, BBjNumber p_alphaStart!, BBjNumber p_alphaMiddle!, BBjNumber p_alphaFinish!)
In order to result in a balanced divergent palette, the p_numColors must be at least 3 and should be an odd number.
p_numColors
- The number of colors in the resultant vectorp_colorDescStart$
- A hex color string of the starting color. An example would be "#ff0000" (Red).p_colorDescMiddle$
- A hex color string of the middle color. An example would be "ffffff" (White).p_colorDescFinish$
- A hex color string of the ending color. An example would be "0000ff" (Blue).p_alphaStart!
- The opacity value (0-1) of the starting colorp_alphaMiddle!
- The opacity value (0-1) of the starting colorp_alphaFinish!
- The opacity value (0-1) of the ending colorpublic static BBjVector getHSBValuesFromRGBColor(Color p_color!)
p_color!
- A Colorpublic static BBjVector getHSLValuesFromRGBColor(Color p_color!)
p_color!
- A Colorpublic static Color getRGBColorFromHSLValues(BBjNumber p_hue, BBjNumber p_saturation, BBjNumber p_lightness)
p_hue
- The hue component of the colorp_saturation
- The saturation component of the colorp_lightness
- The lightness component of the colorpublic static BBjImage createImageFromText(BBjString p_text$, BBjString p_foreColor$, BBjNumber p_foreOpacity, BBjString p_backColor$, BBjNumber p_backOpacity, BBjString p_fontFile$, BBjString p_fontStyle$, BBjNumber p_width, BBjNumber p_height)
This method dynamically determines the best font size to maximize the size of the text given the image's dimensions. You can use a linefeed character ($0A$) to split the text into multiple lines. The text block will be centered both vertically and horizontally in the resultant image.
p_text$
- The text string to drawp_foreColor$
- The foreground color of the resultant text specified as a hex color string. An example would be "#ff00cc" or "#f0c"p_foreOpacity
- The desired opacity value (0-1) of the foreground color. 0 = Fully Transparent, 1 = Fully Opaque.p_backColor$
- The background color of the resultant text specified as a hex color string. An example would be "#ff00cc" or "#f0c"p_backOpacity
- The desired opacity value (0-1) of the background color. 0 = Fully Transparent, 1 = Fully Opaque.p_fontFile$
- The path to the desired font file, ie. System.getProperty("basis.BBjHome") + "/utils/dashboard/fonts/CabinCondensed-Bold.ttf"
p_fontStyle$
- The font's style which is one of the following: BOLD, ITALIC, or PLAINp_width
- The width of the resultant BBjImagep_height
- The height of the resultant BBjImagepublic static BBjImage createImageFromText(BBjString p_text$, BBjNumber p_width, BBjNumber p_height)
This method is used internally to indicate that a widget does not contain any data or has experienced an error. The method uses a default font, foreground color, and background color. It centers the text both vertically and horizontally. It also dynamically determines the best font size to maximize the size of the text given the image's dimensions. You can use a linefeed character ($0A$) to split the text into multiple lines.
p_text$
- The text to display in the imagep_width
- The width of the resultant imagep_height
- The height of the resultant imagepublic static BBjImage createImageFromText(BBjString p_text$, BBjString p_foreColor$, BBjNumber p_foreOpacity, BBjString p_backColor$, BBjNumber p_backOpacity, Font p_font!, BBjNumber p_width, BBjNumber p_height)
You can use a linefeed character ($0A$) to split the text into multiple lines
p_text$
- The text string to drawp_foreColor$
- The foreground color of the resultant text specified as a hex color string. An example would be "#ff00cc" or "#f0c"p_foreOpacity
- The desired opacity value (0-1) of the foreground color. 0 = Fully Transparent, 1 = Fully Opaque.p_backColor$
- The background color of the resultant text specified as a hex color string. An example would be "#ff00cc" or "#f0c"p_backOpacity
- The desired opacity value (0-1) of the background color. 0 = Fully Transparent, 1 = Fully Opaque.p_font!
- The Java Font used to draw the text, which defines the font family, font styles, and font size.p_width
- The width of the resultant BBjImagep_height
- The height of the resultant BBjImagepublic static BBjImage createImageFromText(BBjString p_text$, BBjString p_foreColor$, BBjNumber p_foreOpacity, Font p_font!, BBjNumber p_width, BBjNumber p_height)
You can use a linefeed character ($0A$) to split the text into multiple lines
p_text$
- The text string to drawp_foreColor$
- The foreground color of the resultant text specified as a hex color string. An example would be "#ff00cc" or "#f0c"p_foreOpacity
- The desired opacity value (0-1) of the foreground color. 0 = Fully Transparent, 1 = Fully Opaque.p_font!
- The Java Font used to draw the text, which defines the font family, font styles, and font size.p_width
- The width of the resultant Imagep_height
- The height of the resultant Imagepublic static BBjImage createCombinedImage(BBjImage p_imageBottom!, BBjImage p_imageTop!, BBjNumber p_width, BBjNumber p_height)
p_imageBottom!
- A BBjImage that will be drawn on the bottom of the final imagep_imageTop!
- A BBjImage that will be drawn on the top of the final imagep_width
- The width of the resultant imagep_height
- The height of the resultant imagepublic static BBjImage createCombinedImageWithText(BBjImage p_image!, BBjString p_text$, BBjNumber p_width, BBjNumber p_height)
This is an internal method that's used to draw text (such as the user-settable ErrorDisplayText) over an existing image (such as a partially-filled chart). It's a convenience method that combines calls to the createImageFromText() and createCombinedImage() methods.
p_image!
- An existing BBjImage, such as a chart imagep_text$
- A BBjString of the text to display over the imagep_width
- The width of the resultant imagep_height
- The height of the resultant imagepublic static BBjImage createCombinedImagesWithText(BBjImage p_imageBottom!, BBjImage p_imageMiddle!, BBjString p_text$, BBjNumber p_width, BBjNumber p_height)
This is an internal method that's used to draw text (such as the user-settable ErrorDisplayText) over two existing images (such as a partially-filled chart and default error image). It's a convenience method that combines calls to the createImageFromText() and createCombinedImage() methods.
p_imageBottom!
- A BBjImage that will be drawn on the bottom of the final imagep_imageMiddle!
- A BBjImage that will be drawn over the bottom imagep_text$
- A BBjString of the text to display over the imagesp_width
- The width of the resultant imagep_height
- The height of the resultant imagepublic DataItem getChartDataItemFromPoint(BBjNumber p_x, BBjNumber p_y)
This method is typically used to get information about a data entity in the chart when the user clicks on the chart. Depending on the chart type, it's possible that the provided point will be inside more than one data entity, such as in an AreaChart where the areas overlap one another. This method will return the last entity that matches, but the getChartDataItemsFromPoint() method will return information for all matching entities.
p_x
- The X location in the chartp_y
- The X location in the chartpublic BBjVector getChartDataItemsFromPoint(BBjNumber p_x, BBjNumber p_y)
This method is typically used to get information about a data entity in the chart when the user clicks on the chart. Depending on the chart type, it's possible that the provided point will be inside more than one data entity, such as in an AreaChart where the areas overlap one another. This method will return all matching entities, but the getChartDataItemFromPoint() method will return only the last matching entity.
p_x
- The X location in the chartp_y
- The X location in the chartpublic static void viewCategoryDataSet(DefaultCategoryDataset p_dataset!)
This is primary aimed at debugging by providing a view into what a bar or line chart's dataset looks like.
p_dataset!
- A DefaultCategoryDataset to viewpublic static void viewPieDataSet(DefaultPieDataset p_dataset!)
This is primary aimed at debugging by providing a view into what a pie or ring chart's dataset looks like.
p_dataset!
- A DefaultPieDataset to viewpublic Object getDataset()