public class XYChartWidget extends LineChartWidget
XYChartWidget A Dashboard Utility Widget that displays an XY line chart that can display multiple data series simultaneously
Modifier and Type | Field and Description |
---|---|
static BBjNumber | SHAPE_CIRCLE |
static BBjNumber | SHAPE_DIAGONALCROSS |
static BBjNumber | SHAPE_DIAMOND |
static BBjNumber | SHAPE_DOWNTRIANGLE |
static BBjNumber | SHAPE_RECTANGLE |
static BBjNumber | SHAPE_REGULARCROSS |
static BBjNumber | SHAPE_ROUNDRECTANGLE |
static BBjNumber | SHAPE_UPTRIANGLE |
BASIS_DASHBOARD_UTILITY_FILL_ERROR_ACTION_KEY_NAME$, CachedImage!, DashboardWidget!, FillErrorAction, ON_FILL_ERROR_IGNORE, ON_FILL_ERROR_STOP, ON_FILL_ERROR_WARN, UserData! Fields inherited from class BBjWidget
BASIS_UTILITY_DEVICE_PIXEL_RATIO_KEY_NAME$, DevicePixelRatio! Fields inherited from class ChartWidget
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!
Constructor Summary
Constructors Constructor and Description XYChartWidget(BBjString p_name$, BBjString p_title$, BBjString p_previewText$, BBjString p_previewImage$, BBjString p_chartTitle$, BBjString p_domainTitle$, BBjString p_rangeTitle$, BBjNumber p_orientation, BBjNumber p_legend)
Create an empty XY Chart specifying all parameters to be filled after creation with setSeriesXYValue()
XYChartWidget(BBjString p_name$, BBjString p_title$, BBjString p_previewText$, BBjString p_previewImage$, BBjString p_chartTitle$, BBjString p_domainTitle$, BBjString p_rangeTitle$, BBjNumber p_orientation, BBjNumber p_legend, BBjString p_connectString$, BBjString p_sql$)
Create an SQL-based XY Chart specifying all parameters
XYChartWidget(BBjString p_name$, BBjString p_title$, BBjString p_previewText$, BBjString p_previewImage$, BBjString p_chartTitle$, BBjString p_domainTitle$, BBjString p_rangeTitle$, BBjNumber p_orientation, BBjNumber p_legend, BBjRecordSet p_rs!, BBjVector p_columns!)
Create a BBjRecordSet-based XY Chart specifying all parameters
XYChartWidget(BBjString p_name$, BBjString p_title$, BBjString p_previewText$, BBjString p_previewImage$, BBjString p_chartTitle$, BBjString p_domainTitle$, BBjString p_rangeTitle$, BBjNumber p_orientation, BBjNumber p_legend, BBjString p_connectString$, BBjString p_sql$, BBjString p_mode$)
Create an SQL-based XY Chart specifying all parameters
Method Summary
Methods Modifier and Type Method and Description void
clearDataSet()
Clears the XY chart's underlying dataset. This is typically done in response to a refresh
event, where the dataset is cleared and then repopulated with up-to-date data (via fill() or setSeriesXYValue().
XYChartWidget
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 XYChartWidget
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
fill(BBjString p_connectString$, BBjString p_sql$)
Create an XYSeries based off of the widget name, fill it with data from a query, and add it to the XYSeriesCollection for the chart
void
fill(BBjString p_seriesName$, BBjString p_connectString$, BBjString p_sql$)
Create an XYSeries, fill it with data from a query, and add it to the XYSeriesCollection for the chart
void
fill(BBjString p_seriesName$, BBjString p_connectString$, BBjString p_sql$, BBjString p_mode$)
Create an XYSeries, fill it with data from a query, and add it to the XYSeriesCollection for the chart
void
fill(BBjString p_seriesName$, BBjRecordSet p_rs!, BBjVector p_columns!)
Create an XYSeries, fill it with data from a BBjRecordSet and vector of columns, and add it to the XYSeriesCollection for the chart
org.jfree.data.category.Defaultorg.jfree.data.category.CategoryDataset
getDataset()
Deprecated as of BBj 20.20 - This method used to returns the XYChart's underlying dataset but now returns null() - use the XYChartWidget.getXYDataset()
method instead to get the chart's XYSeriesCollection
Note that PieCharts return a DefaultPieDataset, BarCharts and LineCharts return a DefaultCategoryDataset, and XYCharts return an XYSeriesCollection
BBjNumber
getNumItems()
Gets the number of items in the first series in the chart
BBjNumber
getNumItems(BBjNumber p_series)
Gets the number of items in the chart for a particular series
BBjNumber
getNumRows()
Gets the number of series (number of lines) in the chart
Series
getSeries(BBjString p_seriesName$)
Returns the requested series
BBjString
getSeriesName(BBjNumber p_seriesNumber)
Returns the name of the specified series number associated with the XY Chart
BBjVector
getSeriesNameVector()
Returns the names of the series associated with the XY Chart
BBjNumber
getSeriesNumber(BBjString p_seriesName$)
Returns the number of the specified series name associated with the XY Chart
org.jfree.data.xy.org.jfree.data.xy.XYSeriesCollection
getXYDataset()
Returns the XYChart's underlying dataset, which is a JFreeChart XYSeriesCollection
Note that PieCharts return a DefaultPieDataset, BarCharts and LineCharts return a DefaultCategoryDataset, and XYCharts return an XYSeriesCollection
BBjNumber
isEmpty()
Indicates whether the widget's dataset is empty or not
BBjNumber
isRecordSetBased()
Indicates whether the chart's dataset was built from a BBjRecordSet
BBjNumber
isSQLBased()
Indicates whether the chart'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.
This is executed in response to a refresh event, and the chart is filled with curent data and all customizations are applied
void
removeSeries(BBjString p_seriesName$)
Removes the requested series
void
setDataSetValue(BBjString p_seriesName$, BBjNumber p_xValue, BBjNumber p_yValue)
Add an XY data point to the specified series in the XYSeriesCollection for the chart. This method is the same as setSeriesXYValue(), and exists to be consistent with other chart types.
If the chart has multiple series, they will be rendered in reverse order. So the last series added will be the first series rendered. This matters if you're mixing filled and non-filled series data.
void
setDomainAxisLabelGridBandColor(BBjString p_colorHexString$, BBjNumber p_opacity)
Sets the color and opacity for the grid band that's shown when the chart is configured with a custom domain axis label via the setDomainAxisLabels() method.
void
setDomainAxisLabels(BBjString p_domainAxisTitle$, BBjString p_labels!)
Configure a custom domain title and label set
Important: Note that the new Axis label set dramatically impacts the display of the data. If the dataset
contains 10 items, but the new axis only contains 3 items, then the chart will only show 3 items. If the dataset
contains 10 items, but the new axis contains 20 items, then the right half of the chart will be empty without any
data plotted on it since there is no data that corresponds to the axis item. Also, the new axis items are zero-based,
meaning that your dataset should be adjusted to be zero-based as well. Therefore, if the dataset used values like
2010, 2011, but the new axis used values like "Year 2010, Year 2011", then the plot would be empty. This is because
the plot will now start with the X value of 0 and continue on for as many axis labels you provided. However, the dataset used
values starting with 2010, so they will be rendered out of bounds, and would only show up if you provided more that two thousand axis
label items.
void
setSeriesConfiguration(BBjString p_seriesName$, BBjNumber p_drawLines, BBjNumber p_drawShapes, BBjNumber p_shapeNumber, BBjNumber p_smoothLines, Color p_fillColor!, BBjNumber p_lineWidth, BBjNumber p_shapeSize, BBjNumber p_drawOutline, BBjNumber p_outlineWidth, Color p_outlineColor!)
Configure a series in the XYSeriesCollection for the chart by setting various parameters
void
setSeriesXYValue(BBjString p_seriesName$, BBjNumber p_xValue, BBjNumber p_yValue)
Add an XY data point to the specified series in the XYSeriesCollection for the chart.
If the chart has multiple series, they will be rendered in reverse order. So the last series added will be the first series rendered. This matters if you're mixing filled and non-filled series data.
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
Methods inherited from class BaseWidget
active, destroy, getClientSlash, getFillError, getFillErrorDesc, getImage, getImage, imageFileSaveDialog, isDestroyed, logError, name, previewImage, previewText, setActive, setFillErrorDisplayImage, setFillErrorDisplayText, setLastSaveDir, spacesValid, title
Methods inherited from class BBjWidget
create, destroy, display, getDevicePixelRatio, isDestroyed, logQueryPerformance, resize, setDevicePixelRatio
Methods inherited from class ChartWidget
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, getDataset, 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, refresh, 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, 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, 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
Methods inherited from class LineChartWidget
clearDataSet, clone, create, destroy, fill, fill, fill, getDataset, getNumCols, getNumRows, isDestroyed, isEmpty, isRecordSetBased, isSQLBased, refresh, setChartDomainAxisTitle, setChartRangeAxisTitle, setChartTitles, setCustom3DAxisColor, setDataSetValue, setDomainLabelAngle, setLineShapeRadius, setLineWidth, viewDataSet
public static BBjNumber SHAPE_CIRCLE
public static BBjNumber SHAPE_DIAGONALCROSS
public static BBjNumber SHAPE_DIAMOND
public static BBjNumber SHAPE_DOWNTRIANGLE
public static BBjNumber SHAPE_RECTANGLE
public static BBjNumber SHAPE_REGULARCROSS
public static BBjNumber SHAPE_ROUNDRECTANGLE
public static BBjNumber SHAPE_UPTRIANGLE
public XYChartWidget(BBjString p_name$, BBjString p_title$, BBjString p_previewText$, BBjString p_previewImage$, BBjString p_chartTitle$, BBjString p_domainTitle$, BBjString p_rangeTitle$, BBjNumber p_orientation, BBjNumber p_legend)
Create an empty XY Chart specifying all parameters to be filled after creation with setSeriesXYValue()
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_domainTitle$
The title for the domain axis (may be empty)p_rangeTitle$
The title for the range axis (may be empty)p_orientation
A number that indicates whether the chart will be in portrait or landscape orientation. Example: orientation=XYChartWidget.getORIENTATION_VERTICAL()p_legend
A number that indicates whether to show a legend for the chart. 0=Do not show legend, 1=Show legendpublic XYChartWidget(BBjString p_name$, BBjString p_title$, BBjString p_previewText$, BBjString p_previewImage$, BBjString p_chartTitle$, BBjString p_domainTitle$, BBjString p_rangeTitle$, BBjNumber p_orientation, BBjNumber p_legend, BBjString p_connectString$, BBjString p_sql$)
Create an SQL-based XY Chart specifying all parameters
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_domainTitle$
The title for the domain axis (may be empty)p_rangeTitle$
The title for the range axis (may be empty)p_orientation
A number that indicates whether the chart will be in portrait or landscape orientation. Example: orientation=XYChartWidget.getORIENTATION_VERTICAL()p_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 xValue, yValue.public XYChartWidget(BBjString p_name$, BBjString p_title$, BBjString p_previewText$, BBjString p_previewImage$, BBjString p_chartTitle$, BBjString p_domainTitle$, BBjString p_rangeTitle$, BBjNumber p_orientation, BBjNumber p_legend, BBjRecordSet p_rs!, BBjVector p_columns!)
Create a BBjRecordSet-based XY Chart specifying all parameters
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_domainTitle$
The title for the domain axis (may be empty)p_rangeTitle$
The title for the range axis (may be empty)p_orientation
A number that indicates whether the chart will be in portrait or landscape orientation. Example: orientation=XYChartWidget.getORIENTATION_VERTICAL()p_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 three columns of the BBjRecordSet will be used. BBjRecordSet
BBjVector
public XYChartWidget(BBjString p_name$, BBjString p_title$, BBjString p_previewText$, BBjString p_previewImage$, BBjString p_chartTitle$, BBjString p_domainTitle$, BBjString p_rangeTitle$, BBjNumber p_orientation, BBjNumber p_legend, BBjString p_connectString$, BBjString p_sql$, BBjString p_mode$)
Create an SQL-based XY Chart specifying all parameters
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_domainTitle$
The title for the domain axis (may be empty)p_rangeTitle$
The title for the range axis (may be empty)p_orientation
A number that indicates whether the chart will be in portrait or landscape orientation. Example: orientation=XYChartWidget.getORIENTATION_VERTICAL()p_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 xValue, yValue.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"
BBj 16.00
public void clearDataSet()
Clears the XY chart's underlying dataset. This is typically done in response to a refresh event, where the dataset is cleared and then repopulated with up-to-date data (via fill() or setSeriesXYValue().
public XYChartWidget 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
public void create(BBjChildWindow p_widgetControlWindow!)
Creates the XYChartWidget
p_widgetControlWindow!
The BBjChildWindow that will contain the widgetpublic 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
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 fill(BBjString p_connectString$, BBjString p_sql$)
Create an XYSeries based off of the widget name, fill it with data from a query, and add it to the XYSeriesCollection for the chart
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 xValue, yValue.public void fill(BBjString p_seriesName$, BBjString p_connectString$, BBjString p_sql$)
Create an XYSeries, fill it with data from a query, and add it to the XYSeriesCollection for the chart
p_seriesName$
The unique name of the XYSeries to add to the chart. Subsequent calls to get or set data in the series will use this name to identify it.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 xValue, yValue.public void fill(BBjString p_seriesName$, BBjString p_connectString$, BBjString p_sql$, BBjString p_mode$)
Create an XYSeries, fill it with data from a query, and add it to the XYSeriesCollection for the chart
p_seriesName$
The unique name of the XYSeries to add to the chart. Subsequent calls to get or set data in the series will use this name to identify it.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 xValue, yValue.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"
BBj 16.00
public void fill(BBjString p_seriesName$, BBjRecordSet p_rs!, BBjVector p_columns!)
Create an XYSeries, fill it with data from a BBjRecordSet and vector of columns, and add it to the XYSeriesCollection for the chart
p_seriesName$
The unique name of the XYSeries to add to the chart. Subsequent calls to get or set data in the series will use this name to identify it.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.public org.jfree.data.category.Defaultorg.jfree.data.category.CategoryDataset getDataset()
Deprecated as of BBj 20.20 - This method used to returns the XYChart's underlying dataset but now returns null() - use the XYChartWidget.getXYDataset()
method instead to get the chart's XYSeriesCollection
Note that PieCharts return a DefaultPieDataset, BarCharts and LineCharts return a DefaultCategoryDataset, and XYCharts return an XYSeriesCollection
XYChartWidget.getXYDataset()
method instead to get the chart's XYSeriesCollection As of BBj 20.20, replaced by XYChartWidget.getXYDataset()
.
public BBjNumber getNumItems()
Gets the number of items in the first series in the chart
public BBjNumber getNumItems(BBjNumber p_series)
Gets the number of items in the chart for a particular series
p_series
The series to query Oracle's Paint documentation for more information.
public BBjNumber getNumRows()
Gets the number of series (number of lines) in the chart
public Series getSeries(BBjString p_seriesName$)
Returns the requested series
p_seriesName
Name of the series to returnpublic BBjString getSeriesName(BBjNumber p_seriesNumber)
Returns the name of the specified series number associated with the XY Chart
public BBjVector getSeriesNameVector()
Returns the names of the series associated with the XY Chart
public BBjNumber getSeriesNumber(BBjString p_seriesName$)
Returns the number of the specified series name associated with the XY Chart
public org.jfree.data.xy.org.jfree.data.xy.XYSeriesCollection getXYDataset()
Returns the XYChart's underlying dataset, which is a JFreeChart XYSeriesCollection
Note that PieCharts return a DefaultPieDataset, BarCharts and LineCharts return a DefaultCategoryDataset, and XYCharts return an XYSeriesCollection
JFreeChart's XYSeriesCollection documentation for more information.
BBj 20.20
public BBjNumber isEmpty()
Indicates whether the widget's dataset is empty or not
BBj 16.00
public BBjNumber isRecordSetBased()
Indicates whether the chart's dataset was built from a BBjRecordSet
public BBjNumber isSQLBased()
Indicates whether the chart's dataset was built from an SQL query
public void refresh()
Refreshes the chart, which results in the widget showing an up-to-date version of the chart. This is executed in response to a refresh event, and the chart is filled with curent data and all customizations are applied
public void removeSeries(BBjString p_seriesName$)
Removes the requested series
p_seriesName
Name of the series to removepublic void setDataSetValue(BBjString p_seriesName$, BBjNumber p_xValue, BBjNumber p_yValue)
Add an XY data point to the specified series in the XYSeriesCollection for the chart. This method is the same as setSeriesXYValue(), and exists to be consistent with other chart types.
If the chart has multiple series, they will be rendered in reverse order. So the last series added will be the first series rendered. This matters if you're mixing filled and non-filled series data.
p_seriesName$
The unique name of the XYSeries to add the data to. If the series does not exist in the DataSet it will be added automatically.p_xValue
The X value of the data point.p_yValue
The Y value of the data point.public void setDomainAxisLabelGridBandColor(BBjString p_colorHexString$, BBjNumber p_opacity)
Sets the color and opacity for the grid band that's shown when the chart is configured with a custom domain axis label via the setDomainAxisLabels() method.
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 setDomainAxisLabels(BBjString p_domainAxisTitle$, BBjString p_labels!)
Configure a custom domain title and label set
Important: Note that the new Axis label set dramatically impacts the display of the data. If the dataset contains 10 items, but the new axis only contains 3 items, then the chart will only show 3 items. If the dataset contains 10 items, but the new axis contains 20 items, then the right half of the chart will be empty without any data plotted on it since there is no data that corresponds to the axis item. Also, the new axis items are zero-based, meaning that your dataset should be adjusted to be zero-based as well. Therefore, if the dataset used values like 2010, 2011, but the new axis used values like "Year 2010, Year 2011", then the plot would be empty. This is because the plot will now start with the X value of 0 and continue on for as many axis labels you provided. However, the dataset used values starting with 2010, so they will be rendered out of bounds, and would only show up if you provided more that two thousand axis label items.
p_domainAxisTitle$
The new domain axis title stringp_labels!
A comma separated string of values for the labels that will be distributed along the domain axispublic void setSeriesConfiguration(BBjString p_seriesName$, BBjNumber p_drawLines, BBjNumber p_drawShapes, BBjNumber p_shapeNumber, BBjNumber p_smoothLines, Color p_fillColor!, BBjNumber p_lineWidth, BBjNumber p_shapeSize, BBjNumber p_drawOutline, BBjNumber p_outlineWidth, Color p_outlineColor!)
Configure a series in the XYSeriesCollection for the chart by setting various parameters
p_seriesName$
The unique name of the XYSeries to add the data to. If the series does not exist in the DataSet it will be added automatically.p_drawLines
Inticates whether to draw the lines between data points. 0=NoLines, 1=Linesp_drawShapes
Inticates whether to draw shapes (circles) around the data points. 0=NoShapes, 1=Shapesp_shapeNumber
Indicates the type of shape to drawp_smoothLines
Indicates that the series line should be drawn as smooth curves or straight lines between data points. 0=StraightLines, 1=SmoothCurves.p_fillColor!
For smooth lines, this is the fill color underneath the curve. For straight lines, it is the fill color of the shapes.p_lineWidth
The width of the series line.p_shapeSize
The size of the shape (circle radius) around the data pointp_drawOutline
Indicates whether to draw an outline around the shape or not. 0=NoOutline, 1=Outline.p_outlineWidth
The width of the shape's outline.p_outlineColor!
The Color of the shape outline.public void setSeriesXYValue(BBjString p_seriesName$, BBjNumber p_xValue, BBjNumber p_yValue)
Add an XY data point to the specified series in the XYSeriesCollection for the chart.
If the chart has multiple series, they will be rendered in reverse order. So the last series added will be the first series rendered. This matters if you're mixing filled and non-filled series data.
p_seriesName$
The unique name of the XYSeries to add the data to. If the series does not exist in the DataSet it will be added automatically.p_xValue
The X value of the data point.p_yValue
The Y value of the data point.public 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