public class PieChartWidget extends ChartWidget
Modifier and Type | Field and Description |
---|---|
BBjVector |
Columns!
A vector of columns indicating which fields in the BBjRecordSet will be used to provide data for the widget
|
BBjString |
ConnectString$
A JDBC connect string used to connect to the database
|
BBjNumber |
IsCircular
A number indicating whether the pie chart is circular or stretched into an elliptical shape
|
BBjNumber |
NumSlices
A number indicating the number of slices in the pie chart
|
BBjRecordSet |
RecordSet!
A BBjRecordSet used to provide data for the widget
|
BBjString |
SQL$
A SQL query used to provide data for the widget
|
BBjNumber |
StartAngle
A number indicating the starting angle of the pie chart.
|
ColorThemeAgate, ColorThemeAntiquePewter, ColorThemeAntler, ColorThemeBamboo, ColorThemeBeachStrata, ColorThemeBerryPreserves, ColorThemeBerryTart, ColorThemeBiscayneBay, ColorThemeBlackberries, ColorThemeBloodOrange, ColorThemeBlue, ColorThemeBlueFrost, ColorThemeBlueJewel, ColorThemeBluesAndBrowns, ColorThemeBreezy, ColorThemeBreezyToo, ColorThemeBrown, ColorThemeBrownFur, ColorThemeCamo, ColorThemeCampsite, ColorThemeCanary, ColorThemeChocolateRaspberry, ColorThemeCitrus, ColorThemeCoastline, ColorThemeColorful1, ColorThemeColorful2, ColorThemeColorful3, ColorThemeColorful4, ColorThemeColorful5, ColorThemeColorful6, ColorThemeColorful7, ColorThemeCoral, ColorThemeCranberry, ColorThemeCranberryTart, ColorThemeDarkToLight, ColorThemeDeepBlueSea, ColorThemeDefault, ColorThemeDismal, ColorThemeDivergentBlueTanGreen, ColorThemeDivergentBlueTanRed, ColorThemeDivergentBlueWhiteRed, ColorThemeDivergentRedOrangeRed, ColorThemeDriedRoses, ColorThemeEarlyAmerican, ColorThemeEarthTones1, ColorThemeEarthTones2, ColorThemeEarthTones3, ColorThemeEscape, ColorThemeEveningThunder, ColorThemeFeathers, ColorThemeFlorida, ColorThemeGray, ColorThemeGrayscaleTransparent, ColorThemeGreen, ColorThemeHeirloom, ColorThemeHomestyle, ColorThemeIcyLeaves, ColorThemeIndex, ColorThemeLakeside, ColorThemeLavender, ColorThemeMargarita, ColorThemeMistyGarden, ColorThemeMountainMist, ColorThemeMountainSunset, ColorThemeOliveBranch, ColorThemeOrange, ColorThemePeacock, ColorThemePetals, ColorThemePomegranate, ColorThemePowderedCookie, ColorThemePurple, ColorThemePurpleBerry, ColorThemeRed, ColorThemeRetro, ColorThemeRooster, ColorThemeRope, ColorThemeRosemary, ColorThemeSandyBeach, ColorThemeSeaFoam, ColorThemeSepia, ColorThemeSky, ColorThemeTomorrowDark, ColorThemeTomorrowLight, ColorThemeTropicalSunset, ColorThemeWatermelon, ColorThemeWinterRobin, CustomChartColors!, DATA_ITEM_LABEL_POSITION_INSIDE_BOTTOM, DATA_ITEM_LABEL_POSITION_INSIDE_CENTER, DATA_ITEM_LABEL_POSITION_INSIDE_LEFT, DATA_ITEM_LABEL_POSITION_INSIDE_RIGHT, DATA_ITEM_LABEL_POSITION_INSIDE_TOP, DATA_ITEM_LABEL_POSITION_OUTSIDE_BOTTOM, DATA_ITEM_LABEL_POSITION_OUTSIDE_LEFT, DATA_ITEM_LABEL_POSITION_OUTSIDE_RIGHT, DATA_ITEM_LABEL_POSITION_OUTSIDE_TOP, HAlignCenter!, HAlignLeft!, HAlignRight!, LastRenderedImage!, LEGENDSHAPE_CAPSULE, LEGENDSHAPE_CIRCLE, LEGENDSHAPE_DIAMOND, LEGENDSHAPE_ELLIPSE, LEGENDSHAPE_RECTANGLE, LEGENDSHAPE_ROUNDEDRECTANGLE, LEGENDSHAPE_SQUARE, SideBottom!, SideLeft!, SideRight!, SideTop!, TipBackColor$, TipBackColorOpacity, TipDisplayTime, TipForeColor$, TipForeColorOpacity, VAlignBottom!, VAlignCenter!, VAlignTop!
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!
Constructor and Description |
---|
PieChartWidget(BBjString p_name$,
BBjString p_title$,
BBjString p_previewText$,
BBjString p_previewImage$,
BBjString p_chartTitle$,
BBjNumber p_flat,
BBjNumber p_legend)
Create an empty Pie Chart specifying all parameters to be filled after creation with setDataSetValue()
|
PieChartWidget(BBjString p_name$,
BBjString p_title$,
BBjString p_previewText$,
BBjString p_previewImage$,
BBjString p_chartTitle$,
BBjNumber p_flat,
BBjNumber p_legend,
BBjNumber p_numSlices)
Create an empty Pie Chart specifying all parameters to be filled after creation with setDataSetValue()
|
PieChartWidget(BBjString p_name$,
BBjString p_title$,
BBjString p_previewText$,
BBjString p_previewImage$,
BBjString p_chartTitle$,
BBjNumber p_flat,
BBjNumber p_legend,
BBjRecordSet p_rs!,
BBjVector p_columns!)
Create a BBjRecordSet-based Pie Chart specifying all parameters
|
PieChartWidget(BBjString p_name$,
BBjString p_title$,
BBjString p_previewText$,
BBjString p_previewImage$,
BBjString p_chartTitle$,
BBjNumber p_flat,
BBjNumber p_legend,
BBjString p_connectString$,
BBjString p_sql$)
Create an SQL-based Pie Chart specifying all parameters
|
PieChartWidget(BBjString p_name$,
BBjString p_title$,
BBjString p_previewText$,
BBjString p_previewImage$,
BBjString p_chartTitle$,
BBjNumber p_flat,
BBjNumber p_legend,
BBjString p_connectString$,
BBjString p_sql$,
BBjString p_mode$)
Create an SQL-based Pie Chart specifying all parameters
|
Modifier and Type | Method and Description |
---|---|
void |
clearDataSet()
Clears the pie chart's underlying dataset.
|
PieChartWidget |
clone()
An internal method used by the Dashboard class to clone a category widget so that it may be displayed in a popped out window
|
void |
create(BBjChildWindow p_widgetControlWindow!)
Creates the PieChartWidget
|
void |
destroy()
Destroys the PieChartWidget
|
void |
fill(BBjRecordSet p_rs!,
BBjVector p_columns!)
Fills the pie chart's underlying dataset with data from a BBjRecordSet
|
void |
fill(BBjString p_connectString$,
BBjString p_sql$)
Fills the pie chart's underlying dataset with data from an SQL query
|
void |
fill(BBjString p_connectString$,
BBjString p_sql$,
BBjString p_mode$)
Fills the pie chart's underlying dataset with data from an SQL query and a mode string
|
DefaultPieDataset |
getDataset()
Returns the PieChart's underlying dataset, which is a JFreeChart DefaultPieDataset
|
BBjString |
getFormattedValue(BBjNumber p_value!)
Returns a formatted string representation of the value.
|
BBjNumber |
getNumRows()
Returns the number of rows in the pie chart's dataset (or slices in the pie)
|
HashMap |
getResultSet()
Returns the pie chart's underlying dataset as a BBjRecordSet
|
BBjNumber |
isDestroyed()
Returns if the PieChartWidget is destroyed
|
BBjNumber |
isEmpty()
Indicates whether the widget's dataset is empty or not
|
BBjNumber |
isRecordSetBased()
Indicates whether the widget's dataset was built from a BBjRecordSet
|
BBjNumber |
isSQLBased()
Indicates whether the widget's dataset was built from an SQL query
|
void |
refresh()
Refreshes the chart, which results in the widget showing an up-to-date version of the chart.
|
void |
set3dDepthFactor(BBjNumber p_depthFactor)
Sets the pie depth as a percentage of the height of the plot area.
|
void |
setDataSetValue(BBjString p_key$,
BBjNumber p_value)
Adds a new dataset entry to the chart's underlying dataset.
|
void |
setEmbeddedLabels(BBjString p_colorHexString$,
BBjNumber p_opacity)
Turn on simple (embedded) labels.
|
void |
setExplodeAllSlicesPercent(BBjNumber p_percentExplode)
Offset all pie slices by exploding them out from the center of the pie.
|
void |
setExplodePercent(BBjString p_sliceName$,
BBjNumber p_percentExplode)
Offset a pie slice by exploding it out from the center of the pie.
|
void |
setIgnoreZeroValues(BBjNumber p_ignoreZeroValues)
Sets whether the pie chart should ignore entries in the dataset that have a zero value.
|
void |
setLabelBackgroundColor(BBjString p_colorHexString$,
BBjNumber p_opacity)
Sets the label's background color for the pie chart
|
void |
setLabelFormat(BBjString p_customLabelFormat$)
Define a custom label format for the pie chart
|
void |
setLabelFormat(BBjString p_customLabelFormat$,
NumberFormat p_numberFormat!,
NumberFormat p_percentageFormat!)
Define a custom label format for the pie chart by providing a label string and NumberFormatters for the number and percentage fields.
|
void |
setLabelsOff()
Turns off the pie chart's labels (the labels for the pie's slices, not the legend)
|
void |
setPlotPadding(BBjNumber p_padding)
Sets the amount of padding, or space, between the pie plot and the edges of the chart itself.
|
void |
setShadowColor(BBjString p_shadowHexString$,
BBjNumber p_opacity,
BBjNumber p_xOffset,
BBjNumber p_yOffset)
Sets the pie chart's shadow with sharp edges
|
void |
setSliceOutlineColor(BBjString p_colorHexString$,
BBjNumber p_opacity)
Sets the color and opacity for the outline of each pie slice and its corresponding legend item
|
void |
setSliceOutlineWidth(BBjNumber p_width)
Sets the width of the outline for each pie slice and its corresponding legend with the default value set to 1.
|
void |
viewDataSet()
Creates a table representation of the chart's DefaultPieDataset and displays it in a message box.
|
addChartDomainMarker, addChartRangeMarker, adjustColorBrightness, adjustColorOpacity, adjustColorSaturation, adjustColorVectorBrightness, adjustColorVectorOpacity, adjustColorVectorOpacityToFixedAmount, adjustColorVectorSaturation, cloneCommonChartWidgetParameters, createCombinedImage, createCombinedImagesWithText, createCombinedImageWithText, createImageFromText, createImageFromText, createImageFromText, createImageFromText, createRadialGradientPaint, darkenColor, email, exportData, fillJDBCXYSeries, fillJDBCXYSeries, fillJDBCXYSeries, getBBjColor, getBBjColorWithAlphaFromHexString, getChartDataItemFromPoint, getChartDataItemsFromPoint, getChartDomainAxisFormat, getChartFontFile, getChartHeight, getChartRangeAxisFormat, getChartRangeAxisToCurrency, getChartRangeAxisToPercent, getChartWidth, getColorTheme, getColorThemeCount, getColorThemeDescription, getColorWithAlpha, getColorWithAlpha, getColorWithAlphaFromHexString, getDefaultChartColors, getDevicePixelRatio, getFont, getFontScalingFactor, getHexStringFromColor, getHSBValuesFromRGBColor, getHSLValuesFromRGBColor, getJavaColor, getJavaColor, getJDBCCategoryDataset, getJDBCCategoryDataset, getJDBCCategoryDataset, getJDBCPieDataset, getJDBCPieDataset, getJDBCPieDataset, getLegendFontSize, getRGBColorFromHSLValues, getUserFontScalingFactor, getVectorOfJavaColorsFromDivergentHexColorStrings, getVectorOfJavaColorsFromHexColorStrings, hasLegend, is3D, isAreaChart, isBarChart, isDataSetEmpty, isFlat, isLineChart, isPieChart, isRingChart, isStackedAreaChart, isStackedBarChart, isStackedPercentageBarChart, isXYChart, lightenColor, makeColorVectorFromCommaDelimitedHexColorString, makeColorVectorFromCommaDelimitedHexColorString, makeLargerColorVectorByDarkening, makeLargerColorVectorByLightening, makeLargerColorVectorByReducingOpacity, OnClearTip, resize, restoreCustomColorTheme, reverseColorVector, rotateColorVector, saturateColor, save, saveColorThemePaletteImagesToDirectory, saveColorVectorAsPaletteImage, setChartBackground, setChartBackground, setChartBackground, setChartBackgroundGradient, setChartBackgroundImage, setChartBackgroundImage, setChartColors, setChartColors, setChartColors, setChartColors, setChartColors, setChartColors, setChartColors, setChartColorTheme, setChartDataItemLabelFormat, setChartDataItemLabelFormat, setChartDataItemLabels, setChartDataItemLabels, setChartDataItemLabels, setChartDomainAxisFontScaling, setChartDomainAxisFormat, setChartDomainAxisMargins, setChartDomainAxisNumLines, setChartDomainAxisTitle, setChartDomainAxisVisible, setChartDomainMarker, setChartDomainMarker, setChartDomainMarker, setChartEmptyDisplayImage, setChartEmptyDisplayText, setChartFontColor, setChartFontColor, setChartFontColors, setChartFontFile, setChartFontFile, setChartFontSizes, setChartFontStyles, setChartLegendBackground, setChartLegendFrame, setChartLegendPadding, setChartLegendShape, setChartLegendShape, setChartLegendShapeRadius, setChartLegendShapeRadiusScalingFactor, setChartMaximumDomainLabelWidthRatio, setChartPadding, setChartPlotShadow, setChartRangeAxisFormat, setChartRangeAxisMinimumSize, setChartRangeAxisTitle, setChartRangeAxisToCurrency, setChartRangeAxisToCurrencyWithFractionalDigits, setChartRangeAxisToPercent, setChartRangeAxisUseIntegers, setChartRangeAxisVisible, setChartRangeColors, setChartRangeColors, setChartRangeColors, setChartRangeColors, setChartRangeMarker, setChartRangeMarker, setChartTitle, setChartTitles, setDevicePixelRatio, setFontScalingFactor, setGradientShadingAmount, setLegendBackground, setLegendBackground, setLegendLabelFormat, setLegendLabelFormat, setLegendPosition, setPlotBackground, setPlotBackground, setPlotBackground, setPlotBackgroundImage, setPlotBackgroundImage, setRangeValues, setUserFontScalingFactor, showTip, shuffleColorVector, viewCategoryDataSet, viewData, viewPieDataSet, writePNGToServerOnCreation, writePNGToServerOnCreation
display, 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
getColumns, getConnectString, getRecordSet, getSQL
public BBjString ConnectString$
public BBjString SQL$
public BBjRecordSet RecordSet!
public BBjVector Columns!
public BBjNumber NumSlices
public BBjNumber IsCircular
public BBjNumber StartAngle
public PieChartWidget(BBjString p_name$, BBjString p_title$, BBjString p_previewText$, BBjString p_previewImage$, BBjString p_chartTitle$, BBjNumber p_flat, BBjNumber p_legend, BBjNumber p_numSlices)
p_name$
- The unique name of the chart widgetp_title$
- Title which will display in the title barp_previewText$
- A description of the widget used for the preview text in the Customize screen and as the tooltip text on the widget's titlep_previewImage$
- A preview of the chart widget that is shown in the Add/Remove widgets Customize dialogp_chartTitle$
- The title to be displayed above the pie chart (may be empty)p_flat
- A number that indicates whether the chart will be flat or 3D. 0 = 3D, 1 = Flatp_legend
- A number that indicates whether to show a legend for the chart. 0 = Do not show legend, 1 = Show legendp_numSlices
- A number that indicates the total number of slices in the chart after it has been filled with datapublic PieChartWidget(BBjString p_name$, BBjString p_title$, BBjString p_previewText$, BBjString p_previewImage$, BBjString p_chartTitle$, BBjNumber p_flat, BBjNumber p_legend)
p_name$
- The unique name of the chart widgetp_title$
- Title which will display in the title barp_previewText$
- A description of the widget used for the preview text in the Customize screen and as the tooltip text on the widget's titlep_previewImage$
- A preview of the chart widget that is shown in the Add/Remove widgets Customize dialogp_chartTitle$
- The title to be displayed above the pie chart (may be empty)p_flat
- A number that indicates whether the chart will be flat or 3D. 0 = 3D, 1 = Flatp_legend
- A number that indicates whether to show a legend for the chart. 0 = Do not show legend, 1 = Show legendpublic PieChartWidget(BBjString p_name$, BBjString p_title$, BBjString p_previewText$, BBjString p_previewImage$, BBjString p_chartTitle$, BBjNumber p_flat, BBjNumber p_legend, BBjString p_connectString$, BBjString p_sql$)
p_name$
- The unique name of the chart widgetp_title$
- Title which will display in the title barp_previewText$
- A description of the widget used for the preview text in the Customize screen and as the tooltip text on the widget's titlep_previewImage$
- A preview of the chart widget that is shown in the Add/Remove widgets Customize dialogp_chartTitle$
- The title to be displayed above the pie chart (may be empty)p_flat
- A number that indicates whether the chart will be flat or 3D. 0 = 3D, 1 = Flatp_legend
- A number that indicates whether to show a legend for the chart. 0 = Do not show legend, 1 = Show legendp_connectString$
- The connection string to the desired database. Example: "jdbc:basis:localhost?database = ChileCompany&user = admin&password = admin123"p_sql$
- The sql query used to populate the chart. The two columns should be key, value. Example: select salesperson, count(salesperson) from customer group by salespersonpublic PieChartWidget(BBjString p_name$, BBjString p_title$, BBjString p_previewText$, BBjString p_previewImage$, BBjString p_chartTitle$, BBjNumber p_flat, BBjNumber p_legend, BBjString p_connectString$, BBjString p_sql$, BBjString p_mode$)
p_name$
- The unique name of the chart widgetp_title$
- Title which will display in the title barp_previewText$
- A description of the widget used for the preview text in the Customize screen and as the tooltip text on the widget's titlep_previewImage$
- A preview of the chart widget that is shown in the Add/Remove widgets Customize dialogp_chartTitle$
- The title to be displayed above the pie chart (may be empty)p_flat
- A number that indicates whether the chart will be flat or 3D. 0 = 3D, 1 = Flatp_legend
- A number that indicates whether to show a legend for the chart. 0 = Do not show legend, 1 = Show legendp_connectString$
- The connection string to the desired database. Example: "jdbc:basis:localhost?database = ChileCompany&user = admin&password = admin123"p_sql$
- The sql query used to populate the chart. The two columns should be key, value. Example: select salesperson, count(salesperson) from customer group by salespersonp_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 PieChartWidget(BBjString p_name$, BBjString p_title$, BBjString p_previewText$, BBjString p_previewImage$, BBjString p_chartTitle$, BBjNumber p_flat, BBjNumber p_legend, BBjRecordSet p_rs!, BBjVector p_columns!)
p_name$
- The unique name of the chart widgetp_title$
- Title which will display in the title barp_previewText$
- A description of the widget used for the preview text in the Customize screen and as the tooltip text on the widget's titlep_previewImage$
- A preview of the chart widget that is shown in the Add/Remove widgets Customize dialogp_chartTitle$
- The title to be displayed above the pie chart (may be empty)p_flat
- A number that indicates whether the chart will be flat or 3D. 0 = 3D, 1 = Flatp_legend
- A number that indicates whether to show a legend for the chart. 0 = Do not show legend, 1 = Show legendp_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.public PieChartWidget clone()
public BBjNumber isSQLBased()
public BBjNumber isRecordSetBased()
public BBjNumber isEmpty()
public void clearDataSet()
public void setDataSetValue(BBjString p_key$, BBjNumber p_value)
p_key$
- A string that describes the dataset's row, which is used for the pie slice namep_value
- A number that denotes the data value for the specified row (or pie slice)public void fill(BBjString p_connectString$, BBjString p_sql$)
p_connectString$
- The connection string to the desired database. Example: "jdbc:basis:localhost?database = ChileCompany&user = admin&password = admin123"p_sql$
- The sql query used to populate the chart. The two columns should be key, value.public void fill(BBjString p_connectString$, BBjString p_sql$, BBjString p_mode$)
p_connectString$
- The connection string to the desired database. Example: "jdbc:basis:localhost?database = ChileCompany&user = admin&password = admin123"p_sql$
- The sql query used to populate the chart. The two columns should be key, value.p_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 fill(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.public HashMap getResultSet()
public void create(BBjChildWindow p_widgetControlWindow!)
public void refresh()
refresh
in interface RefreshableWidget
refresh
in class ChartWidget
public void setIgnoreZeroValues(BBjNumber p_ignoreZeroValues)
When set to 1, entries with a value of zero will not be displayed in the plot or legend. When set to 0, they will. The default is set to 1, which ignores entries with a zero value.
p_ignoreZeroValues
- A number (0 or 1) that indicates whether entries with a value of zero should be ignored by the pie chart.public void setExplodePercent(BBjString p_sliceName$, BBjNumber p_percentExplode)
p_sliceName$
- The name (or key) of the slice that should be moved outwardp_percentExplode
- A number from 0-1 that determines the amount to be moved out. A value of 0.30 results in moving the slice outward 30% of the available plot space.public void setExplodeAllSlicesPercent(BBjNumber p_percentExplode)
p_percentExplode
- A number from 0-1 that determines the amount to be moved out. A value of 0.30 results in moving the slice outward 30% of the available plot space.public void set3dDepthFactor(BBjNumber p_depthFactor)
public void setLabelsOff()
public void setLabelBackgroundColor(BBjString p_colorHexString$, BBjNumber p_opacity)
p_colorHexString$
- 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 setEmbeddedLabels(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 void setPlotPadding(BBjNumber p_padding)
This controls the space between the edges of the pie plot and the plot area itself (the region where the section labels appear). Increasing the padding will ensure that labels will not be accidentally truncated.
p_padding
- The padding amount as a percentage of the plot as a whole, expressed as a number between 0 and 0.4. 0 = NoPadding, 0.4 = 40% of the plot space will be allocated to padding.setInteriorGap() method documentation for more information.
public void setLabelFormat(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 setLabelFormat(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 BBjString getFormattedValue(BBjNumber p_value!)
The formatting will be the same as specified in the setLabelFormat() method. If the setLabelFormat() method was never called, then the value will simply be converted to a string.
p_value
- The chart's numeric value to be formattedpublic void setSliceOutlineColor(BBjString p_colorHexString$, BBjNumber p_opacity)
p_colorHexString$
- A string with a hex description of the outline color. Example: "#ffccaa" or "#fca"p_opacity
- A number from 0-1 that determines the starting opacity level (0 = transparent, 1 = opaque)public void setSliceOutlineWidth(BBjNumber p_width)
Notes:
p_width
- The width of the outline in pixelspublic void setShadowColor(BBjString p_shadowHexString$, BBjNumber p_opacity, BBjNumber p_xOffset, BBjNumber p_yOffset)
Note that this only appears to work on a flat (non-3D PieChart) as of JFreeCharts 1.0.19 You may want to use setChartPlotShadow() instead as it provides a diffused shadow with more control over the parameters
p_shadowHexString$
- A string with a hex description of the shadow color. Example: "#ffccaa" or "#fca"p_opacity
- A number from 0-1 that determines the opacity level (0 = transparent, 1 = opaque)p_xOffset
- The offset of the shadow in the X directionp_yOffset
- The offset of the shadow in the Y directionpublic BBjNumber getNumRows()
public void viewDataSet()
This is primary aimed at debugging by providing a view into what a pie or ring chart's dataset looks like. A sample use case would be:
When the code is executed, the dashboard utility will display a message box with a tabular view of the chart's datasetmyPieChartWidget!.viewDataSet()
public DefaultPieDataset getDataset()
Note that PieCharts return a DefaultPieDataset, BarCharts and LineCharts return a DefaultCategoryDataset, and XYCharts return an XYSeriesCollection
getDataset
in class ChartWidget
DefaultPieDataset documentation for more information.
public void destroy()
public BBjNumber isDestroyed()
isDestroyed
in interface Widget
isDestroyed
in class BBjWidget