Class FacetChart

All Implemented Interfaces:
HasAttachHandlers, HasHandlers, EventListener, HasVisibility, IsWidget, LogicalStructure, HasChartBackgroundDrawnHandlers, HasChartDrawnHandlers, HasDataLabelClickHandlers, HasDataLabelHoverHandlers, HasLegendClickHandlers, HasLegendHoverHandlers, HasValueClickHandlers, HasZoomChangedHandlers, DataBoundComponent, HasDrawEndHandlers, HasDrawStartHandlers, HasClearHandlers, HasClickHandlers, HasDoubleClickHandlers, HasDragCompleteHandlers, HasDragMoveHandlers, HasDragRepositionMoveHandlers, HasDragRepositionStartHandlers, HasDragRepositionStopHandlers, HasDragResizeMoveHandlers, HasDragResizeStartHandlers, HasDragResizeStopHandlers, HasDragStartHandlers, HasDragStopHandlers, HasDropCompleteHandlers, HasDropHandlers, HasDropMoveHandlers, HasDropOutHandlers, HasDropOverHandlers, HasFetchDataHandlers, HasFocusChangedHandlers, HasHoverHandlers, HasHoverHiddenHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseStillDownHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasMovedHandlers, HasParentMovedHandlers, HasResizedHandlers, HasRightMouseDownHandlers, HasRuleContextChangedHandlers, HasScrolledHandlers, HasShowContextMenuHandlers, HasVisibilityChangedHandlers

HTML5-based charting engine, implementing all chartTypes of the Chart interface.

Can be used directly, or specified as ListGrid.chartConstructor or CubeGrid.chartConstructor.

NOTE: you must load the standard Drawing and Optional Charts modules before you can use FacetChart. Also, the Charts Module is available in Pro Edition or better, please see smartclient.com/product for licensing information.

To create a FacetChart, set facets to an Array of Facet objects describing the chart dimensions and valueProperty to value field name. For example:

  // Creating data
  Record sprRec = new Record();
  sprRec.setAttribute("season", "Spring");
  sprRec.setAttribute("temp", "79");
  Record sumRec = new Record();
  sumRec.setAttribute("season", "Summer");
  sumRec.setAttribute("temp", "102");
  Record autRec = new Record();
  autRec.setAttribute("season", "Autumn");
  autRec.setAttribute("temp", "81");
  Record winRec = new Record();
  winRec.setAttribute("season", "Winter");
  winRec.setAttribute("temp", "59");
  
  // Creating chart
  FacetChart chart = new FacetChart();
  chart.setFacets(new Facet("season", "Season"));
  chart.setValueProperty("temp");
  chart.setData(new Record[]{sprRec, sumRec, autRec, winRec});
  chart.setTitle("Average temperature in Las Vegas");
  

A DataSource may be provided instead of inline data to use the chart as a DataBoundComponent. In this case, facetFields may be provided instead of facets, to specify which DataSource fields to use as the facets. If neither is set, the framework will attempt to auto-derive the facetFields. The valueProperty will also be auto-derived for databound charts if it hasn't been set in the chart instance.

The following SDK examples demonstrate charts with a single facet:

See the following SDK examples for examples of charts with multiple facets:

the Inlined Facet

Having an "inlined facet" is another method to provide data to the chart. In this case each CellRecord contains multiple data values; one facet definition is considered "inlined", meaning that the facetValueIds from this facet appear as properties in each Record, and each such property holds one data value. In this case the singular valueProperty is ignored. For example:

  // Creating data
  CellRecord lvRec = new CellRecord();
  lvRec.setAttribute("spring", "79");
  lvRec.setAttribute("summer", "102");
  lvRec.setAttribute("autumn", "81");
  lvRec.setAttribute("winter", "59");
  
  // Creating inlined facet
  Facet inlinedFacet = new Facet();
  inlinedFacet.setInlinedValues(true);
  inlinedFacet.setValues(
          new FacetValue("spring", "Spring"),
          new FacetValue("summer", "Summer"),
          new FacetValue("autumn", "Autumn"),
          new FacetValue("winter", "Winter")
  );
  
  // Creating chart
  FacetChart chart = new FacetChart();
  chart.setFacets(inlinedFacet);
  chart.setData(new Record[]{lvRec});
  chart.setTitle("Average temperature in Las Vegas");
  
Example with two facets:
  // Creating data
  CellRecord lvRec = new CellRecord();
  lvRec.setAttribute("city", "Las Vegas");
  lvRec.setAttribute("spring", "79");
  lvRec.setAttribute("summer", "102");
  lvRec.setAttribute("autumn", "81");
  lvRec.setAttribute("winter", "59");
  CellRecord nyRec = new CellRecord();
  nyRec.setAttribute("city", "New York");
  nyRec.setAttribute("spring", "60");
  nyRec.setAttribute("summer", "83");
  nyRec.setAttribute("autumn", "66");
  nyRec.setAttribute("winter", "40");
  
  // Creating inlined facet
  Facet inlinedFacet = new Facet();
  inlinedFacet.setInlinedValues(true);
  inlinedFacet.setValues(
          new FacetValue("spring", "Spring"),
          new FacetValue("summer", "Summer"),
          new FacetValue("autumn", "Autumn"),
          new FacetValue("winter", "Winter")
  );
  
  // Creating chart
  FacetChart chart = new FacetChart();
  chart.setFacets(inlinedFacet, new Facet("city", "City"));
  chart.setData(new Record[]{lvRec, nyRec});
  chart.setStacked(false);
  chart.setTitle("Average temperatures");
  

Dual axis or multi-axis charts

FacetChart supports drawing multiple vertical axes. This is commonly used to show values with different units (for example: sales in dollars, total units shipped) and/or very different ranges (for example: gross revenue, profit) on the same chart. Each set of values, referred to as a "metric", gets its own axis and gradation marks.

To use multiple axes, you add an additional facet called the "metric facet" that specifies each axis to be plotted as a facetValueId. The metric facet is an inlined facet, so as with inlined facets in general, each CellRecord has a value for each facetValueId of the metric facet. You then set extraAxisMetrics to the list of metrics that should be plotted as additional axes.

For example, if you were plotting revenue and profit for each month of the year, you would have one facet named "metric" with facetValueIds "revenue" and "profit" and a second facet "month". Each CellRecord would have the revenue and profit for one month, stored under the properties "revenue" and "profit". Setting extraAxisMetrics to ["profit"] would cause profit to be plotted as the second axis. See the Dual Axis SDK sample for an example.

You can have multiple extra axes and the additional axes and gradation tics will be drawn at increasing distances from the chart. By default, the first metric is drawn as a column chart and subsequent metrics are drawn as lines; you can override this via extraAxisSettings. See the 3+ Axes SDK sample for an example of multiple extra axes.

Multi-axis, multi-facet charts are also allowed. Extending the previous example, you might add a new facet "company", for a total of 3 facets. Each CellRecord would have "revenue" and "profit" for one combination of "company" and "month". The default appearance in this case would show revenue as clustered columns (one cluster per month, one column per company) and would show profit as multiple lines (one per company). See the Multi-Series SDK sample for an example of a multi-axis, multi-facet chart.

Mixed plots

In some cases you want to show some data series as one shape and other data series as another shape but use the same axis. This is commonly used when one series is of a fundamentally different kind than the other series (for example, a projection or average) but still has the same scale.

To achieve a mixed plot like this, define it as a multi-axis chart as explained above, but set MetricSettings.showAxis false to avoid a second axis appearing, and set MetricSettings.matchGradations to cause the same gradations to be used for both plots.

See the Mixed Plots SDK example.

Histogram Charts

A "histogram" chart is similar to a stacked "column" chart, showing multiple facet values vertically for each position along the x-axis / data label facet, but instead of each vertical facet value being defined only by a length, a "histogram" chart defines a segment for each, represented by both a start point (the "value property") and an end point (the "endValue metric").

Segments may overlap, with the last segment drawn receiving the highest z-ordering. To override this default behavior, values may be provided using an additional metric - zIndexMetric - whose value must be a non-negative integer no greater than maxDataZIndex.

Scatter Charts

Scatter charts differ from other chart types in that both axes represent continuous numeric data rather than a discrete set of facet values (like months of the year). For this reason Scatter charts use the same concept of a "metric" facet as is used by Dual-Axis charts, where the metric facet is expected to have exactly two metrics: the xAxisMetric and yAxisMetric.

Unlike all other chart types, a scatter plot may be specified with only the metric facet. However one additional facet can be defined, which allows multiple sets of x,y points to be drawn in different colors, analogous to the different colors of a multi-series line chart.

See the Scatter Plot SDK example.

Date values on the X axis

FacetChart also supports scatter charts where the x-axis represents date- or time-valued data and the y-axis represents numeric data, as normal. To enable this mode all records in the data must have values for the facetValueId of the xAxisMetric that are true Date objects, not Strings or nulls. For these charts, vertical lines are drawn to represent a sequence of significant datetime values on the x-axis, such as the first day of the month or week. The mechanism used to select these Dates and format them into the x-axis labels is the same mechanism used by charts with labelCollapseMode set to "time".

Bubble Charts

A "bubble" chart is a type of scatter chart where the size of each rendered data point represents an additional metric value, allowing 3 continuous data values to be visualized together. When using chartType:"Bubble", the additional metric is configured via pointSizeMetric. Points will be sized between the minDataPointSize and maxDataPointSize, optionally with logarithmic scaling. A legend will be included showing how point size represents data values, and a multi-facet Bubble chart can optionally use a different shape for each facetValue via useMultiplePointShapes.

Variable-size points can also be used with other, non-scatter chart types (such as "Line" or "Radar") when showDataPoints is enabled, by setting pointSizeMetric to the FacetValue.id of a facetValue of the metric facet. In this case, a legend for point sizes is not shown by default, but can be enabled via showPointSizeLegend.

Whenever drawing variable size data points, by default, the largest data points are drawn first so that smaller data points are less likely to be completely occluded by larger data points, but this can be disabled by setting autoSortBubblePoints to false. Visual appearance of data points can be further customized by setting the bubbleProperties.

See the Bubble Chart SDK example.

Color Scale Charts

FacetChart supports rendering an additional metric value as the color of each data point. This feature requires that showDataPoints be enabled and is configured via colorScaleMetric. Instead of data points being drawn using a separate color for each facetValue of the legend facet, the data points will be drawn using a color interpolated between the scaleStartColor and scaleEndColor, optionally with logarithmic scaling. A legend is included by default via showColorScaleLegend that shows how the data values are mapped to a color via a gradient over the range of colors used in the chart. Visual appearance of data points in color scale charts can be further customized by setting the bubbleProperties, just as with bubble charts.

Note that when color is being used to show values of the colorScaleMetric then color cannot be used to distinguish between different facetValues. Therefore color scale charts cannot have a (non-metric) legend facet.

See the Color Scale Chart SDK example.

Three-Facet Bar and Column Charts

Bar and Column charts support having three facets declared, unlike most other charts supporting data labels, which only allow two. With three facets, the first two are shown as data label facets, as separate rows of labels, and the third facet is used as the legend facet.

You can use features such as stacking and extra axes with a three-facet Bar or Column chart, but certain chart settings are incompatible:

In addition, with a three-facet chart, you can only call setChartType() to switch between Bar and Column charts. Switching to other types is not supported.

Take a look at this example to see this feature in action.

Notes on printing

FacetCharts support printing on all supported desktop browsers. When using Pro Edition or better with the Smart GWT Server Framework installed, charts can also be exported to PDF via RPCManager.exportContent() or to images via RPCManager.exportImage().

  • Constructor Details

    • FacetChart

      public FacetChart()
    • FacetChart

      public FacetChart(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static FacetChart getOrCreateRef(JavaScriptObject jsObj)
    • changeAutoChildDefaults

      public static void changeAutoChildDefaults(String autoChildName, Canvas defaults)
      Changes the defaults for Canvas AutoChildren named autoChildName.
      Parameters:
      autoChildName - name of an AutoChild to customize the defaults for.
      defaults - Canvas defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties. For usage tips on this param, see SGWTProperties.
      See Also:
    • changeAutoChildDefaults

      public static void changeAutoChildDefaults(String autoChildName, FormItem defaults)
      Changes the defaults for FormItem AutoChildren named autoChildName.
      Parameters:
      autoChildName - name of an AutoChild to customize the defaults for.
      defaults - FormItem defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties. For usage tips on this param, see SGWTProperties.
      See Also:
    • create

      protected JavaScriptObject create()
      Overrides:
      create in class DrawPane
    • setAllowBubbleGradients

      public FacetChart setAllowBubbleGradients(boolean allowBubbleGradients) throws IllegalStateException
      Setting this flag to false prevents the chart from drawing fill gradients into the bubbles of each data point. This flag is required to be set for IE8 and earlier in order to draw bubble charts displaying high volumes of data.
      Parameters:
      allowBubbleGradients - New allowBubbleGradients value. Default value is !(isc.Browser.isIE && isc.Browser.version <= 8)
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getAllowBubbleGradients

      public boolean getAllowBubbleGradients()
      Setting this flag to false prevents the chart from drawing fill gradients into the bubbles of each data point. This flag is required to be set for IE8 and earlier in order to draw bubble charts displaying high volumes of data.
      Returns:
      Current allowBubbleGradients value. Default value is !(isc.Browser.isIE && isc.Browser.version <= 8)
      See Also:
    • setAllowedChartTypes

      public FacetChart setAllowedChartTypes(ChartType... allowedChartTypes)
      Other chart types that the end user will be allowed to switch to, using the built-in context menu.

      The actual list of ChartTypes displayed in the context menu may be a subset of allowedChartTypes, since the FacetChart will automatically disallow certain modes that are clearly invalid, for example, not allowing switching to Pie mode if either canZoom is enabled, or if the chart is multi-axis.

      Parameters:
      allowedChartTypes - New allowedChartTypes value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
    • getAllowedChartTypes

      public ChartType[] getAllowedChartTypes()
      Other chart types that the end user will be allowed to switch to, using the built-in context menu.

      The actual list of ChartTypes displayed in the context menu may be a subset of allowedChartTypes, since the FacetChart will automatically disallow certain modes that are clearly invalid, for example, not allowing switching to Pie mode if either canZoom is enabled, or if the chart is multi-axis.

      Returns:
      Current allowedChartTypes value. Default value is null
    • setAutoRotateLabels

      public FacetChart setAutoRotateLabels(Boolean autoRotateLabels) throws IllegalStateException
      Deprecated.
      As of Smart GWT 9.0 this property is replaced by the property rotateLabels. Setting rotateLabels to "auto" is equivalent to setting autoRotateLabels to true. Setting rotateLabels to "never" is equivalent to setting autoRotateLabels to false.
      Whether to automatically rotate labels if needed in order to make them legible and non-overlapping.
      Parameters:
      autoRotateLabels - New autoRotateLabels value. Default value is true
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getAutoRotateLabels

      public Boolean getAutoRotateLabels()
      Deprecated.
      As of Smart GWT 9.0 this property is replaced by the property rotateLabels. Setting rotateLabels to "auto" is equivalent to setting autoRotateLabels to true. Setting rotateLabels to "never" is equivalent to setting autoRotateLabels to false.
      Whether to automatically rotate labels if needed in order to make them legible and non-overlapping.
      Returns:
      Current autoRotateLabels value. Default value is true
    • setAutoScrollContent

      public FacetChart setAutoScrollContent(boolean autoScrollContent)
      When set to true, introduces scrollbars when this widget is smaller than the specified chart-content minimum width or height. These minimum sizes limit all chart-content, including data and labels, titles and legends.

      See autoScrollData for a means to introduce scrolling according to the data being displayed.

      If this method is called after the component has been drawn/initialized: Sets autoScrollContent and updates the chart.

      Parameters:
      autoScrollContent - whether the chart should automatically show scrollbars when it's size is smaller than the minimum content width or height. Default value is false
      Returns:
      FacetChart instance, for chaining setter calls
    • getAutoScrollContent

      public boolean getAutoScrollContent()
      When set to true, introduces scrollbars when this widget is smaller than the specified chart-content minimum width or height. These minimum sizes limit all chart-content, including data and labels, titles and legends.

      See autoScrollData for a means to introduce scrolling according to the data being displayed.

      Returns:
      Current autoScrollContent value. Default value is false
    • setAutoScrollData

      public FacetChart setAutoScrollData(boolean autoScrollData)
      For some chart-types, should the chart body be automatically expanded and scrollbars introduced according to data?

      When true for a column, histogram, line, or area chart that has facet values displayed along the x-axis, the chart expands horizontally, showing a scroll bar, if that's needed to make room for the facet value labels or, for column and histogram charts, to make space for the minimum configured bar \n thicknesses or the margins between them.

      When true for a Bar chart, expansion and scrollbar are vertical, and also make space for the minimum configured bar thicknesses or the margins between them.

      Note that this feature is incompatible with the following properties:

      If rotateLabels is set to "auto" it will be treated as "never" if autoScrollData has been set. If any of the other properties have non-default values, a warning will be logged and autoScrollData will be disabled. The factors used to drive expansion can be limited by setting AutoScrollDataApproach. You can also enforce a minimum size for the chart-content, and scrollbars will be introduced if this widget shrinks below that size. See autoScrollContent, along with minContentWidth and minContentHeight.

      If this method is called after the component has been drawn/initialized: Sets autoScrollData and updates the chart.
      Parameters:
      autoScrollData - whether chart should automatically expand and show scrollbars to accommodate content. Default value is false
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getAutoScrollData

      public boolean getAutoScrollData()
      For some chart-types, should the chart body be automatically expanded and scrollbars introduced according to data?

      When true for a column, histogram, line, or area chart that has facet values displayed along the x-axis, the chart expands horizontally, showing a scroll bar, if that's needed to make room for the facet value labels or, for column and histogram charts, to make space for the minimum configured bar \n thicknesses or the margins between them.

      When true for a Bar chart, expansion and scrollbar are vertical, and also make space for the minimum configured bar thicknesses or the margins between them.

      Note that this feature is incompatible with the following properties:

      If rotateLabels is set to "auto" it will be treated as "never" if autoScrollData has been set. If any of the other properties have non-default values, a warning will be logged and autoScrollData will be disabled. The factors used to drive expansion can be limited by setting AutoScrollDataApproach. You can also enforce a minimum size for the chart-content, and scrollbars will be introduced if this widget shrinks below that size. See autoScrollContent, along with minContentWidth and minContentHeight.
      Returns:
      Current autoScrollData value. Default value is false
      See Also:
    • setAutoScrollDataApproach

      public FacetChart setAutoScrollDataApproach(AutoScrollDataApproach autoScrollDataApproach)
      If set, overrides the default behavior of autoScrollData, potentially limiting what factors drive the automatic expansion of the chart. (The "both" setting is no different than the default of null.)

      When labels are on the x-axis, and if you're sizing bars very tightly to labels by defining getMinClusterSize(), you may not want label-driven expansion, as the default separation assigned between them is very generous, and is based on the widest labels. (You may also set minLabelGap to gain more control over the separation.)

      If this method is called after the component has been drawn/initialized: Sets AutoScrollDataApproach and updates the chart.

      Parameters:
      autoScrollDataApproach - what should drive horizontal expansion of the chart?. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getAutoScrollDataApproach

      public AutoScrollDataApproach getAutoScrollDataApproach()
      If set, overrides the default behavior of autoScrollData, potentially limiting what factors drive the automatic expansion of the chart. (The "both" setting is no different than the default of null.)

      When labels are on the x-axis, and if you're sizing bars very tightly to labels by defining getMinClusterSize(), you may not want label-driven expansion, as the default separation assigned between them is very generous, and is based on the widest labels. (You may also set minLabelGap to gain more control over the separation.)

      Returns:
      Current autoScrollDataApproach value. Default value is null
      See Also:
    • setAutoSortBubblePoints

      public FacetChart setAutoSortBubblePoints(boolean autoSortBubblePoints) throws IllegalStateException
      Whether to draw data points in order of descending point size so that small values are less likely to be completely occluded by larger values. Set this to false to draw the data points in the same order that they appear in the data.
      Parameters:
      autoSortBubblePoints - New autoSortBubblePoints value. Default value is true
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getAutoSortBubblePoints

      public boolean getAutoSortBubblePoints()
      Whether to draw data points in order of descending point size so that small values are less likely to be completely occluded by larger values. Set this to false to draw the data points in the same order that they appear in the data.
      Returns:
      Current autoSortBubblePoints value. Default value is true
      See Also:
    • setAxisEndValue

      public FacetChart setAxisEndValue(Double axisEndValue) throws IllegalStateException
      End value for the primary axis of the chart.

      If set to an explicit value, this will be respected. If unset, the axis end value will default to a value large enough to the largest data point, rounded up to the nearest (next) gradation.

      For multi-axis charts, Bubble charts, and Scatter charts, the facetChart.axisEndValue affects only the first axis of the chart. End values for other axes of multi-axis charts can be set on a per-axis basis via MetricSettings.xAxisEndValue. For Scatter charts, the xAxisEndValue property must be used to set the end value of the x-axis.

      Note that if this chart's data includes points that fall above this value, they are ommitted and effectively treated as null values. For charts showing a data line, developers may wish to set discontinuousLines to true in this case.

      Parameters:
      axisEndValue - New axisEndValue value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getAxisEndValue

      public Double getAxisEndValue()
      End value for the primary axis of the chart.

      If set to an explicit value, this will be respected. If unset, the axis end value will default to a value large enough to the largest data point, rounded up to the nearest (next) gradation.

      For multi-axis charts, Bubble charts, and Scatter charts, the facetChart.axisEndValue affects only the first axis of the chart. End values for other axes of multi-axis charts can be set on a per-axis basis via MetricSettings.xAxisEndValue. For Scatter charts, the xAxisEndValue property must be used to set the end value of the x-axis.

      Note that if this chart's data includes points that fall above this value, they are ommitted and effectively treated as null values. For charts showing a data line, developers may wish to set discontinuousLines to true in this case.

      Returns:
      Current axisEndValue value. Default value is null
    • setAxisStartValue

      public FacetChart setAxisStartValue(Double axisStartValue) throws IllegalStateException
      Start value for the primary axis of the chart.

      If set to an explicit value, this will be respected. If unset, the axis start value will default to 0, or to a value that makes good use of vertical space based on minDataSpreadPercent.

      For multi-axis charts, Bubble charts, and Scatter charts, the facetChart.axisStartValue affects only the first axis of the chart. Start values for other axes of multi-axis charts can be set on a per-axis basis via MetricSettings.axisStartValue. For Scatter charts, the xAxisStartValue property must be used to set the start value of the x-axis.

      Note that if this chart's data includes points that fall below this value, they are ommitted and effectively treated as null values. For charts showing a data line, developers may wish to set discontinuousLines to true in this case.

      Parameters:
      axisStartValue - New axisStartValue value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getAxisStartValue

      public Double getAxisStartValue()
      Start value for the primary axis of the chart.

      If set to an explicit value, this will be respected. If unset, the axis start value will default to 0, or to a value that makes good use of vertical space based on minDataSpreadPercent.

      For multi-axis charts, Bubble charts, and Scatter charts, the facetChart.axisStartValue affects only the first axis of the chart. Start values for other axes of multi-axis charts can be set on a per-axis basis via MetricSettings.axisStartValue. For Scatter charts, the xAxisStartValue property must be used to set the start value of the x-axis.

      Note that if this chart's data includes points that fall below this value, they are ommitted and effectively treated as null values. For charts showing a data line, developers may wish to set discontinuousLines to true in this case.

      Returns:
      Current axisStartValue value. Default value is null
    • setBackgroundBandProperties

      public FacetChart setBackgroundBandProperties(DrawRect backgroundBandProperties) throws IllegalStateException
      Properties for background band
      Parameters:
      backgroundBandProperties - New backgroundBandProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getBackgroundBandProperties

      public DrawRect getBackgroundBandProperties()
      Properties for background band
      Returns:
      Current backgroundBandProperties value. Default value is null
    • setBandedBackground

      public FacetChart setBandedBackground(Boolean bandedBackground) throws IllegalStateException
      Whether to show alternating color bands in the background of chart. See backgroundBandProperties.
      Parameters:
      bandedBackground - New bandedBackground value. Default value is true
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getBandedBackground

      public Boolean getBandedBackground()
      Whether to show alternating color bands in the background of chart. See backgroundBandProperties.
      Returns:
      Current bandedBackground value. Default value is true
    • setBandedStandardDeviations

      public FacetChart setBandedStandardDeviations(Boolean bandedStandardDeviations) throws IllegalStateException
      Whether to show color bands between the standard deviation lines.

      Standard deviation bands are not available for pie or radar charts.

      Parameters:
      bandedStandardDeviations - New bandedStandardDeviations value. Default value is false
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getBandedStandardDeviations

      public Boolean getBandedStandardDeviations()
      Whether to show color bands between the standard deviation lines.

      Standard deviation bands are not available for pie or radar charts.

      Returns:
      Current bandedStandardDeviations value. Default value is false
      See Also:
      • com.smartgwt.client.widgets.chart.FacetChart#getStandardDeviationBandProperties
    • setBarMargin

      public FacetChart setBarMargin(int barMargin) throws IllegalStateException
      Distance between bars. May be reduced if bars would be smaller than minBarThickness.
      Parameters:
      barMargin - New barMargin value. Default value is 4
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getBarMargin

      public int getBarMargin()
      Distance between bars. May be reduced if bars would be smaller than minBarThickness.
      Returns:
      Current barMargin value. Default value is 4
    • setBarProperties

      public FacetChart setBarProperties(DrawRect barProperties)
      Properties for bar
      Parameters:
      barProperties - New barProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getBarProperties

      public DrawRect getBarProperties()
      Properties for bar
      Returns:
      Current barProperties value. Default value is null
    • setBrightenAllOnHover

      public FacetChart setBrightenAllOnHover(Boolean brightenAllOnHover)
      When highlightDataValues is true, should the whole draw-area of the data-value be brightened by a percentage, or just its border?

      By default, only the border around the draw-area is brightened.

      Only affects Bar, Column, Pie and Doughnut chart-types.

      Parameters:
      brightenAllOnHover - New brightenAllOnHover value. Default value is false
      Returns:
      FacetChart instance, for chaining setter calls
    • getBrightenAllOnHover

      public Boolean getBrightenAllOnHover()
      When highlightDataValues is true, should the whole draw-area of the data-value be brightened by a percentage, or just its border?

      By default, only the border around the draw-area is brightened.

      Only affects Bar, Column, Pie and Doughnut chart-types.

      Returns:
      Current brightenAllOnHover value. Default value is false
    • setBrightenPercent

      public FacetChart setBrightenPercent(int brightenPercent)
      When highlightDataValues is true, sets the percentage by which to brighten filled data-shapes in some chart-types as the mouse is moved over the chart. Affects Bar, Column, Pie and Doughnut charts, and will brighten either the shape's fill-color or its border-color, depending on the value of brightenAllOnHover.

      Valid values are between 0 and 100, inclusive.

      The property default may vary based on the currently loaded skin.

      Parameters:
      brightenPercent - New brightenPercent value. Default value is 30
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getBrightenPercent

      public int getBrightenPercent()
      When highlightDataValues is true, sets the percentage by which to brighten filled data-shapes in some chart-types as the mouse is moved over the chart. Affects Bar, Column, Pie and Doughnut charts, and will brighten either the shape's fill-color or its border-color, depending on the value of brightenAllOnHover.

      Valid values are between 0 and 100, inclusive.

      The property default may vary based on the currently loaded skin.

      Returns:
      Current brightenPercent value. Default value is 30
      See Also:
    • setBubbleHoverMaxDistance

      public FacetChart setBubbleHoverMaxDistance(int bubbleHoverMaxDistance) throws IllegalStateException
      Maximum distance from the *outer radius* of the nearest bubble when hover will be shown.
      Parameters:
      bubbleHoverMaxDistance - New bubbleHoverMaxDistance value. Default value is 50
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getBubbleHoverMaxDistance

      public int getBubbleHoverMaxDistance()
      Maximum distance from the *outer radius* of the nearest bubble when hover will be shown.
      Returns:
      Current bubbleHoverMaxDistance value. Default value is 50
      See Also:
    • setBubbleProperties

      public FacetChart setBubbleProperties(DrawItem bubbleProperties) throws IllegalStateException
      Properties for the shapes displayed around the data points (for example, in a bubble chart).

      When either the pointSizeMetric or the colorScaleMetric is active the default bubbleProperties displays each data points with a linear gradient.

      Parameters:
      bubbleProperties - New bubbleProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getBubbleProperties

      public DrawItem getBubbleProperties()
      Properties for the shapes displayed around the data points (for example, in a bubble chart).

      When either the pointSizeMetric or the colorScaleMetric is active the default bubbleProperties displays each data points with a linear gradient.

      Returns:
      Current bubbleProperties value. Default value is null
      See Also:
    • setCanMoveAxes

      public FacetChart setCanMoveAxes(Boolean canMoveAxes) throws IllegalStateException
      Whether the positions of value axes can be changed. The default is true for charts with three or more vertical, value axes.
      Parameters:
      canMoveAxes - New canMoveAxes value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getCanMoveAxes

      public Boolean getCanMoveAxes()
      Whether the positions of value axes can be changed. The default is true for charts with three or more vertical, value axes.
      Returns:
      Current canMoveAxes value. Default value is null
      See Also:
    • setCanZoom

      public FacetChart setCanZoom(Boolean canZoom) throws IllegalStateException
      Enables "zooming" on the X axis, specifically, only a portion of the overall dataset is shown in the main chart, and a second smaller chart appears with slider controls allowing a range to be selected for display in the main chart.

      A labelCollapseMode is automatically enabled if unset and is based on the type of the first non-null data value.

      Parameters:
      canZoom - New canZoom value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getCanZoom

      public Boolean getCanZoom()
      Enables "zooming" on the X axis, specifically, only a portion of the overall dataset is shown in the main chart, and a second smaller chart appears with slider controls allowing a range to be selected for display in the main chart.

      A labelCollapseMode is automatically enabled if unset and is based on the type of the first non-null data value.

      Returns:
      Current canZoom value. Default value is null
    • setCenterLegend

      public FacetChart setCenterLegend(Boolean centerLegend) throws IllegalStateException
      Deprecated.
      Alignment of legend and title elements is now always relative to the visible chart-width, and not the full scrollable-width, so that both elements are always on-screen for any alignment
      Whether to place the chart legend with respect to the full, scrollable width of the chart when autoScrollData is active. The default of false means that the legend will be placed in the visible, non-overflowed region of the chart, for greater visibility.

      Note that alignment of the legend itself is governed by legendAlign.

      Note that this setting has no impact on axis labeling, which always occurs with respect to the full, expanded width of the chart.

      Parameters:
      centerLegend - New centerLegend value. Default value is false
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getCenterLegend

      public Boolean getCenterLegend()
      Deprecated.
      Alignment of legend and title elements is now always relative to the visible chart-width, and not the full scrollable-width, so that both elements are always on-screen for any alignment
      Whether to place the chart legend with respect to the full, scrollable width of the chart when autoScrollData is active. The default of false means that the legend will be placed in the visible, non-overflowed region of the chart, for greater visibility.

      Note that alignment of the legend itself is governed by legendAlign.

      Note that this setting has no impact on axis labeling, which always occurs with respect to the full, expanded width of the chart.

      Returns:
      Current centerLegend value. Default value is false
      See Also:
    • setCenterTitle

      public FacetChart setCenterTitle(Boolean centerTitle) throws IllegalStateException
      Deprecated.
      Alignment of title and legend elements is now always relative to the visible chart-width, and not the full scrollable-width, so that both elements are always on-screen for any alignment
      Whether to place the chart title with respect to the full, scrollable width of the chart when autoScrollData is active. The default of false means that the title will be placed in the visible, non-overflowed region of the chart, for greater visibility.

      Note that alignment of the title itself is governed by titleAlign.

      Parameters:
      centerTitle - New centerTitle value. Default value is false
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getCenterTitle

      public Boolean getCenterTitle()
      Deprecated.
      Alignment of title and legend elements is now always relative to the visible chart-width, and not the full scrollable-width, so that both elements are always on-screen for any alignment
      Whether to place the chart title with respect to the full, scrollable width of the chart when autoScrollData is active. The default of false means that the title will be placed in the visible, non-overflowed region of the chart, for greater visibility.

      Note that alignment of the title itself is governed by titleAlign.

      Returns:
      Current centerTitle value. Default value is false
      See Also:
    • setChartRectMargin

      public FacetChart setChartRectMargin(int chartRectMargin) throws IllegalStateException
      Margin around the main chart rect: between title and chart, between chart and axis labels, and chart rect and right edge of chart.
      Parameters:
      chartRectMargin - New chartRectMargin value. Default value is 5
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getChartRectMargin

      public int getChartRectMargin()
      Margin around the main chart rect: between title and chart, between chart and axis labels, and chart rect and right edge of chart.
      Returns:
      Current chartRectMargin value. Default value is 5
    • setChartRectProperties

      public FacetChart setChartRectProperties(DrawRect chartRectProperties)
      Properties for chart rect. By default, rounding of the chart rect. causes the gradation lines to be automatically inset from the edge so that they do not run right along the curve. Set padChartRectByCornerRadius to false to change this default.
      Parameters:
      chartRectProperties - New chartRectProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getChartRectProperties

      public DrawRect getChartRectProperties()
      Properties for chart rect. By default, rounding of the chart rect. causes the gradation lines to be automatically inset from the edge so that they do not run right along the curve. Set padChartRectByCornerRadius to false to change this default.
      Returns:
      Current chartRectProperties value. Default value is null
    • setChartType

      public FacetChart setChartType(ChartType chartType)
      See ChartType for a list of known types - Column, Bar, Line, Pie, Doughnut, Area, Radar, and Histogram charts are supported.

      If this method is called after the component has been drawn/initialized: Method to change the current chartType. Will redraw the chart if drawn. Will use default settings for the new chart type for stacked and filled if those values are null.

      Note that for multi-axis charts this method changes the chartType for the main value axis only.

      Parameters:
      chartType - new chart type. Default value is "Column"
      Returns:
      FacetChart instance, for chaining setter calls
    • getChartType

      public ChartType getChartType()
      See ChartType for a list of known types - Column, Bar, Line, Pie, Doughnut, Area, Radar, and Histogram charts are supported.
      Returns:
      Current chartType value. Default value is "Column"
    • setClusterMarginRatio

      public FacetChart setClusterMarginRatio(float clusterMarginRatio) throws IllegalStateException
      For clustered charts, ratio between margins between individual bars and margins between clusters.
      Parameters:
      clusterMarginRatio - New clusterMarginRatio value. Default value is 4
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getClusterMarginRatio

      public float getClusterMarginRatio()
      For clustered charts, ratio between margins between individual bars and margins between clusters.
      Returns:
      Current clusterMarginRatio value. Default value is 4
      See Also:
    • setColorMutePercent

      public FacetChart setColorMutePercent(Float colorMutePercent) throws IllegalStateException
      Should be set to a number between -100 and 100. If set, all colors in the chart are "muted" by this percentage by shifting them toward white (or for negative numbers, toward black).
      Parameters:
      colorMutePercent - New colorMutePercent value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getColorMutePercent

      public Float getColorMutePercent()
      Should be set to a number between -100 and 100. If set, all colors in the chart are "muted" by this percentage by shifting them toward white (or for negative numbers, toward black).
      Returns:
      Current colorMutePercent value. Default value is null
    • setColorScaleMetric

      public FacetChart setColorScaleMetric(String colorScaleMetric) throws IllegalStateException
      For charts where showDataPoints is enabled, this property specifies an additional metric (i.e. an "id" of a metric facet value) that causes the data points to be colored from scaleStartColor to scaleEndColor based on a linear scale over the values of this metric. Log-scaling for color scale is also supported with logScalePointColor.
      Parameters:
      colorScaleMetric - New colorScaleMetric value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getColorScaleMetric

      public String getColorScaleMetric()
      For charts where showDataPoints is enabled, this property specifies an additional metric (i.e. an "id" of a metric facet value) that causes the data points to be colored from scaleStartColor to scaleEndColor based on a linear scale over the values of this metric. Log-scaling for color scale is also supported with logScalePointColor.
      Returns:
      Current colorScaleMetric value. Default value is null
      See Also:
    • setDataAxisLabelDelimiter

      public FacetChart setDataAxisLabelDelimiter(String dataAxisLabelDelimiter)
      Determines how inner and outer data axis labels are separated for charts that support multiple data label facets. See the discussion of "Three Facet Bar and Column Charts" in the overview.
      Parameters:
      dataAxisLabelDelimiter - New dataAxisLabelDelimiter value. Default value is " / "
      Returns:
      FacetChart instance, for chaining setter calls
    • getDataAxisLabelDelimiter

      public String getDataAxisLabelDelimiter()
      Determines how inner and outer data axis labels are separated for charts that support multiple data label facets. See the discussion of "Three Facet Bar and Column Charts" in the overview.
      Returns:
      Current dataAxisLabelDelimiter value. Default value is " / "
    • setDataAxisLabelProperties

      public FacetChart setDataAxisLabelProperties(DrawLabel dataAxisLabelProperties)
      Properties for labels of data axis.
      Parameters:
      dataAxisLabelProperties - New dataAxisLabelProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getDataAxisLabelProperties

      public DrawLabel getDataAxisLabelProperties()
      Properties for labels of data axis.
      Returns:
      Current dataAxisLabelProperties value. Default value is null
    • setDataColors

      public FacetChart setDataColors(String... dataColors)
      An array of colors to use for a series of visual elements representing data (eg columns, bars, pie slices), any of which may be adjacent to any other.

      Colors must be in the format of a leading hash (#) plus 6 hexadecimal digits, for example, "#FFFFFF" is white, "#FF0000" is pure red.

      If this method is called after the component has been drawn/initialized: Setter for dataColors.

      Parameters:
      dataColors - New set of data colors. Default value is see below
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getDataColors

      public String[] getDataColors()
      An array of colors to use for a series of visual elements representing data (eg columns, bars, pie slices), any of which may be adjacent to any other.

      Colors must be in the format of a leading hash (#) plus 6 hexadecimal digits, for example, "#FFFFFF" is white, "#FF0000" is pure red.

      Returns:
      Current dataColors value. Default value is see below
      See Also:
    • setDataFetchMode

      public FacetChart setDataFetchMode(FetchMode dataFetchMode)
      FacetCharts do not yet support paging, and will fetch all records that meet the criteria.
      Specified by:
      setDataFetchMode in interface DataBoundComponent
      Parameters:
      dataFetchMode - New dataFetchMode value. Default value is "basic"
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getDataFetchMode

      public FetchMode getDataFetchMode()
      FacetCharts do not yet support paging, and will fetch all records that meet the criteria.
      Specified by:
      getDataFetchMode in interface DataBoundComponent
      Returns:
      Current dataFetchMode value. Default value is "basic"
      See Also:
    • setDataLabelFacetsMargin

      public FacetChart setDataLabelFacetsMargin(String dataLabelFacetsMargin)
      Determines separation between the set of inner data labels and the set of outer data labels for charts that support multiple data label facets. See the discussion of "Three Facet Bar and Column Charts" in the overview.
      Parameters:
      dataLabelFacetsMargin - New dataLabelFacetsMargin value. Default value is 5
      Returns:
      FacetChart instance, for chaining setter calls
    • getDataLabelFacetsMargin

      public String getDataLabelFacetsMargin()
      Determines separation between the set of inner data labels and the set of outer data labels for charts that support multiple data label facets. See the discussion of "Three Facet Bar and Column Charts" in the overview.
      Returns:
      Current dataLabelFacetsMargin value. Default value is 5
    • setDataLabelProperties

      public FacetChart setDataLabelProperties(DrawLabel dataLabelProperties)
      Properties for data label
      Parameters:
      dataLabelProperties - New dataLabelProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getDataLabelProperties

      public DrawLabel getDataLabelProperties()
      Properties for data label
      Returns:
      Current dataLabelProperties value. Default value is null
    • setDataLabelToValueAxisMargin

      public FacetChart setDataLabelToValueAxisMargin(int dataLabelToValueAxisMargin) throws IllegalStateException
      Margin between the edge of the chart and the data labels of the data label axis. This will default to the chart margin if unset and should not exceed it. Setting this property to some valid non-null value has the impact of moving the data labels towards to chart, away from the axis label.
      Parameters:
      dataLabelToValueAxisMargin - New dataLabelToValueAxisMargin value. Default value is varies
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getDataLabelToValueAxisMargin

      public int getDataLabelToValueAxisMargin()
      Margin between the edge of the chart and the data labels of the data label axis. This will default to the chart margin if unset and should not exceed it. Setting this property to some valid non-null value has the impact of moving the data labels towards to chart, away from the axis label.
      Returns:
      Current dataLabelToValueAxisMargin value. Default value is varies
    • setDataLineProperties

      public FacetChart setDataLineProperties(DrawLine dataLineProperties) throws IllegalStateException
      Properties for lines that show data (as opposed to gradations or borders around the data area).
      Parameters:
      dataLineProperties - New dataLineProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getDataLineProperties

      public DrawLine getDataLineProperties()
      Properties for lines that show data (as opposed to gradations or borders around the data area).
      Returns:
      Current dataLineProperties value. Default value is null
    • setDataLineType

      public FacetChart setDataLineType(DataLineType dataLineType)
      How to draw lines between adjacent data points in Line and Scatter charts. See DataLineType.

      Does not apply to boundary lines for shapes in Area or Radar plots.

      If this method is called after the component has been drawn/initialized: Method to change the current dataLineType. Will redraw the chart if drawn.

      Parameters:
      dataLineType - ow to draw lines between adjacent data points in Line and Scatter charts. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
    • getDataLineType

      public DataLineType getDataLineType()
      How to draw lines between adjacent data points in Line and Scatter charts. See DataLineType.

      Does not apply to boundary lines for shapes in Area or Radar plots.

      Returns:
      Current dataLineType value. Default value is null
    • setDataMargin

      public FacetChart setDataMargin(int dataMargin) throws IllegalStateException
      For rectangular charts (bar, column, line), margin around the inside of the main chart area, so that data elements are not flush to edge.
      Parameters:
      dataMargin - New dataMargin value. Default value is 10
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getDataMargin

      public int getDataMargin()
      For rectangular charts (bar, column, line), margin around the inside of the main chart area, so that data elements are not flush to edge.
      Returns:
      Current dataMargin value. Default value is 10
    • setDataOutlineProperties

      public FacetChart setDataOutlineProperties(DrawItem dataOutlineProperties) throws IllegalStateException
      Properties for lines that outline a data shape (in filled charts such as area or radar charts).
      Parameters:
      dataOutlineProperties - New dataOutlineProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getDataOutlineProperties

      public DrawItem getDataOutlineProperties()
      Properties for lines that outline a data shape (in filled charts such as area or radar charts).
      Returns:
      Current dataOutlineProperties value. Default value is null
    • setDataPointProperties

      public FacetChart setDataPointProperties(DrawItem dataPointProperties) throws IllegalStateException
      Common properties to apply for all data points (see showDataPoints).
      Parameters:
      dataPointProperties - New dataPointProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getDataPointProperties

      public DrawItem getDataPointProperties()
      Common properties to apply for all data points (see showDataPoints).
      Returns:
      Current dataPointProperties value. Default value is null
    • setDataPointSize

      public FacetChart setDataPointSize(int dataPointSize) throws IllegalStateException
      Size in pixels for data points drawn for line, area, radar and other chart types.
      Parameters:
      dataPointSize - New dataPointSize value. Default value is 5
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getDataPointSize

      public int getDataPointSize()
      Size in pixels for data points drawn for line, area, radar and other chart types.
      Returns:
      Current dataPointSize value. Default value is 5
    • setDataShapeProperties

      public FacetChart setDataShapeProperties(DrawPath dataShapeProperties) throws IllegalStateException
      Properties for data shapes (filled areas in area or radar charts).
      Parameters:
      dataShapeProperties - New dataShapeProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getDataShapeProperties

      public DrawPath getDataShapeProperties()
      Properties for data shapes (filled areas in area or radar charts).
      Returns:
      Current dataShapeProperties value. Default value is null
    • setDataSource

      public FacetChart setDataSource(DataSource dataSource)
      The DataSource that this component should bind to for default fields and for performing DataSource requests.

      Can be specified as either a DataSource instance or the String ID of a DataSource.

      Specified by:
      setDataSource in interface DataBoundComponent
      Parameters:
      dataSource - New dataSource value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • setDataSource

      public FacetChart setDataSource(String dataSource)
      The DataSource that this component should bind to for default fields and for performing DataSource requests.

      Can be specified as either a DataSource instance or the String ID of a DataSource.

      Specified by:
      setDataSource in interface DataBoundComponent
      Parameters:
      dataSource - New dataSource value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • setDataValueHoverShadow

      public FacetChart setDataValueHoverShadow(Shadow dataValueHoverShadow)
      When highlightDataValues is true, this attribute can be set to a DrawItem shadow to show around the draw-area of nearby filled data-value shapes as the mouse is moved around in Bar, Column, Pie and Doughnut chart-types.
      Parameters:
      dataValueHoverShadow - New dataValueHoverShadow value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
    • getDataValueHoverShadow

      public Shadow getDataValueHoverShadow()
      When highlightDataValues is true, this attribute can be set to a DrawItem shadow to show around the draw-area of nearby filled data-value shapes as the mouse is moved around in Bar, Column, Pie and Doughnut chart-types.
      Returns:
      Current dataValueHoverShadow value. Default value is null
    • setDecimalPrecision

      public FacetChart setDecimalPrecision(int decimalPrecision) throws IllegalStateException
      Default precision used when formatting float numbers for axis labels
      Parameters:
      decimalPrecision - New decimalPrecision value. Default value is 2
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getDecimalPrecision

      public int getDecimalPrecision()
      Default precision used when formatting float numbers for axis labels
      Returns:
      Current decimalPrecision value. Default value is 2
    • setDiscontinuousLines

      public FacetChart setDiscontinuousLines(Boolean discontinuousLines)
      Whether to treat non-numeric values in the dataset as indicating a break in the data line. If set to false then null values are ignored. Defaults to true for filled charts and to false for line charts.
      Parameters:
      discontinuousLines - New discontinuousLines value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
    • getDiscontinuousLines

      public Boolean getDiscontinuousLines()
      Whether to treat non-numeric values in the dataset as indicating a break in the data line. If set to false then null values are ignored. Defaults to true for filled charts and to false for line charts.
      Returns:
      Current discontinuousLines value. Default value is null
    • setDoughnutHoleProperties

      public FacetChart setDoughnutHoleProperties(DrawOval doughnutHoleProperties)
      Properties for doughnut hole
      Parameters:
      doughnutHoleProperties - New doughnutHoleProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getDoughnutHoleProperties

      public DrawOval getDoughnutHoleProperties()
      Properties for doughnut hole
      Returns:
      Current doughnutHoleProperties value. Default value is null
    • setDoughnutRatio

      public FacetChart setDoughnutRatio(float doughnutRatio) throws IllegalStateException
      If showing a doughnut hole (see showDoughnut), ratio of the size of the doughnut hole to the size of the overall pie chart, as a number between 0 to 1.
      Parameters:
      doughnutRatio - New doughnutRatio value. Default value is 0.2
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getDoughnutRatio

      public float getDoughnutRatio()
      If showing a doughnut hole (see showDoughnut), ratio of the size of the doughnut hole to the size of the overall pie chart, as a number between 0 to 1.
      Returns:
      Current doughnutRatio value. Default value is 0.2
    • setDrawLegendBoundary

      public FacetChart setDrawLegendBoundary(Boolean drawLegendBoundary) throws IllegalStateException
      Whether a boundary should be drawn above the Legend area for circumstances where the chart area already has an outer border. If the chart has no outer border, then the legendRectProperties settings should be used instead.
      Parameters:
      drawLegendBoundary - New drawLegendBoundary value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getDrawLegendBoundary

      public Boolean getDrawLegendBoundary()
      Whether a boundary should be drawn above the Legend area for circumstances where the chart area already has an outer border. If the chart has no outer border, then the legendRectProperties settings should be used instead.
      Returns:
      Current drawLegendBoundary value. Default value is null
    • setDrawTitleBackground

      public FacetChart setDrawTitleBackground(Boolean drawTitleBackground)
      should a background color be set behind the Title. Use titleBackgroundProperties to set these values if this is true.
      Parameters:
      drawTitleBackground - New drawTitleBackground value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
    • getDrawTitleBackground

      public Boolean getDrawTitleBackground()
      should a background color be set behind the Title. Use titleBackgroundProperties to set these values if this is true.
      Returns:
      Current drawTitleBackground value. Default value is null
    • setDrawTitleBoundary

      public FacetChart setDrawTitleBoundary(Boolean drawTitleBoundary)
      Whether a boundary should be drawn below the title area for circumstances where the chart area already has an outer border. If the chart has no outer border, then the titleBackgroundProperties settings should be used instead.
      Parameters:
      drawTitleBoundary - New drawTitleBoundary value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
    • getDrawTitleBoundary

      public Boolean getDrawTitleBoundary()
      Whether a boundary should be drawn below the title area for circumstances where the chart area already has an outer border. If the chart has no outer border, then the titleBackgroundProperties settings should be used instead.
      Returns:
      Current drawTitleBoundary value. Default value is null
    • setEditProxyConstructor

      public FacetChart setEditProxyConstructor(String editProxyConstructor) throws IllegalStateException
      Default class used to construct the EditProxy for this component when the component is first placed into edit mode.
      Overrides:
      setEditProxyConstructor in class DrawPane
      Parameters:
      editProxyConstructor - New editProxyConstructor value. Default value is "FacetChartEditProxy"
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getEditProxyConstructor

      public String getEditProxyConstructor()
      Default class used to construct the EditProxy for this component when the component is first placed into edit mode.
      Overrides:
      getEditProxyConstructor in class DrawPane
      Returns:
      Current editProxyConstructor value. Default value is "FacetChartEditProxy"
      See Also:
    • setEndValueMetric

      public FacetChart setEndValueMetric(String endValueMetric) throws IllegalStateException
      Specifies the attribute in the metric facet that will define the end point of segments in a histogram chart. The start point is set via the valueProperty.
      Parameters:
      endValueMetric - New endValueMetric value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getEndValueMetric

      public String getEndValueMetric()
      Specifies the attribute in the metric facet that will define the end point of segments in a histogram chart. The start point is set via the valueProperty.
      Returns:
      Current endValueMetric value. Default value is null
      See Also:
    • setErrorBarColorMutePercent

      public FacetChart setErrorBarColorMutePercent(float errorBarColorMutePercent) throws IllegalStateException
      This property helps specify the color of the error bars and its value must be a number between -100 and 100. Error bars have the same color as the data line, but the colors are actually "muted" by this percentage by shifting them toward white (or for negative numbers, toward black). The default is to darken the data colors by 60% to get the error bar colors.
      Parameters:
      errorBarColorMutePercent - New errorBarColorMutePercent value. Default value is -60
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getErrorBarColorMutePercent

      public float getErrorBarColorMutePercent()
      This property helps specify the color of the error bars and its value must be a number between -100 and 100. Error bars have the same color as the data line, but the colors are actually "muted" by this percentage by shifting them toward white (or for negative numbers, toward black). The default is to darken the data colors by 60% to get the error bar colors.
      Returns:
      Current errorBarColorMutePercent value. Default value is -60
    • setErrorBarWidth

      public FacetChart setErrorBarWidth(int errorBarWidth) throws IllegalStateException
      Width of the horizontal line of the "T"-shape portion of the error bar).
      Parameters:
      errorBarWidth - New errorBarWidth value. Default value is 6
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getErrorBarWidth

      public int getErrorBarWidth()
      Width of the horizontal line of the "T"-shape portion of the error bar).
      Returns:
      Current errorBarWidth value. Default value is 6
    • setErrorLineProperties

      public FacetChart setErrorLineProperties(DrawLine errorLineProperties) throws IllegalStateException
      Properties of the lines used to draw error bars (short, horizontal lines at the low and high metric values, and a vertical connecting line).

      Note that the lineColor property has no effect as the color of the error bars is derived from the color of the data line.

      Parameters:
      errorLineProperties - New errorLineProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getErrorLineProperties

      public DrawLine getErrorLineProperties()
      Properties of the lines used to draw error bars (short, horizontal lines at the low and high metric values, and a vertical connecting line).

      Note that the lineColor property has no effect as the color of the error bars is derived from the color of the data line.

      Returns:
      Current errorLineProperties value. Default value is null
      See Also:
    • setExpectedValueLineProperties

      public FacetChart setExpectedValueLineProperties(DrawItem expectedValueLineProperties) throws IllegalStateException
      Properties for the line drawn at the mean value.

      Note that for rectangular charts the properties are for a DrawLine, and for radar charts the properties are for a DrawOval.

      Parameters:
      expectedValueLineProperties - New expectedValueLineProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getExpectedValueLineProperties

      public DrawItem getExpectedValueLineProperties()
      Properties for the line drawn at the mean value.

      Note that for rectangular charts the properties are for a DrawLine, and for radar charts the properties are for a DrawOval.

      Returns:
      Current expectedValueLineProperties value. Default value is null
    • setExtraAxisLabelAlign

      public FacetChart setExtraAxisLabelAlign(Alignment extraAxisLabelAlign)
      Horizontal alignment of labels shown in extra y-axes, shown to the right of the chart.
      Parameters:
      extraAxisLabelAlign - New extraAxisLabelAlign value. Default value is "left"
      Returns:
      FacetChart instance, for chaining setter calls
    • getExtraAxisLabelAlign

      public Alignment getExtraAxisLabelAlign()
      Horizontal alignment of labels shown in extra y-axes, shown to the right of the chart.
      Returns:
      Current extraAxisLabelAlign value. Default value is "left"
    • setExtraAxisMetrics

      public FacetChart setExtraAxisMetrics(String... extraAxisMetrics) throws IllegalStateException
      Defines the set of metrics that will be plotted as additional vertical axes. See the main FacetChart docs for an overview of how multi-axis charts are used.

      Each metric corresponds to different value property of the data records and superimposes its drawn data onto the chart rectangle. The value properties are called metrics, and they can be either the valueProperty or the "id" of a FacetValue of the inlined Facet (which is then called the metric facet). Each value axis has its own gradations that are shown as tick marks along the length of the axis. This property, extraAxisMetrics, specifies the metrics to use for additional value axes to the main value axis.

      The additional value axis may have their own gradations, chart type, log scale, data colors and gradients, and other chart properties. These properties are specified with the extraAxisSettings property.

      Value axes, including the main value axis, are labelled in the legend along with representations of the charted data. The labels are taken from the FacetValue.title of each metric's FacetValue (or the valueTitle if the metric is the valueProperty).

      The order of the metrics determines the position of the corresponding axes on the chart as well as the z-ordering of the corresponding data lines. The first and second extra value axes are placed to the right of the chart rectangle, and any remaining extra value axes are placed to the left of the main value axis (and therefore to the left of the chart rectangle).

      Parameters:
      extraAxisMetrics - New extraAxisMetrics value. Default value is []
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getExtraAxisMetrics

      public String[] getExtraAxisMetrics()
      Defines the set of metrics that will be plotted as additional vertical axes. See the main FacetChart docs for an overview of how multi-axis charts are used.

      Each metric corresponds to different value property of the data records and superimposes its drawn data onto the chart rectangle. The value properties are called metrics, and they can be either the valueProperty or the "id" of a FacetValue of the inlined Facet (which is then called the metric facet). Each value axis has its own gradations that are shown as tick marks along the length of the axis. This property, extraAxisMetrics, specifies the metrics to use for additional value axes to the main value axis.

      The additional value axis may have their own gradations, chart type, log scale, data colors and gradients, and other chart properties. These properties are specified with the extraAxisSettings property.

      Value axes, including the main value axis, are labelled in the legend along with representations of the charted data. The labels are taken from the FacetValue.title of each metric's FacetValue (or the valueTitle if the metric is the valueProperty).

      The order of the metrics determines the position of the corresponding axes on the chart as well as the z-ordering of the corresponding data lines. The first and second extra value axes are placed to the right of the chart rectangle, and any remaining extra value axes are placed to the left of the main value axis (and therefore to the left of the chart rectangle).

      Returns:
      Current extraAxisMetrics value. Default value is []
      See Also:
    • setExtraAxisSettings

      public FacetChart setExtraAxisSettings(MetricSettings... extraAxisSettings) throws IllegalStateException
      For charts will multiple vertical axes, optionally provides settings for how each extra axis metric is plotted. See the main FacetChart docs for an overview of how multi-axis charts are used.

      The chart of each metric's values may be of any rectangular chart type that uses a vertical value axis ("Column", "Area", or "Line" - "Histogram" is not supported). Because the charts will be superimposed over the same drawing area, there can only be one "Column" chart and one "Area" chart. The column chart is placed on the bottom followed by the area chart, and then the line charts are drawn on top in the order of their metric in the extraAxisMetrics array. If the chartTypes are left unspecified then by default the first metric will be drawn as columns and the remaining will be drawn as lines.

      Parameters:
      extraAxisSettings - New extraAxisSettings value. Default value is []
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getExtraAxisSettings

      public MetricSettings[] getExtraAxisSettings()
      For charts will multiple vertical axes, optionally provides settings for how each extra axis metric is plotted. See the main FacetChart docs for an overview of how multi-axis charts are used.

      The chart of each metric's values may be of any rectangular chart type that uses a vertical value axis ("Column", "Area", or "Line" - "Histogram" is not supported). Because the charts will be superimposed over the same drawing area, there can only be one "Column" chart and one "Area" chart. The column chart is placed on the bottom followed by the area chart, and then the line charts are drawn on top in the order of their metric in the extraAxisMetrics array. If the chartTypes are left unspecified then by default the first metric will be drawn as columns and the remaining will be drawn as lines.

      Returns:
      Current extraAxisSettings value. Default value is []
      See Also:
    • setFacetFields

      public FacetChart setFacetFields(String... facetFields) throws IllegalStateException
      Specifies what DataSource fields to use as the chart facets for a databound chart. If facets is also explicitly set, facetFields is definitive but Facet properties will be picked up from facets also present in the facetFields.

      If neither this property nor facets is set, a databound chart will attempt to auto-derive facetFields from the DataSource fields. The first two text or text-derived fields in the DataSource will be assumed to be the facetFields.

      Parameters:
      facetFields - New facetFields value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getFacetFields

      public String[] getFacetFields()
      Specifies what DataSource fields to use as the chart facets for a databound chart. If facets is also explicitly set, facetFields is definitive but Facet properties will be picked up from facets also present in the facetFields.

      If neither this property nor facets is set, a databound chart will attempt to auto-derive facetFields from the DataSource fields. The first two text or text-derived fields in the DataSource will be assumed to be the facetFields.

      Returns:
      Current facetFields value. Default value is null
      See Also:
    • setFacetFields

      public FacetChart setFacetFields(String facetFields) throws IllegalStateException
      Specifies what DataSource fields to use as the chart facets for a databound chart. If facets is also explicitly set, facetFields is definitive but Facet properties will be picked up from facets also present in the facetFields.

      If neither this property nor facets is set, a databound chart will attempt to auto-derive facetFields from the DataSource fields. The first two text or text-derived fields in the DataSource will be assumed to be the facetFields.

      Parameters:
      facetFields - New facetFields value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getFacetFieldsAsString

      public String getFacetFieldsAsString()
      Specifies what DataSource fields to use as the chart facets for a databound chart. If facets is also explicitly set, facetFields is definitive but Facet properties will be picked up from facets also present in the facetFields.

      If neither this property nor facets is set, a databound chart will attempt to auto-derive facetFields from the DataSource fields. The first two text or text-derived fields in the DataSource will be assumed to be the facetFields.

      Returns:
      Current facetFields value. Default value is null
      See Also:
    • setFacets

      public FacetChart setFacets(Facet... facets) throws IllegalStateException
      An Array of facets, exactly analogous to CubeGrid.facets, except that:
      • the "inlinedValues" property can be set on a facet to change data representation as described under Chart.data.
      • for a non-inlined facet, Charts support auto-derivation of facetValues from the data.

      In all chart types except "Bubble" and "Scatter", the chart displays a value for each discrete value of one facet (i.e. single-facet charts) or it displays a value for each combination of discrete values of two facets (multi-facet charts). The two discrete facets are the data label facet and the legend facet. They are named based on where the values of the facet appear in the chart. The facet whose values are rendered as labels along the data axis or in the main chart area is the data label facet, and the facet whose values are rendered in the legend is the legend facet.

      For single-facet charts, most chart types have a data label facet as the first facet but no legend facet. Single-facet Pie charts have a legend facet as the first facet but no data label facet. Bubble and Scatter plots may have a legend facet as the second facet, after the metric facet.

      In all multi-facet charts, the data label facet is always first and the legend facet is second. In most chart types the data label facet and the legend facet may be swapped on the fly by the user clicking on the "Swap Facets" item of the context menu.

      In the case of Bar and Column Charts, up to three facets are supported, where the first two facets in that case are taken as the data label facets, and the third facet as the legend facet. This works by positioning both data label facets on the same axis, in a way that clearly shows which inner facet values are associated with each outer facet value.

      For databound charts, facetFields may be specified instead of this property. If both are provided, facetFields is definitive but Facet properties will be picked up from facets also present in the facetFields.

      Parameters:
      facets - New facets value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getFacets

      public Facet[] getFacets()
      An Array of facets, exactly analogous to CubeGrid.facets, except that:
      • the "inlinedValues" property can be set on a facet to change data representation as described under Chart.data.
      • for a non-inlined facet, Charts support auto-derivation of facetValues from the data.

      In all chart types except "Bubble" and "Scatter", the chart displays a value for each discrete value of one facet (i.e. single-facet charts) or it displays a value for each combination of discrete values of two facets (multi-facet charts). The two discrete facets are the data label facet and the legend facet. They are named based on where the values of the facet appear in the chart. The facet whose values are rendered as labels along the data axis or in the main chart area is the data label facet, and the facet whose values are rendered in the legend is the legend facet.

      For single-facet charts, most chart types have a data label facet as the first facet but no legend facet. Single-facet Pie charts have a legend facet as the first facet but no data label facet. Bubble and Scatter plots may have a legend facet as the second facet, after the metric facet.

      In all multi-facet charts, the data label facet is always first and the legend facet is second. In most chart types the data label facet and the legend facet may be swapped on the fly by the user clicking on the "Swap Facets" item of the context menu.

      In the case of Bar and Column Charts, up to three facets are supported, where the first two facets in that case are taken as the data label facets, and the third facet as the legend facet. This works by positioning both data label facets on the same axis, in a way that clearly shows which inner facet values are associated with each outer facet value.

      For databound charts, facetFields may be specified instead of this property. If both are provided, facetFields is definitive but Facet properties will be picked up from facets also present in the facetFields.

      Returns:
      Current facets value. Default value is null
    • setFacets

      public FacetChart setFacets(Facet facets) throws IllegalStateException
      An Array of facets, exactly analogous to CubeGrid.facets, except that:
      • the "inlinedValues" property can be set on a facet to change data representation as described under Chart.data.
      • for a non-inlined facet, Charts support auto-derivation of facetValues from the data.

      In all chart types except "Bubble" and "Scatter", the chart displays a value for each discrete value of one facet (i.e. single-facet charts) or it displays a value for each combination of discrete values of two facets (multi-facet charts). The two discrete facets are the data label facet and the legend facet. They are named based on where the values of the facet appear in the chart. The facet whose values are rendered as labels along the data axis or in the main chart area is the data label facet, and the facet whose values are rendered in the legend is the legend facet.

      For single-facet charts, most chart types have a data label facet as the first facet but no legend facet. Single-facet Pie charts have a legend facet as the first facet but no data label facet. Bubble and Scatter plots may have a legend facet as the second facet, after the metric facet.

      In all multi-facet charts, the data label facet is always first and the legend facet is second. In most chart types the data label facet and the legend facet may be swapped on the fly by the user clicking on the "Swap Facets" item of the context menu.

      In the case of Bar and Column Charts, up to three facets are supported, where the first two facets in that case are taken as the data label facets, and the third facet as the legend facet. This works by positioning both data label facets on the same axis, in a way that clearly shows which inner facet values are associated with each outer facet value.

      For databound charts, facetFields may be specified instead of this property. If both are provided, facetFields is definitive but Facet properties will be picked up from facets also present in the facetFields.

      Parameters:
      facets - New facets value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getFacetsAsFacet

      public Facet getFacetsAsFacet()
      An Array of facets, exactly analogous to CubeGrid.facets, except that:
      • the "inlinedValues" property can be set on a facet to change data representation as described under Chart.data.
      • for a non-inlined facet, Charts support auto-derivation of facetValues from the data.

      In all chart types except "Bubble" and "Scatter", the chart displays a value for each discrete value of one facet (i.e. single-facet charts) or it displays a value for each combination of discrete values of two facets (multi-facet charts). The two discrete facets are the data label facet and the legend facet. They are named based on where the values of the facet appear in the chart. The facet whose values are rendered as labels along the data axis or in the main chart area is the data label facet, and the facet whose values are rendered in the legend is the legend facet.

      For single-facet charts, most chart types have a data label facet as the first facet but no legend facet. Single-facet Pie charts have a legend facet as the first facet but no data label facet. Bubble and Scatter plots may have a legend facet as the second facet, after the metric facet.

      In all multi-facet charts, the data label facet is always first and the legend facet is second. In most chart types the data label facet and the legend facet may be swapped on the fly by the user clicking on the "Swap Facets" item of the context menu.

      In the case of Bar and Column Charts, up to three facets are supported, where the first two facets in that case are taken as the data label facets, and the third facet as the legend facet. This works by positioning both data label facets on the same axis, in a way that clearly shows which inner facet values are associated with each outer facet value.

      For databound charts, facetFields may be specified instead of this property. If both are provided, facetFields is definitive but Facet properties will be picked up from facets also present in the facetFields.

      Returns:
      Current facets value. Default value is null
    • setFetchRequestProperties

      public FacetChart setFetchRequestProperties(DSRequest fetchRequestProperties) throws IllegalStateException
      If autoFetchData is true, this attribute allows the developer to declaratively specify DSRequest properties for the initial fetchData() call.

      Note that any properties governing more specific request attributes for the initial fetch (such as autoFetchTextMatchStyle) will be applied on top of this properties block.

      Parameters:
      fetchRequestProperties - New fetchRequestProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getFetchRequestProperties

      public DSRequest getFetchRequestProperties()
      If autoFetchData is true, this attribute allows the developer to declaratively specify DSRequest properties for the initial fetchData() call.

      Note that any properties governing more specific request attributes for the initial fetch (such as autoFetchTextMatchStyle) will be applied on top of this properties block.

      Returns:
      Current fetchRequestProperties value. Default value is null
      See Also:
    • setFilled

      public FacetChart setFilled(Boolean filled)
      Whether shapes are filled, for example, whether a multi-series line chart appears as a stack of filled regions as opposed to just multiple lines.

      If unset, fills will be automatically used when there are multiple facets and stacking is active (so Line and Radar charts will show stacked regions).

      You can explicitly set filled:false to create multi-facet Line or Radar charts where translucent regions overlap, or filled:true to fill in a single-facet Line or Radar chart.

      If this method is called after the component has been drawn/initialized: Method to change filled. Use null to apply a default value for the current chartType.

      Parameters:
      filled - new value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
    • getFilled

      public Boolean getFilled()
      Whether shapes are filled, for example, whether a multi-series line chart appears as a stack of filled regions as opposed to just multiple lines.

      If unset, fills will be automatically used when there are multiple facets and stacking is active (so Line and Radar charts will show stacked regions).

      You can explicitly set filled:false to create multi-facet Line or Radar charts where translucent regions overlap, or filled:true to fill in a single-facet Line or Radar chart.

      Returns:
      Current filled value. Default value is null
    • setFormatStringFacetValueIds

      public FacetChart setFormatStringFacetValueIds(Boolean formatStringFacetValueIds)
      Whether to call setXAxisValueFormatter() or formatFacetValueId() on a facet value id when the id is a string. Can be set false to allow the formatting function(s) to be written without having to handle the string case.
      Parameters:
      formatStringFacetValueIds - New formatStringFacetValueIds value. Default value is true
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getFormatStringFacetValueIds

      public Boolean getFormatStringFacetValueIds()
      Whether to call setXAxisValueFormatter() or formatFacetValueId() on a facet value id when the id is a string. Can be set false to allow the formatting function(s) to be written without having to handle the string case.
      Returns:
      Current formatStringFacetValueIds value. Default value is true
      See Also:
    • setGradationGaps

      public FacetChart setGradationGaps(float... gradationGaps)
      Candidate gradation gaps to evaluate when trying to determine what gradations should be displayed on the primary axis, which is typically the y (vertical) axis except for Bar charts.

      Candidates are expressed as a series of numbers between 1 and 10, representing boundaries within a given order of magnitude (power of 10).

      For example, the setting [1, 2.5, 5] means that, for a chart showing values that are only between 0 and 1, gradations of 0.1, 0.25 and 0.5 would be evaluated to see which is a closer fit given the pixelsPerGradation setting and the chart's height. The same setting, with a chart showing values from 0 to 1,000,000 would imply that gradation gaps of 100,000, 250,000 and 500,000 would be evaluated.

      If this method is called after the component has been drawn/initialized: Setter for gradationGaps.

      Parameters:
      gradationGaps - new gradationGaps value. Default value is [1, 2, 5]
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getGradationGaps

      public float[] getGradationGaps()
      Candidate gradation gaps to evaluate when trying to determine what gradations should be displayed on the primary axis, which is typically the y (vertical) axis except for Bar charts.

      Candidates are expressed as a series of numbers between 1 and 10, representing boundaries within a given order of magnitude (power of 10).

      For example, the setting [1, 2.5, 5] means that, for a chart showing values that are only between 0 and 1, gradations of 0.1, 0.25 and 0.5 would be evaluated to see which is a closer fit given the pixelsPerGradation setting and the chart's height. The same setting, with a chart showing values from 0 to 1,000,000 would imply that gradation gaps of 100,000, 250,000 and 500,000 would be evaluated.

      Returns:
      Current gradationGaps value. Default value is [1, 2, 5]
      See Also:
    • setGradationLabelPadding

      public FacetChart setGradationLabelPadding(int gradationLabelPadding) throws IllegalStateException
      Padding from edge of Y the Axis Label.
      Parameters:
      gradationLabelPadding - New gradationLabelPadding value. Default value is 5
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getGradationLabelPadding

      public int getGradationLabelPadding()
      Padding from edge of Y the Axis Label.
      Returns:
      Current gradationLabelPadding value. Default value is 5
    • setGradationLabelProperties

      public FacetChart setGradationLabelProperties(DrawLabel gradationLabelProperties) throws IllegalStateException
      Properties for gradation labels
      Parameters:
      gradationLabelProperties - New gradationLabelProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getGradationLabelProperties

      public DrawLabel getGradationLabelProperties()
      Properties for gradation labels
      Returns:
      Current gradationLabelProperties value. Default value is null
    • setGradationLineProperties

      public FacetChart setGradationLineProperties(DrawLine gradationLineProperties) throws IllegalStateException
      Properties for gradation lines
      Parameters:
      gradationLineProperties - New gradationLineProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getGradationLineProperties

      public DrawLine getGradationLineProperties()
      Properties for gradation lines
      Returns:
      Current gradationLineProperties value. Default value is null
    • setGradationTickMarkLength

      public FacetChart setGradationTickMarkLength(Integer gradationTickMarkLength) throws IllegalStateException
      Deprecated.
      use tickLength instead
      Parameters:
      gradationTickMarkLength - New gradationTickMarkLength value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getGradationTickMarkLength

      public Integer getGradationTickMarkLength()
      Deprecated.
      use tickLength instead
      Returns:
      Current gradationTickMarkLength value. Default value is null
      See Also:
    • setGradationZeroLineProperties

      public FacetChart setGradationZeroLineProperties(DrawLine gradationZeroLineProperties) throws IllegalStateException
      Properties for the gradation line drawn for zero (slightly thicker by default).
      Parameters:
      gradationZeroLineProperties - New gradationZeroLineProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getGradationZeroLineProperties

      public DrawLine getGradationZeroLineProperties()
      Properties for the gradation line drawn for zero (slightly thicker by default).
      Returns:
      Current gradationZeroLineProperties value. Default value is null
    • setHighErrorMetric

      public FacetChart setHighErrorMetric(String highErrorMetric) throws IllegalStateException
      Parameters:
      highErrorMetric - New highErrorMetric value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getHighErrorMetric

      public String getHighErrorMetric()
      Returns:
      Current highErrorMetric value. Default value is null
    • setHighlightDataValues

      public FacetChart setHighlightDataValues(Boolean highlightDataValues)
      Should the draw-area of nearby filled data-value shapes be highlighted as the mouse is moved over some chart-types?

      When set to true, data-shapes in Bar, Column, Pie and Doughnut charts can be highlighted by brightening their fill or border colors by a percentage, and by applying a shadow around them.

      Parameters:
      highlightDataValues - New highlightDataValues value. Default value is true
      Returns:
      FacetChart instance, for chaining setter calls
    • getHighlightDataValues

      public Boolean getHighlightDataValues()
      Should the draw-area of nearby filled data-value shapes be highlighted as the mouse is moved over some chart-types?

      When set to true, data-shapes in Bar, Column, Pie and Doughnut charts can be highlighted by brightening their fill or border colors by a percentage, and by applying a shadow around them.

      Returns:
      Current highlightDataValues value. Default value is true
    • setHoverLabelPadding

      public FacetChart setHoverLabelPadding(int hoverLabelPadding) throws IllegalStateException
      An extra amount of padding to show around the hoverLabel when showValueOnHover is enabled.

      Note : This is an advanced setting

      Parameters:
      hoverLabelPadding - New hoverLabelPadding value. Default value is 4
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getHoverLabelPadding

      public int getHoverLabelPadding()
      An extra amount of padding to show around the hoverLabel when showValueOnHover is enabled.
      Returns:
      Current hoverLabelPadding value. Default value is 4
      See Also:
    • setHoverLabelProperties

      public FacetChart setHoverLabelProperties(DrawLabel hoverLabelProperties) throws IllegalStateException
      Properties for text in a floating label that represents the data value shown whenever the mouse moves withing the main chart area when showValueOnHover is enabled.
      Parameters:
      hoverLabelProperties - New hoverLabelProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getHoverLabelProperties

      public DrawLabel getHoverLabelProperties()
      Properties for text in a floating label that represents the data value shown whenever the mouse moves withing the main chart area when showValueOnHover is enabled.
      Returns:
      Current hoverLabelProperties value. Default value is null
      See Also:
    • setHoverRectProperties

      public FacetChart setHoverRectProperties(DrawRect hoverRectProperties) throws IllegalStateException
      Properties for rectangle that draws behind of a floating hover label that represents the data value. See showValueOnHover for more details.
      Parameters:
      hoverRectProperties - New hoverRectProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getHoverRectProperties

      public DrawRect getHoverRectProperties()
      Properties for rectangle that draws behind of a floating hover label that represents the data value. See showValueOnHover for more details.
      Returns:
      Current hoverRectProperties value. Default value is null
      See Also:
    • setLabelCollapseMode

      public FacetChart setLabelCollapseMode(LabelCollapseMode labelCollapseMode) throws IllegalStateException
      What to do when there are too many data points to be able to show labels for every data point at the current chart size - see LabelCollapseMode.

      Each of the possible strategies is re-applied when the user resizes the chart as a whole, so if labels are omitted the user can make them visible via resize or zoom.

      If the labelCollapseMode is "numeric" then vertical lines will be drawn at gradation values automatically chosen by the chart.

      If the labelCollapseMode is "time" then vertical lines are drawn to represent a sequence of significant datetime values on the x-axis, such as the first day of the month or week. The chart automatically chooses the sequence of Dates such that the spacing between them expresses the smallest granularity of time possible while still allowing the axis labels to make good use of the space. If, for example, the Date values in the data span a few years in time then the chart may select January 1 of the same year of the earliest data point and every January 1 thereafter (in range of the data) as the sequence of Dates and label each Date by the four-digit year. If the time span of the data values is on the order of minutes then the chart may select multiples of 15 minutes as the seqeunce of Dates. FacetChart currently supports the following granularities of time: years, quarters, months, weeks, days, hours, half-hours, quarter-hours, 5 minutes, minutes, 30 seconds, and 15 seconds.

      The format of the Date labels is fixed by FacetChart. In particular, the format method for any setter applied with setXAxisValueFormatter() will not be called on values for the x-axis. However, FacetChart uses the global array of abbreviated month names for the time granularities of quarters, months, and weeks, uses the default short time format to format labels for time granularities from minutes to hours, and uses the default time format to format labels for the time granularities of 15 seconds and 30 seconds. The label format can be customized by changing these three formatters. Also note that for the time granularity of weeks the sequence of Dates will be the first day of each week, as specified by setFirstDayOfWeek() .

      Note that if the labelCollapseMode is "time" or "numeric" then the data must be initially sorted with the data label facet's values in ascending order.

      Parameters:
      labelCollapseMode - New labelCollapseMode value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getLabelCollapseMode

      public LabelCollapseMode getLabelCollapseMode()
      What to do when there are too many data points to be able to show labels for every data point at the current chart size - see LabelCollapseMode.

      Each of the possible strategies is re-applied when the user resizes the chart as a whole, so if labels are omitted the user can make them visible via resize or zoom.

      If the labelCollapseMode is "numeric" then vertical lines will be drawn at gradation values automatically chosen by the chart.

      If the labelCollapseMode is "time" then vertical lines are drawn to represent a sequence of significant datetime values on the x-axis, such as the first day of the month or week. The chart automatically chooses the sequence of Dates such that the spacing between them expresses the smallest granularity of time possible while still allowing the axis labels to make good use of the space. If, for example, the Date values in the data span a few years in time then the chart may select January 1 of the same year of the earliest data point and every January 1 thereafter (in range of the data) as the sequence of Dates and label each Date by the four-digit year. If the time span of the data values is on the order of minutes then the chart may select multiples of 15 minutes as the seqeunce of Dates. FacetChart currently supports the following granularities of time: years, quarters, months, weeks, days, hours, half-hours, quarter-hours, 5 minutes, minutes, 30 seconds, and 15 seconds.

      The format of the Date labels is fixed by FacetChart. In particular, the format method for any setter applied with setXAxisValueFormatter() will not be called on values for the x-axis. However, FacetChart uses the global array of abbreviated month names for the time granularities of quarters, months, and weeks, uses the default short time format to format labels for time granularities from minutes to hours, and uses the default time format to format labels for the time granularities of 15 seconds and 30 seconds. The label format can be customized by changing these three formatters. Also note that for the time granularity of weeks the sequence of Dates will be the first day of each week, as specified by setFirstDayOfWeek() .

      Note that if the labelCollapseMode is "time" or "numeric" then the data must be initially sorted with the data label facet's values in ascending order.

      Returns:
      Current labelCollapseMode value. Default value is null
      See Also:
    • setLegendAlign

      public FacetChart setLegendAlign(LegendAlign legendAlign)
      Horizontal alignment of the chart's legend widget.
      Parameters:
      legendAlign - New legendAlign value. Default value is "center"
      Returns:
      FacetChart instance, for chaining setter calls
    • getLegendAlign

      public LegendAlign getLegendAlign()
      Horizontal alignment of the chart's legend widget.
      Returns:
      Current legendAlign value. Default value is "center"
    • setLegendBoundaryProperties

      public FacetChart setLegendBoundaryProperties(DrawLine legendBoundaryProperties) throws IllegalStateException
      Properties for top boundary of the legend are, when there is already an outer container around the whole chart. see drawLegendBoundary
      Parameters:
      legendBoundaryProperties - New legendBoundaryProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getLegendBoundaryProperties

      public DrawLine getLegendBoundaryProperties()
      Properties for top boundary of the legend are, when there is already an outer container around the whole chart. see drawLegendBoundary
      Returns:
      Current legendBoundaryProperties value. Default value is null
    • setLegendItemPadding

      public FacetChart setLegendItemPadding(int legendItemPadding) throws IllegalStateException
      Padding between each swatch and label pair.
      Parameters:
      legendItemPadding - New legendItemPadding value. Default value is 5
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getLegendItemPadding

      public int getLegendItemPadding()
      Padding between each swatch and label pair.
      Returns:
      Current legendItemPadding value. Default value is 5
    • setLegendLabelProperties

      public FacetChart setLegendLabelProperties(DrawLabel legendLabelProperties) throws IllegalStateException
      Properties for labels shown next to legend color swatches.
      Parameters:
      legendLabelProperties - New legendLabelProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getLegendLabelProperties

      public DrawLabel getLegendLabelProperties()
      Properties for labels shown next to legend color swatches.
      Returns:
      Current legendLabelProperties value. Default value is null
    • setLegendMargin

      public FacetChart setLegendMargin(int legendMargin) throws IllegalStateException
      Space between the legend and the chart rect or axis labels (whatever the legend is adjacent to.
      Parameters:
      legendMargin - New legendMargin value. Default value is 10
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getLegendMargin

      public int getLegendMargin()
      Space between the legend and the chart rect or axis labels (whatever the legend is adjacent to.
      Returns:
      Current legendMargin value. Default value is 10
    • setLegendPadding

      public FacetChart setLegendPadding(int legendPadding) throws IllegalStateException
      Padding around the legend as a whole.
      Parameters:
      legendPadding - New legendPadding value. Default value is 5
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getLegendPadding

      public int getLegendPadding()
      Padding around the legend as a whole.
      Returns:
      Current legendPadding value. Default value is 5
    • setLegendRectHeight

      public FacetChart setLegendRectHeight(int legendRectHeight) throws IllegalStateException
      If drawing a border around the legend, the height of the drawn Rectangle.
      Parameters:
      legendRectHeight - New legendRectHeight value. Default value is 5
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getLegendRectHeight

      public int getLegendRectHeight()
      If drawing a border around the legend, the height of the drawn Rectangle.
      Returns:
      Current legendRectHeight value. Default value is 5
    • setLegendRectProperties

      public FacetChart setLegendRectProperties(DrawRect legendRectProperties) throws IllegalStateException
      Properties for rectangle around the legend as a whole.
      Parameters:
      legendRectProperties - New legendRectProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getLegendRectProperties

      public DrawRect getLegendRectProperties()
      Properties for rectangle around the legend as a whole.
      Returns:
      Current legendRectProperties value. Default value is null
    • setLegendSwatchProperties

      public FacetChart setLegendSwatchProperties(DrawRect legendSwatchProperties) throws IllegalStateException
      Properties for the swatches of color shown in the legend.
      Parameters:
      legendSwatchProperties - New legendSwatchProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getLegendSwatchProperties

      public DrawRect getLegendSwatchProperties()
      Properties for the swatches of color shown in the legend.
      Returns:
      Current legendSwatchProperties value. Default value is null
    • setLegendSwatchSize

      public FacetChart setLegendSwatchSize(int legendSwatchSize) throws IllegalStateException
      Size of individual color swatches in legend.
      Parameters:
      legendSwatchSize - New legendSwatchSize value. Default value is 16
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getLegendSwatchSize

      public int getLegendSwatchSize()
      Size of individual color swatches in legend.
      Returns:
      Current legendSwatchSize value. Default value is 16
    • setLegendTextPadding

      public FacetChart setLegendTextPadding(int legendTextPadding) throws IllegalStateException
      Padding between color swatch and its label.
      Parameters:
      legendTextPadding - New legendTextPadding value. Default value is 5
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getLegendTextPadding

      public int getLegendTextPadding()
      Padding between color swatch and its label.
      Returns:
      Current legendTextPadding value. Default value is 5
    • setLogBase

      public FacetChart setLogBase(int logBase) throws IllegalStateException
      When useLogGradations, base value for logarithmic gradation lines. Gradation lines will be shown at every power of this value plus intervening values specified by logGradations.
      Parameters:
      logBase - New logBase value. Default value is 10
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getLogBase

      public int getLogBase()
      When useLogGradations, base value for logarithmic gradation lines. Gradation lines will be shown at every power of this value plus intervening values specified by logGradations.
      Returns:
      Current logBase value. Default value is 10
    • setLogGradations

      public FacetChart setLogGradations(float... logGradations) throws IllegalStateException
      When useLogGradations is set, gradation lines to show in between powers, expressed as a series of integer or float values between 1 and logBase.

      Some common possibilities (for base 10):

           [ 1 ] // show only orders of magnitude (0.1, 1, 10, 100, etc)
           [ 1, 5 ] // show only orders of magnitude plus halfway mark
           [ 1, 2, 4, 8 ] // show powers of 2 between orders
           [ 1, 2.5, 5, 7.5 ] // show quarters
        
      Or base 2:
           [ 1 ]
           [ 1, 1.5 ]
        
      Parameters:
      logGradations - New logGradations value. Default value is [ 1,2,4,6,8 ]
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getLogGradations

      public float[] getLogGradations()
      When useLogGradations is set, gradation lines to show in between powers, expressed as a series of integer or float values between 1 and logBase.

      Some common possibilities (for base 10):

           [ 1 ] // show only orders of magnitude (0.1, 1, 10, 100, etc)
           [ 1, 5 ] // show only orders of magnitude plus halfway mark
           [ 1, 2, 4, 8 ] // show powers of 2 between orders
           [ 1, 2.5, 5, 7.5 ] // show quarters
        
      Or base 2:
           [ 1 ]
           [ 1, 1.5 ]
        
      Returns:
      Current logGradations value. Default value is [ 1,2,4,6,8 ]
    • setLogScale

      public FacetChart setLogScale(Boolean logScale) throws IllegalStateException
      Whether to use logarithmic scaling for values.

      Logarithmic scale charts show an equivalent percentage increase as equivalent distance on the chart. That is, 10 and 100 are the same distance apart as 100 and 1000 (each being a 10 times or 1000% increase).

      Parameters:
      logScale - New logScale value. Default value is false
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getLogScale

      public Boolean getLogScale()
      Whether to use logarithmic scaling for values.

      Logarithmic scale charts show an equivalent percentage increase as equivalent distance on the chart. That is, 10 and 100 are the same distance apart as 100 and 1000 (each being a 10 times or 1000% increase).

      Returns:
      Current logScale value. Default value is false
    • setLogScalePointColor

      public FacetChart setLogScalePointColor(boolean logScalePointColor) throws IllegalStateException
      Whether to use logarithmic scaling for the color scale of the data points. Defaults to the value of logScale.
      Parameters:
      logScalePointColor - New logScalePointColor value. Default value is false
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getLogScalePointColor

      public boolean getLogScalePointColor()
      Whether to use logarithmic scaling for the color scale of the data points. Defaults to the value of logScale.
      Returns:
      Current logScalePointColor value. Default value is false
      See Also:
    • setLogScalePointSize

      public FacetChart setLogScalePointSize(boolean logScalePointSize) throws IllegalStateException
      Whether to use logarithmic scaling for the data point sizes. Defaults to the value of logScale.
      Parameters:
      logScalePointSize - New logScalePointSize value. Default value is false
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getLogScalePointSize

      public boolean getLogScalePointSize()
      Whether to use logarithmic scaling for the data point sizes. Defaults to the value of logScale.
      Returns:
      Current logScalePointSize value. Default value is false
      See Also:
    • setLowErrorMetric

      public FacetChart setLowErrorMetric(String lowErrorMetric) throws IllegalStateException
      lowErrorMetric and highErrorMetric can be used to cause error bars to appear above and below the main data point.

      lowErrorMetric and highErrorMetric provide the name of an additional attributes that appears in each Record holding the low error value and high error value respectively.

      Error bars are supported for single-axis charts only.

      Parameters:
      lowErrorMetric - New lowErrorMetric value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getLowErrorMetric

      public String getLowErrorMetric()
      lowErrorMetric and highErrorMetric can be used to cause error bars to appear above and below the main data point.

      lowErrorMetric and highErrorMetric provide the name of an additional attributes that appears in each Record holding the low error value and high error value respectively.

      Error bars are supported for single-axis charts only.

      Returns:
      Current lowErrorMetric value. Default value is null
      See Also:
    • setMajorTickGradations

      public FacetChart setMajorTickGradations(float... majorTickGradations) throws IllegalStateException
      List of tick marks that should be drawn as major ticks, expressed as a series of numbers between 1 and 10, representing boundaries within a given order of magnitude (power of 10). These numbers must be multiples of gradationGaps, or no ticks will end up as minor ticks.

      The default setting of [1] means that major ticks are used for powers of 10 only. A setting of [1,5] would mean that major ticks are also used at half-orders of magnitude, such as 0.5 or 50. For example, if used with a gradationGaps setting of [1,2.5] for a chart showing values between 0 and 1, this would result in major ticks at 0, 1 and 0.5, and minor ticks at 0.25 and 0.75.

      See also majorTickTimeIntervals for controlling major vs minor ticks for the X-axis of time/date-valued Scatter plots.

      If this method is called after the component has been drawn/initialized: Setter for majorTickGradations.

      Parameters:
      majorTickGradations - new majorTickGradations value. Default value is [1]
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getMajorTickGradations

      public float[] getMajorTickGradations()
      List of tick marks that should be drawn as major ticks, expressed as a series of numbers between 1 and 10, representing boundaries within a given order of magnitude (power of 10). These numbers must be multiples of gradationGaps, or no ticks will end up as minor ticks.

      The default setting of [1] means that major ticks are used for powers of 10 only. A setting of [1,5] would mean that major ticks are also used at half-orders of magnitude, such as 0.5 or 50. For example, if used with a gradationGaps setting of [1,2.5] for a chart showing values between 0 and 1, this would result in major ticks at 0, 1 and 0.5, and minor ticks at 0.25 and 0.75.

      See also majorTickTimeIntervals for controlling major vs minor ticks for the X-axis of time/date-valued Scatter plots.

      Returns:
      Current majorTickGradations value. Default value is [1]
    • setMajorTickTimeIntervals

      public FacetChart setMajorTickTimeIntervals(String... majorTickTimeIntervals)
      When ticks are being shown on the X axis for a Scatter plot where the X axis uses time/date values, controls the intervals which are shown as major ticks.

      The intervals are specified as Strings, in the same way as otherAxisGradationTimes.

      For any given interval, the first major tick is shown for the next greatest time unit. For example, for interval such as "2h" (2 hours), the first major tick starts on the day boundary (whether that day boundary is visible in the chart or not).

      By default, all ticks are shown as major ticks.

      If this method is called after the component has been drawn/initialized: Setter for majorTickTimeIntervals.

      Parameters:
      majorTickTimeIntervals - new majorTickTimeIntervals value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
    • getMajorTickTimeIntervals

      public String[] getMajorTickTimeIntervals()
      When ticks are being shown on the X axis for a Scatter plot where the X axis uses time/date values, controls the intervals which are shown as major ticks.

      The intervals are specified as Strings, in the same way as otherAxisGradationTimes.

      For any given interval, the first major tick is shown for the next greatest time unit. For example, for interval such as "2h" (2 hours), the first major tick starts on the day boundary (whether that day boundary is visible in the chart or not).

      By default, all ticks are shown as major ticks.

      Returns:
      Current majorTickTimeIntervals value. Default value is null
    • setMatchBarChartDataLineColor

      public FacetChart setMatchBarChartDataLineColor(Boolean matchBarChartDataLineColor)
      Setting to define whether the border around the bar chart area should be the same color as the main chart area.
      Parameters:
      matchBarChartDataLineColor - New matchBarChartDataLineColor value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
    • getMatchBarChartDataLineColor

      public Boolean getMatchBarChartDataLineColor()
      Setting to define whether the border around the bar chart area should be the same color as the main chart area.
      Returns:
      Current matchBarChartDataLineColor value. Default value is null
    • setMaxBarThickness

      public FacetChart setMaxBarThickness(int maxBarThickness) throws IllegalStateException
      Bars will not be drawn over this thickness, instead, margins will be increased.
      Parameters:
      maxBarThickness - New maxBarThickness value. Default value is 150
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
      • com.smartgwt.client.widgets.chart.FacetChart#getMinClusterSize
    • getMaxBarThickness

      public int getMaxBarThickness()
      Bars will not be drawn over this thickness, instead, margins will be increased.
      Returns:
      Current maxBarThickness value. Default value is 150
      See Also:
      • com.smartgwt.client.widgets.chart.FacetChart#getMinClusterSize
    • setMaxDataPointSize

      public FacetChart setMaxDataPointSize(double maxDataPointSize) throws IllegalStateException
      The maximum allowed data point size when controlled by pointSizeMetric.
      Parameters:
      maxDataPointSize - New maxDataPointSize value. Default value is 14
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getMaxDataPointSize

      public double getMaxDataPointSize()
      The maximum allowed data point size when controlled by pointSizeMetric.
      Returns:
      Current maxDataPointSize value. Default value is 14
    • setMaxDataZIndex

      public FacetChart setMaxDataZIndex(Integer maxDataZIndex) throws IllegalStateException
      Maximum allowed zIndex that can be specified through zIndexMetric in a histogram chart. Any zIndex values exceeding this property will be internally clipped so as to not exceed it. While this property can be increased, note that very large values may hit limitations related to the browser's implementation of the current DrawPane.drawingType.
      Parameters:
      maxDataZIndex - New maxDataZIndex value. Default value is 10000
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getMaxDataZIndex

      public Integer getMaxDataZIndex()
      Maximum allowed zIndex that can be specified through zIndexMetric in a histogram chart. Any zIndex values exceeding this property will be internally clipped so as to not exceed it. While this property can be increased, note that very large values may hit limitations related to the browser's implementation of the current DrawPane.drawingType.
      Returns:
      Current maxDataZIndex value. Default value is 10000
      See Also:
    • setMetricFacetId

      public FacetChart setMetricFacetId(String metricFacetId) throws IllegalStateException
      Specifies the "id" of the default metric facet value. The default metric is used with lowErrorMetric and highErrorMetric when showing error bars.
      Parameters:
      metricFacetId - New metricFacetId value. Default value is "metric"
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getMetricFacetId

      public String getMetricFacetId()
      Specifies the "id" of the default metric facet value. The default metric is used with lowErrorMetric and highErrorMetric when showing error bars.
      Returns:
      Current metricFacetId value. Default value is "metric"
    • setMinBarThickness

      public FacetChart setMinBarThickness(int minBarThickness) throws IllegalStateException
      If bars would be smaller than this size, margins are reduced until bars overlap.
      Parameters:
      minBarThickness - New minBarThickness value. Default value is 4
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
      • com.smartgwt.client.widgets.chart.FacetChart#getMinClusterSize
    • getMinBarThickness

      public int getMinBarThickness()
      If bars would be smaller than this size, margins are reduced until bars overlap.
      Returns:
      Current minBarThickness value. Default value is 4
      See Also:
      • com.smartgwt.client.widgets.chart.FacetChart#getMinClusterSize
    • setMinChartHeight

      public FacetChart setMinChartHeight(Integer minChartHeight) throws IllegalStateException
      Minimum height for this chart instance.
      Parameters:
      minChartHeight - New minChartHeight value. Default value is 1
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getMinChartHeight

      public Integer getMinChartHeight()
      Minimum height for this chart instance.
      Returns:
      Returns the minimum height for the chart body. Default value is 1
    • setMinChartWidth

      public FacetChart setMinChartWidth(Integer minChartWidth) throws IllegalStateException
      Minimum width for this chart instance.
      Parameters:
      minChartWidth - New minChartWidth value. Default value is 1
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getMinChartWidth

      public Integer getMinChartWidth()
      Minimum width for this chart instance.
      Returns:
      Returns the minimum width for the chart body. Default value is 1
    • setMinContentHeight

      public FacetChart setMinContentHeight(int minContentHeight)
      When autoScrollContent is true, limits the minimum height of the chart-content, including data, labels, title and legends. If this widget is sized smaller than this height, scrollbars are introduced to reach the hidden content. See minContentWidth to affect the minimum horizontal content-size.
      Parameters:
      minContentHeight - New minContentHeight value. Default value is 150
      Returns:
      FacetChart instance, for chaining setter calls
    • getMinContentHeight

      public int getMinContentHeight()
      When autoScrollContent is true, limits the minimum height of the chart-content, including data, labels, title and legends. If this widget is sized smaller than this height, scrollbars are introduced to reach the hidden content. See minContentWidth to affect the minimum horizontal content-size.
      Returns:
      Returns the minContentHeight for this facet chart when autoScrollContent is enabled. Default value is 150
    • setMinContentWidth

      public FacetChart setMinContentWidth(int minContentWidth)
      When autoScrollContent is true, limits the minimum width of the chart-content, including data, labels, titles and legends. If this widget is sized smaller than this width, scrollbars are introduced to reach the hidden content. See minContentHeight to affect the minimum vertical content-size.
      Parameters:
      minContentWidth - New minContentWidth value. Default value is 150
      Returns:
      FacetChart instance, for chaining setter calls
    • getMinContentWidth

      public int getMinContentWidth()
      When autoScrollContent is true, limits the minimum width of the chart-content, including data, labels, titles and legends. If this widget is sized smaller than this width, scrollbars are introduced to reach the hidden content. See minContentHeight to affect the minimum vertical content-size.
      Returns:
      Returns the minContentWidth for this facet chart when autoScrollContent is enabled. Default value is 150
    • setMinDataPointSize

      public FacetChart setMinDataPointSize(double minDataPointSize) throws IllegalStateException
      The minimum allowed data point size when controlled by pointSizeMetric.
      Parameters:
      minDataPointSize - New minDataPointSize value. Default value is 3
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getMinDataPointSize

      public double getMinDataPointSize()
      The minimum allowed data point size when controlled by pointSizeMetric.
      Returns:
      Current minDataPointSize value. Default value is 3
    • setMinDataSpreadPercent

      public FacetChart setMinDataSpreadPercent(int minDataSpreadPercent) throws IllegalStateException
      If all data values would be spread across less than minDataSpreadPercent of the axis, the start values of axes will be automatically adjusted to make better use of space.

      For example, if a column chart has all data values between 500,000 and 500,100, if the axis starts at 0, differences in column heights will be visually indistinguishable. In this case, since all data values appear in well under 30% of the axis length, the default minDataSpreadPercent setting would cause the axis to start at a value that would make the column heights obviously different (for example, starting the axis as 500,000).

      Setting an explicit axisStartValue or axisEndValue, disables this behavior, as does setting minDataSpreadPercent to 0.

      For multi-axis charts, use MetricSettings.minDataSpreadPercent for per-axis settings.

      For Bubble and Scatter charts, minDataSpreadPercent affects only the y-axis of the chart. The property minXDataSpreadPercent must be used to enable the corresponding feature for the x-axis.

      Parameters:
      minDataSpreadPercent - New minDataSpreadPercent value. Default value is 30
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getMinDataSpreadPercent

      public int getMinDataSpreadPercent()
      If all data values would be spread across less than minDataSpreadPercent of the axis, the start values of axes will be automatically adjusted to make better use of space.

      For example, if a column chart has all data values between 500,000 and 500,100, if the axis starts at 0, differences in column heights will be visually indistinguishable. In this case, since all data values appear in well under 30% of the axis length, the default minDataSpreadPercent setting would cause the axis to start at a value that would make the column heights obviously different (for example, starting the axis as 500,000).

      Setting an explicit axisStartValue or axisEndValue, disables this behavior, as does setting minDataSpreadPercent to 0.

      For multi-axis charts, use MetricSettings.minDataSpreadPercent for per-axis settings.

      For Bubble and Scatter charts, minDataSpreadPercent affects only the y-axis of the chart. The property minXDataSpreadPercent must be used to enable the corresponding feature for the x-axis.

      Returns:
      Current minDataSpreadPercent value. Default value is 30
    • setMinLabelGap

      public FacetChart setMinLabelGap(Integer minLabelGap) throws IllegalStateException
      Minimum gap between labels on the X axis before some labels are omitted or larger time granularity is shown (eg show days instead of hours) based on the labelCollapseMode.

      Default is based on label orientation. If labels are vertical, the minimum gap is the height of half a line of text. If horizontal it's the width of 4 "X" letters.

      Parameters:
      minLabelGap - New minLabelGap value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getMinLabelGap

      public Integer getMinLabelGap()
      Minimum gap between labels on the X axis before some labels are omitted or larger time granularity is shown (eg show days instead of hours) based on the labelCollapseMode.

      Default is based on label orientation. If labels are vertical, the minimum gap is the height of half a line of text. If horizontal it's the width of 4 "X" letters.

      Returns:
      Current minLabelGap value. Default value is null
    • setMinorTickLength

      public FacetChart setMinorTickLength(int minorTickLength)
      Length of minor ticks marks shown along axis, if minor tick marks are enabled.

      If this method is called after the component has been drawn/initialized: Setter for minorTickLength.
      Parameters:
      minorTickLength - new minorTickLength value. Default value is 2
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getMinorTickLength

      public int getMinorTickLength()
      Length of minor ticks marks shown along axis, if minor tick marks are enabled.
      Returns:
      Current minorTickLength value. Default value is 2
      See Also:
    • setMinXDataSpreadPercent

      public FacetChart setMinXDataSpreadPercent(int minXDataSpreadPercent) throws IllegalStateException
      For scatter charts only, if all data points would be spread across less than minXDataSpreadPercent of the x-axis, the start value of x-axis will be automatically adjusted to make better use of space.

      Setting an explicit xAxisStartValue disables this behavior, as does setting minXDataSpreadPercent to 0.

      Parameters:
      minXDataSpreadPercent - New minXDataSpreadPercent value. Default value is 30
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getMinXDataSpreadPercent

      public int getMinXDataSpreadPercent()
      For scatter charts only, if all data points would be spread across less than minXDataSpreadPercent of the x-axis, the start value of x-axis will be automatically adjusted to make better use of space.

      Setting an explicit xAxisStartValue disables this behavior, as does setting minXDataSpreadPercent to 0.

      Returns:
      Current minXDataSpreadPercent value. Default value is 30
      See Also:
    • setOtherAxisGradationGaps

      public FacetChart setOtherAxisGradationGaps(float... otherAxisGradationGaps)
      Like gradationGaps, except allows control of gradations for the X (horizontal) axis, for Scatter charts only.

      See also otherAxisGradationTimes for control of gradations when the X axis is time-valued.

      Defaults to the value of pixelsPerGradation if unset.

      If this method is called after the component has been drawn/initialized: Setter for otherAxisGradationGaps.

      Parameters:
      otherAxisGradationGaps - new otherAxisGradationGaps value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
    • getOtherAxisGradationGaps

      public float[] getOtherAxisGradationGaps()
      Like gradationGaps, except allows control of gradations for the X (horizontal) axis, for Scatter charts only.

      See also otherAxisGradationTimes for control of gradations when the X axis is time-valued.

      Defaults to the value of pixelsPerGradation if unset.

      Returns:
      Current otherAxisGradationGaps value. Default value is null
    • setOtherAxisGradationTimes

      public FacetChart setOtherAxisGradationTimes(String... otherAxisGradationTimes)
      For charts that have a date/time-valued X-axis, gradations can instead be specified as Strings, consisting of a number and trailing letter code, where the letter code indicates the unit of time. Valid time units are "ms" (millisecond), "s" (second), "mn" (minute), "h" (hour), "d" (day), "w" (week), "m" (month), "q" (quarter, 3-months), "y" (year).

      When time units are used, there is no way to scale the same unit to a much larger or smaller range of time (as there is with numeric gradations). For example, a setting of "30mn" meaning "30 minutes" does not mean that 30 hours is a natural choice for chart with a longer timeline (days should obviously be chosen instead). Therefore, when specifying time gradations, candidate gradations must be provided for the entire possible displayed range. If insufficient gradations are specified, this can result in unreadable charts; for example, if the largest available gradation is "15mn" and the chart is showing a full week's data in around 500px, there will be more than one gradation per pixel, and labels will be drawn on top of each other.

      To prevent this, be sure to specify enough gradations to cover the all time ranges your chart may need to display. However, if gradations are not specified for granularities under 1 second or over 1 year, further gradations will be chosen based on using otherAxisGradationGaps to choose fractions of seconds or multiples of years.

      The default setting is effectively:

        ["1s", "15s", "30s", "1mn", "5mn", "15mn", "30mn", "1h", "1d", "1w", "1m", "1q", "1y"]
        


      If this method is called after the component has been drawn/initialized: Setter for otherAxisGradationTimes.
      Parameters:
      otherAxisGradationTimes - new otherAxisGradationTimes value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getOtherAxisGradationTimes

      public String[] getOtherAxisGradationTimes()
      For charts that have a date/time-valued X-axis, gradations can instead be specified as Strings, consisting of a number and trailing letter code, where the letter code indicates the unit of time. Valid time units are "ms" (millisecond), "s" (second), "mn" (minute), "h" (hour), "d" (day), "w" (week), "m" (month), "q" (quarter, 3-months), "y" (year).

      When time units are used, there is no way to scale the same unit to a much larger or smaller range of time (as there is with numeric gradations). For example, a setting of "30mn" meaning "30 minutes" does not mean that 30 hours is a natural choice for chart with a longer timeline (days should obviously be chosen instead). Therefore, when specifying time gradations, candidate gradations must be provided for the entire possible displayed range. If insufficient gradations are specified, this can result in unreadable charts; for example, if the largest available gradation is "15mn" and the chart is showing a full week's data in around 500px, there will be more than one gradation per pixel, and labels will be drawn on top of each other.

      To prevent this, be sure to specify enough gradations to cover the all time ranges your chart may need to display. However, if gradations are not specified for granularities under 1 second or over 1 year, further gradations will be chosen based on using otherAxisGradationGaps to choose fractions of seconds or multiples of years.

      The default setting is effectively:

        ["1s", "15s", "30s", "1mn", "5mn", "15mn", "30mn", "1h", "1d", "1w", "1m", "1q", "1y"]
        
      Returns:
      Current otherAxisGradationTimes value. Default value is null
      See Also:
    • setOtherAxisPixelsPerGradation

      public FacetChart setOtherAxisPixelsPerGradation(Integer otherAxisPixelsPerGradation)
      Ideal number of pixels to leave between each gradation on the x (horizontal axis), for Scatter plots only.

      Defaults to the value of pixelsPerGradation if unset.

      If this method is called after the component has been drawn/initialized: Setter for otherAxisPixelsPerGradation.

      Parameters:
      otherAxisPixelsPerGradation - new otherAxisPixelsPerGradation value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getOtherAxisPixelsPerGradation

      public Integer getOtherAxisPixelsPerGradation()
      Ideal number of pixels to leave between each gradation on the x (horizontal axis), for Scatter plots only.

      Defaults to the value of pixelsPerGradation if unset.

      Returns:
      Current otherAxisPixelsPerGradation value. Default value is null
      See Also:
    • setOuterLabelFacetLineProperties

      public FacetChart setOuterLabelFacetLineProperties(DrawLine outerLabelFacetLineProperties) throws IllegalStateException
      Properties for the lines drawn to show the span of outer data label facet values, if present.
      Parameters:
      outerLabelFacetLineProperties - New outerLabelFacetLineProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getOuterLabelFacetLineProperties

      public DrawLine getOuterLabelFacetLineProperties()
      Properties for the lines drawn to show the span of outer data label facet values, if present.
      Returns:
      Current outerLabelFacetLineProperties value. Default value is null
    • setPadChartRectByCornerRadius

      public FacetChart setPadChartRectByCornerRadius(boolean padChartRectByCornerRadius) throws IllegalStateException
      If showChartRect is enabled and if chartRectProperties specifies a nonzero rounding, whether the padding around the inside of the chart rect. should include at least the radius of the rounded corner.
      Parameters:
      padChartRectByCornerRadius - New padChartRectByCornerRadius value. Default value is true
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getPadChartRectByCornerRadius

      public boolean getPadChartRectByCornerRadius()
      If showChartRect is enabled and if chartRectProperties specifies a nonzero rounding, whether the padding around the inside of the chart rect. should include at least the radius of the rounded corner.
      Returns:
      Current padChartRectByCornerRadius value. Default value is true
    • setPieBorderProperties

      public FacetChart setPieBorderProperties(DrawOval pieBorderProperties) throws IllegalStateException
      Properties for the border around a pie chart.
      Parameters:
      pieBorderProperties - New pieBorderProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getPieBorderProperties

      public DrawOval getPieBorderProperties()
      Properties for the border around a pie chart.
      Returns:
      Current pieBorderProperties value. Default value is null
    • setPieLabelAngleStart

      public FacetChart setPieLabelAngleStart(int pieLabelAngleStart) throws IllegalStateException
      Angle where first label is placed in a Pie chart in stacked mode, in degrees.
      Parameters:
      pieLabelAngleStart - New pieLabelAngleStart value. Default value is 20
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getPieLabelAngleStart

      public int getPieLabelAngleStart()
      Angle where first label is placed in a Pie chart in stacked mode, in degrees.
      Returns:
      Current pieLabelAngleStart value. Default value is 20
    • setPieLabelLineExtent

      public FacetChart setPieLabelLineExtent(int pieLabelLineExtent) throws IllegalStateException
      How far label lines stick out of the pie radius in a Pie chart in stacked mode.
      Parameters:
      pieLabelLineExtent - New pieLabelLineExtent value. Default value is 7
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getPieLabelLineExtent

      public int getPieLabelLineExtent()
      How far label lines stick out of the pie radius in a Pie chart in stacked mode.
      Returns:
      Current pieLabelLineExtent value. Default value is 7
    • setPieLabelLineProperties

      public FacetChart setPieLabelLineProperties(DrawLine pieLabelLineProperties)
      Properties for pie label line
      Parameters:
      pieLabelLineProperties - New pieLabelLineProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getPieLabelLineProperties

      public DrawLine getPieLabelLineProperties()
      Properties for pie label line
      Returns:
      Current pieLabelLineProperties value. Default value is null
    • setPieRingBorderProperties

      public FacetChart setPieRingBorderProperties(DrawOval pieRingBorderProperties) throws IllegalStateException
      Properties for pie ring border
      Parameters:
      pieRingBorderProperties - New pieRingBorderProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getPieRingBorderProperties

      public DrawOval getPieRingBorderProperties()
      Properties for pie ring border
      Returns:
      Current pieRingBorderProperties value. Default value is null
    • setPieSliceProperties

      public FacetChart setPieSliceProperties(DrawSector pieSliceProperties) throws IllegalStateException
      Properties for pie slices
      Parameters:
      pieSliceProperties - New pieSliceProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getPieSliceProperties

      public DrawSector getPieSliceProperties()
      Properties for pie slices
      Returns:
      Current pieSliceProperties value. Default value is null
    • setPieStartAngle

      public FacetChart setPieStartAngle(Integer pieStartAngle) throws IllegalStateException
      Default angle in degrees where pie charts start drawing sectors to represent data values. Default of 0 places the first value starting from the "east" position. Use 270 or -90 for north.
      Parameters:
      pieStartAngle - New pieStartAngle value. Default value is 0
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getPieStartAngle

      public Integer getPieStartAngle()
      Default angle in degrees where pie charts start drawing sectors to represent data values. Default of 0 places the first value starting from the "east" position. Use 270 or -90 for north.
      Returns:
      Current pieStartAngle value. Default value is 0
    • setPixelsPerGradation

      public FacetChart setPixelsPerGradation(int pixelsPerGradation)
      Ideal number of pixels to leave between each gradation on the primary axis, which is typically the y (vertical) axis except for Bar charts.

      The chart will detect the range of values being displayed and available pixels on the vertical axis, and generate gradations that are spaced approximately pixelsPerGradations apart. Note that the Framework will attempt to approach the specified target gap from above - the chart will never be drawn with gradations spaced closer than pixelsPerGradation.

      If this method is called after the component has been drawn/initialized: Setter for pixelsPerGradation.

      Parameters:
      pixelsPerGradation - new pixelsPerGradation value. Default value is 28
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getPixelsPerGradation

      public int getPixelsPerGradation()
      Ideal number of pixels to leave between each gradation on the primary axis, which is typically the y (vertical) axis except for Bar charts.

      The chart will detect the range of values being displayed and available pixels on the vertical axis, and generate gradations that are spaced approximately pixelsPerGradations apart. Note that the Framework will attempt to approach the specified target gap from above - the chart will never be drawn with gradations spaced closer than pixelsPerGradation.

      Returns:
      Current pixelsPerGradation value. Default value is 28
      See Also:
    • setPointColorLogBase

      public FacetChart setPointColorLogBase(Integer pointColorLogBase) throws IllegalStateException
      When logScalePointColor is true, this property specifies the base value for logarithmic color scale metric values.
      Parameters:
      pointColorLogBase - New pointColorLogBase value. Default value is 10
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getPointColorLogBase

      public Integer getPointColorLogBase()
      When logScalePointColor is true, this property specifies the base value for logarithmic color scale metric values.
      Returns:
      Current pointColorLogBase value. Default value is 10
    • setPointShapes

      public FacetChart setPointShapes(PointShape... pointShapes) throws IllegalStateException
      For charts where showDataPoints is enabled, this property specifies an array of geometric shapes to draw for the data points of each series.
      Parameters:
      pointShapes - New pointShapes value. Default value is ["Oval", "Square", "Diamond", "Triangle"]
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getPointShapes

      public PointShape[] getPointShapes()
      For charts where showDataPoints is enabled, this property specifies an array of geometric shapes to draw for the data points of each series.
      Returns:
      Current pointShapes value. Default value is ["Oval", "Square", "Diamond", "Triangle"]
    • setPointSizeGradations

      public FacetChart setPointSizeGradations(Integer pointSizeGradations) throws IllegalStateException
      When a point size legend is shown, this property controls the number of gradations of the pointSizeMetric that the chart tries to display.

      Note that if usePointSizeLogGradations is set then the number of gradations is not given by this property but rather by the entries of pointSizeLogGradations.

      Parameters:
      pointSizeGradations - New pointSizeGradations value. Default value is 5
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getPointSizeGradations

      public Integer getPointSizeGradations()
      When a point size legend is shown, this property controls the number of gradations of the pointSizeMetric that the chart tries to display.

      Note that if usePointSizeLogGradations is set then the number of gradations is not given by this property but rather by the entries of pointSizeLogGradations.

      Returns:
      Current pointSizeGradations value. Default value is 5
    • setPointSizeLogBase

      public FacetChart setPointSizeLogBase(Integer pointSizeLogBase) throws IllegalStateException
      When logScalePointSize is true, base value for logarithmic point size metric values.
      Parameters:
      pointSizeLogBase - New pointSizeLogBase value. Default value is 10
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getPointSizeLogBase

      public Integer getPointSizeLogBase()
      When logScalePointSize is true, base value for logarithmic point size metric values.
      Returns:
      Current pointSizeLogBase value. Default value is 10
    • setPointSizeLogGradations

      public FacetChart setPointSizeLogGradations(float... pointSizeLogGradations) throws IllegalStateException
      When usePointSizeLogGradations is set, this property specifies the pointSizeMetric value gradations to show in the point size legend in between powers, expressed as a series of integer or float values between 1 and pointSizeLogBase.
      Parameters:
      pointSizeLogGradations - New pointSizeLogGradations value. Default value is [1, 5]
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getPointSizeLogGradations

      public float[] getPointSizeLogGradations()
      When usePointSizeLogGradations is set, this property specifies the pointSizeMetric value gradations to show in the point size legend in between powers, expressed as a series of integer or float values between 1 and pointSizeLogBase.
      Returns:
      Current pointSizeLogGradations value. Default value is [1, 5]
      See Also:
    • setPointSizeMetric

      public FacetChart setPointSizeMetric(String pointSizeMetric) throws IllegalStateException
      For charts where showDataPoints is enabled, this property specifies an additional metric (i.e. an "id" of a metric facet value) that determines the size of the data points drawn. For example, when a circle is drawn to represent a data point then the size of the data point is the diameter of the circle, in pixels.

      The size is calculated by linearly scaling the value of the pointSizeMetric of the point between the minDataPointSize and maxDataPointSize. The data point that has the lowest value for the pointSizeMetric will be drawn as a shape minDataPointSize pixels in size, and the data point that has the highest value for the pointSizeMetric will be drawn as a shape maxDataPointSize pixels in size.

      Using a log-scale to calulate the size of the data points is achieved by enabling logScalePointSize.

      If the ChartType is "Bubble" then the default pointSizeMetric is "pointSize".

      Note that setting pointSizeMetric to non-null implicitly enables showDataPoints.

      Parameters:
      pointSizeMetric - New pointSizeMetric value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getPointSizeMetric

      public String getPointSizeMetric()
      For charts where showDataPoints is enabled, this property specifies an additional metric (i.e. an "id" of a metric facet value) that determines the size of the data points drawn. For example, when a circle is drawn to represent a data point then the size of the data point is the diameter of the circle, in pixels.

      The size is calculated by linearly scaling the value of the pointSizeMetric of the point between the minDataPointSize and maxDataPointSize. The data point that has the lowest value for the pointSizeMetric will be drawn as a shape minDataPointSize pixels in size, and the data point that has the highest value for the pointSizeMetric will be drawn as a shape maxDataPointSize pixels in size.

      Using a log-scale to calulate the size of the data points is achieved by enabling logScalePointSize.

      If the ChartType is "Bubble" then the default pointSizeMetric is "pointSize".

      Note that setting pointSizeMetric to non-null implicitly enables showDataPoints.

      Returns:
      Current pointSizeMetric value. Default value is null
      See Also:
    • setPrintZoomChart

      public FacetChart setPrintZoomChart(boolean printZoomChart)
      Should the zoom chart be printed with this FacetChart? If true, then the SVG string returned by DrawPane.getSvgString() will include the zoom chart's SVG as well.

      Note : This is an advanced setting

      Parameters:
      printZoomChart - New printZoomChart value. Default value is true
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getPrintZoomChart

      public boolean getPrintZoomChart()
      Should the zoom chart be printed with this FacetChart? If true, then the SVG string returned by DrawPane.getSvgString() will include the zoom chart's SVG as well.
      Returns:
      Current printZoomChart value. Default value is true
      See Also:
    • setProbabilityMetric

      public FacetChart setProbabilityMetric(String probabilityMetric) throws IllegalStateException
      The "id" of the metric facet value that assigns a probability to each combination of facets and their values. Each probability must be a non-negative number. These probabilities are used by all methods of FacetChart that calculate statistical values (e.g. getMean() and getStdDev()). The default value of this property is null which causes the FacetChart to assign probabilities to the data records according to a uniform probability distribution.

      Note that the FacetChart handles cases where the sum total of all probabilities in the data is not exactly one by scaling the assigned probabilities.

      Parameters:
      probabilityMetric - New probabilityMetric value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getProbabilityMetric

      public String getProbabilityMetric()
      The "id" of the metric facet value that assigns a probability to each combination of facets and their values. Each probability must be a non-negative number. These probabilities are used by all methods of FacetChart that calculate statistical values (e.g. getMean() and getStdDev()). The default value of this property is null which causes the FacetChart to assign probabilities to the data records according to a uniform probability distribution.

      Note that the FacetChart handles cases where the sum total of all probabilities in the data is not exactly one by scaling the assigned probabilities.

      Returns:
      Current probabilityMetric value. Default value is null
      See Also:
    • setProportional

      public FacetChart setProportional(Boolean proportional)
      For multi-facet charts, render data values as a proportion of the sum of all data values that have the same label.

      Gradation labels will be switched to show percentage instead of absolute values.

      This setting is valid only for Column, Bar, Area and Radar chart types and only in stacked mode. Stacked columns will be as tall as the chart rect and stacked bars will be as wide as the chart rect. Area and Radar charts will be completely filled except for facet values where all values are 0.

      If this method is called after the component has been drawn/initialized: Setter for proportional.

      Parameters:
      proportional - Whether the chart should now use proportional mode. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getProportional

      public Boolean getProportional()
      For multi-facet charts, render data values as a proportion of the sum of all data values that have the same label.

      Gradation labels will be switched to show percentage instead of absolute values.

      This setting is valid only for Column, Bar, Area and Radar chart types and only in stacked mode. Stacked columns will be as tall as the chart rect and stacked bars will be as wide as the chart rect. Area and Radar charts will be completely filled except for facet values where all values are 0.

      Returns:
      Current proportional value. Default value is null
      See Also:
    • setProportionalAxisLabel

      public FacetChart setProportionalAxisLabel(String proportionalAxisLabel) throws IllegalStateException
      Default title for the value axis label when the chart is in proportional rendering mode. This title will be used unless the legend facet defines a proportionalTitle.
      Parameters:
      proportionalAxisLabel - New proportionalAxisLabel value. Default value is "Percent"
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getProportionalAxisLabel

      public String getProportionalAxisLabel()
      Default title for the value axis label when the chart is in proportional rendering mode. This title will be used unless the legend facet defines a proportionalTitle.
      Returns:
      Current proportionalAxisLabel value. Default value is "Percent"
    • setRadarBackgroundProperties

      public FacetChart setRadarBackgroundProperties(DrawOval radarBackgroundProperties) throws IllegalStateException
      Properties for radar background
      Parameters:
      radarBackgroundProperties - New radarBackgroundProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getRadarBackgroundProperties

      public DrawOval getRadarBackgroundProperties()
      Properties for radar background
      Returns:
      Current radarBackgroundProperties value. Default value is null
    • setRadarRotateLabels

      public FacetChart setRadarRotateLabels(LabelRotationMode radarRotateLabels) throws IllegalStateException
      This property controls whether to rotate the labels on the data label facet of radar or stacked pie charts so that each label is parallel to its radial gradation (these are the labels that appear around the perimeter). For now, "auto" means the same thing as "always" - but this may change in the future if heuristics are added to determine when the affected labels are likely to overlap and not be legible. If rotateLabels is "never" then the labels will not be rotated.

      Parameters:
      radarRotateLabels - New radarRotateLabels value. Default value is "auto"
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getRadarRotateLabels

      public LabelRotationMode getRadarRotateLabels()
      This property controls whether to rotate the labels on the data label facet of radar or stacked pie charts so that each label is parallel to its radial gradation (these are the labels that appear around the perimeter). For now, "auto" means the same thing as "always" - but this may change in the future if heuristics are added to determine when the affected labels are likely to overlap and not be legible. If rotateLabels is "never" then the labels will not be rotated.

      Returns:
      Current radarRotateLabels value. Default value is "auto"
      See Also:
    • setRadialLabelOffset

      public FacetChart setRadialLabelOffset(Integer radialLabelOffset) throws IllegalStateException
      Distance in pixels that radial labels are offset from the outside of the circle. Default can vary depending upon ChartType and radarRotateLabels.
      Parameters:
      radialLabelOffset - New radialLabelOffset value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getRadialLabelOffset

      public Integer getRadialLabelOffset()
      Distance in pixels that radial labels are offset from the outside of the circle. Default can vary depending upon ChartType and radarRotateLabels.
      Returns:
      Current radialLabelOffset value. Default value is null
    • setRegressionLineProperties

      public FacetChart setRegressionLineProperties(DrawLine regressionLineProperties) throws IllegalStateException
      Properties for the regression line.
      Parameters:
      regressionLineProperties - New regressionLineProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getRegressionLineProperties

      public DrawLine getRegressionLineProperties()
      Properties for the regression line.
      Returns:
      Current regressionLineProperties value. Default value is null
    • setRegressionLineType

      public FacetChart setRegressionLineType(RegressionLineType regressionLineType)
      Regression algorithm used for the regression line.

      If this method is called after the component has been drawn/initialized: Setter for RegressionLineType.
      Parameters:
      regressionLineType - New value for this.regressionLineType. Default value is "line"
      Returns:
      FacetChart instance, for chaining setter calls
    • getRegressionLineType

      public RegressionLineType getRegressionLineType()
      Regression algorithm used for the regression line.
      Returns:
      Current regressionLineType value. Default value is "line"
    • setRegressionPolynomialDegree

      public FacetChart setRegressionPolynomialDegree(int regressionPolynomialDegree)
      For scatter plots only, specify the degree of polynomial to use for any polynomial regression that is calculated.

      If this method is called after the component has been drawn/initialized: Setter for regressionPolynomialDegree.
      Parameters:
      regressionPolynomialDegree - New value for this.regressionPolynomialDegree. Default value is 3
      Returns:
      FacetChart instance, for chaining setter calls
    • getRegressionPolynomialDegree

      public int getRegressionPolynomialDegree()
      For scatter plots only, specify the degree of polynomial to use for any polynomial regression that is calculated.
      Returns:
      Current regressionPolynomialDegree value. Default value is 3
    • setRotateDataValues

      public FacetChart setRotateDataValues(LabelRotationMode rotateDataValues)
      This property controls whether to rotate the labels shown for data-values in Column-type charts. "auto" will rotate all data-values if any of them are wider than their columns. In all cases, whether rotated or not, data-values are hidden and instead shown in hovers if any of them exceed their bar's width.
      Parameters:
      rotateDataValues - New rotateDataValues value. Default value is "auto"
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getRotateDataValues

      public LabelRotationMode getRotateDataValues()
      This property controls whether to rotate the labels shown for data-values in Column-type charts. "auto" will rotate all data-values if any of them are wider than their columns. In all cases, whether rotated or not, data-values are hidden and instead shown in hovers if any of them exceed their bar's width.
      Returns:
      Current rotateDataValues value. Default value is "auto"
      See Also:
    • setRotateLabels

      public FacetChart setRotateLabels(LabelRotationMode rotateLabels) throws IllegalStateException
      This property controls whether to rotate the labels on the X-axis. If rotateLabels is "always" then all of the data labels will be rotated by 90 degrees. If rotateLabels is "auto" (the default) then the labels will only be rotated if it is required in order for the labels to be legible and non-overlapping. If rotateLabels is "never" then the labels will not be rotated.

      Note that automatic rotation is incompatible with setting a cluster-size-minimum customizer using FacetChart.setMinClusterSizeMapper(), so that LabelRotationMode.AUTO will be treated as LabelRotationMode.NEVER if that method has been specified on a column, bar, or histogram chart.

      Parameters:
      rotateLabels - New rotateLabels value. Default value is "auto"
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getRotateLabels

      public LabelRotationMode getRotateLabels()
      This property controls whether to rotate the labels on the X-axis. If rotateLabels is "always" then all of the data labels will be rotated by 90 degrees. If rotateLabels is "auto" (the default) then the labels will only be rotated if it is required in order for the labels to be legible and non-overlapping. If rotateLabels is "never" then the labels will not be rotated.

      Note that automatic rotation is incompatible with setting a cluster-size-minimum customizer using FacetChart.setMinClusterSizeMapper(), so that LabelRotationMode.AUTO will be treated as LabelRotationMode.NEVER if that method has been specified on a column, bar, or histogram chart.

      Returns:
      Current rotateLabels value. Default value is "auto"
      See Also:
    • setScaleEndColor

      public FacetChart setScaleEndColor(String scaleEndColor)
      The ending color of the color scale when the data points are colored according to a color scale metric. If neither this property nor the scaleStartColor is set then the whole color range is used by default.

      Note that using CSS color shortcuts (e.g. "lightblue") is not allowed for this property.

      If this method is called after the component has been drawn/initialized: Setter for scaleEndColor.

      Parameters:
      scaleEndColor - The new end color for the color scale. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getScaleEndColor

      public String getScaleEndColor()
      The ending color of the color scale when the data points are colored according to a color scale metric. If neither this property nor the scaleStartColor is set then the whole color range is used by default.

      Note that using CSS color shortcuts (e.g. "lightblue") is not allowed for this property.

      Returns:
      Current scaleEndColor value. Default value is null
      See Also:
    • setScaleStartColor

      public FacetChart setScaleStartColor(String scaleStartColor)
      The starting color of the color scale when the data points are colored according to a color scale metric. If neither this property nor the scaleEndColor is set then the whole color range is used by default.

      Note that using CSS color shortcuts (e.g. "lightblue") is not allowed for this property.

      If this method is called after the component has been drawn/initialized: Setter for scaleStartColor.

      Parameters:
      scaleStartColor - The new start color for the color scale. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getScaleStartColor

      public String getScaleStartColor()
      The starting color of the color scale when the data points are colored according to a color scale metric. If neither this property nor the scaleEndColor is set then the whole color range is used by default.

      Note that using CSS color shortcuts (e.g. "lightblue") is not allowed for this property.

      Returns:
      Current scaleStartColor value. Default value is null
      See Also:
    • setShadowProperties

      public FacetChart setShadowProperties(DrawOval shadowProperties) throws IllegalStateException
      Properties for shadows.
      Parameters:
      shadowProperties - New shadowProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getShadowProperties

      public DrawOval getShadowProperties()
      Properties for shadows.
      Returns:
      Current shadowProperties value. Default value is null
      See Also:
    • setShowBubbleLegendPerShape

      public FacetChart setShowBubbleLegendPerShape(boolean showBubbleLegendPerShape) throws IllegalStateException
      Whether to draw multiple bubble legends horizontally stacked to the right of the chart, one per shape type.

      Note that this setting has no effect if useMultiplePointShapes is disabled.

      Parameters:
      showBubbleLegendPerShape - New showBubbleLegendPerShape value. Default value is false
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowBubbleLegendPerShape

      public boolean getShowBubbleLegendPerShape()
      Whether to draw multiple bubble legends horizontally stacked to the right of the chart, one per shape type.

      Note that this setting has no effect if useMultiplePointShapes is disabled.

      Returns:
      Current showBubbleLegendPerShape value. Default value is false
    • setShowChartRect

      public FacetChart setShowChartRect(Boolean showChartRect) throws IllegalStateException
      Whether to show a rectangular shape around the area of the chart where data is plotted.
      Parameters:
      showChartRect - New showChartRect value. Default value is false
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowChartRect

      public Boolean getShowChartRect()
      Whether to show a rectangular shape around the area of the chart where data is plotted.
      Returns:
      Current showChartRect value. Default value is false
    • setShowColorScaleLegend

      public FacetChart setShowColorScaleLegend(Boolean showColorScaleLegend) throws IllegalStateException
      Whether to show an additional legend underneath the chart to indicate color values. The default is true if a valid colorScaleMetric is specified.
      Parameters:
      showColorScaleLegend - New showColorScaleLegend value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getShowColorScaleLegend

      public Boolean getShowColorScaleLegend()
      Whether to show an additional legend underneath the chart to indicate color values. The default is true if a valid colorScaleMetric is specified.
      Returns:
      Current showColorScaleLegend value. Default value is null
      See Also:
    • setShowDataAxisLabel

      public FacetChart setShowDataAxisLabel(Boolean showDataAxisLabel) throws IllegalStateException
      Whether to show a label for the data axis as a whole (the data axis is where labels for each data point appear). If true, Facet.title for the data label facet will be shown as the label.

      Automatically disabled for non-rectangular charts (eg Pie, Radar).

      Parameters:
      showDataAxisLabel - New showDataAxisLabel value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowDataAxisLabel

      public Boolean getShowDataAxisLabel()
      Whether to show a label for the data axis as a whole (the data axis is where labels for each data point appear). If true, Facet.title for the data label facet will be shown as the label.

      Automatically disabled for non-rectangular charts (eg Pie, Radar).

      Returns:
      Current showDataAxisLabel value. Default value is null
    • setShowDataLabels

      public FacetChart setShowDataLabels(boolean showDataLabels) throws IllegalStateException
      If set to false, data labels for values are entirely omitted.

      This property would generally only be set to false if several small charts are shown together and the data labels are drawn elsewhere on the screen (above an entire stack of charts, for instance) or are otherwise implicit.

      Parameters:
      showDataLabels - New showDataLabels value. Default value is true
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowDataLabels

      public boolean getShowDataLabels()
      If set to false, data labels for values are entirely omitted.

      This property would generally only be set to false if several small charts are shown together and the data labels are drawn elsewhere on the screen (above an entire stack of charts, for instance) or are otherwise implicit.

      Returns:
      Current showDataLabels value. Default value is true
    • setShowDataPoints

      public FacetChart setShowDataPoints(Boolean showDataPoints) throws IllegalStateException
      For Line, Area, Radar, Scatter or Bubble charts, whether to show data points for each individual data value.

      If shown, the pointClick() and getPointHoverHTML() APIs can be used to create interactivity.

      Parameters:
      showDataPoints - New showDataPoints value. Default value is false
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowDataPoints

      public Boolean getShowDataPoints()
      For Line, Area, Radar, Scatter or Bubble charts, whether to show data points for each individual data value.

      If shown, the pointClick() and getPointHoverHTML() APIs can be used to create interactivity.

      Returns:
      Current showDataPoints value. Default value is false
    • setShowDataValues

      public FacetChart setShowDataValues(boolean showDataValues) throws IllegalStateException
      Deprecated.
      in favor of showDataValuesMode, a compound setting that supports showing data-values in the chart and in hovers in various combinations. The equivalent to showDataValues:true is ShowDataValuesMode.inChartOnly or ShowDataValuesMode.inChartOrHover if showValueOnHover was also set to true.
      Should data values be shown as text labels near the shape representing the value, for example, above columns of a column chart, or adjacent to points in a line chart?

      If set to false, then data values will not be shown.

      If set to true, data values will be shown unless the data density is high enough that labels will potentially overlap, in which case, data values will not be shown and hovers will be shown instead, in the same way as showValueOnHover shows hovers.

      Parameters:
      showDataValues - New showDataValues value. Default value is false
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowDataValues

      public boolean getShowDataValues()
      Deprecated.
      in favor of showDataValuesMode, a compound setting that supports showing data-values in the chart and in hovers in various combinations. The equivalent to showDataValues:true is ShowDataValuesMode.inChartOnly or ShowDataValuesMode.inChartOrHover if showValueOnHover was also set to true.
      Should data values be shown as text labels near the shape representing the value, for example, above columns of a column chart, or adjacent to points in a line chart?

      If set to false, then data values will not be shown.

      If set to true, data values will be shown unless the data density is high enough that labels will potentially overlap, in which case, data values will not be shown and hovers will be shown instead, in the same way as showValueOnHover shows hovers.

      Returns:
      Current showDataValues value. Default value is false
    • setShowDataValuesMode

      public FacetChart setShowDataValuesMode(ShowDataValuesMode showDataValuesMode)
      Strategy for determining whether and when to show data-values - either in the chart, near the shape representing a value (above columns of a column chart for example, or adjacent to points in a line chart), in hovers, or some combination of both, including automatic rotation where supported.

      Depending on the chart type, there are different options for showing data-values - eg, stacked-charts cannot show values inline in the chart-body; column-charts can, and they can rotate titles if they're wider than their columns; pie charts can show some data-values in the chart but not others; all the types can show values in hovers.

      If set to never, then data-values will never be shown; inChartOnly allows data-values in the chart-body, where supported and where they will fit, but suppresses them in hovers and inHoverOnly always shows all data-values in hovers.

      If set to auto, first try to show values in the chart, where the chart-type supports it, and where they'll fit. If they don't all fit, show the ones that do, including rotating them if necessary, if the chart-type allows it, and then switch on hovers as well, as needed. This mode is particularly useful in situations where the chart-type can be changed by the user.

      Parameters:
      showDataValuesMode - New showDataValuesMode value. Default value is "never"
      Returns:
      FacetChart instance, for chaining setter calls
    • getShowDataValuesMode

      public ShowDataValuesMode getShowDataValuesMode()
      Strategy for determining whether and when to show data-values - either in the chart, near the shape representing a value (above columns of a column chart for example, or adjacent to points in a line chart), in hovers, or some combination of both, including automatic rotation where supported.

      Depending on the chart type, there are different options for showing data-values - eg, stacked-charts cannot show values inline in the chart-body; column-charts can, and they can rotate titles if they're wider than their columns; pie charts can show some data-values in the chart but not others; all the types can show values in hovers.

      If set to never, then data-values will never be shown; inChartOnly allows data-values in the chart-body, where supported and where they will fit, but suppresses them in hovers and inHoverOnly always shows all data-values in hovers.

      If set to auto, first try to show values in the chart, where the chart-type supports it, and where they'll fit. If they don't all fit, show the ones that do, including rotating them if necessary, if the chart-type allows it, and then switch on hovers as well, as needed. This mode is particularly useful in situations where the chart-type can be changed by the user.

      Returns:
      Current showDataValuesMode value. Default value is "never"
    • setShowDetailFields

      public FacetChart setShowDetailFields(Boolean showDetailFields) throws IllegalStateException
      This DataBoundComponent property is not applicable to charts.
      Specified by:
      setShowDetailFields in interface DataBoundComponent
      Parameters:
      showDetailFields - New showDetailFields value. Default value is false
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowDetailFields

      public Boolean getShowDetailFields()
      This DataBoundComponent property is not applicable to charts.
      Specified by:
      getShowDetailFields in interface DataBoundComponent
      Returns:
      Current showDetailFields value. Default value is false
    • setShowDoughnut

      public FacetChart setShowDoughnut(Boolean showDoughnut) throws IllegalStateException
      Whether to show a "doughnut hole" in the middle of pie charts. Defaults to whether chartType is set to "Doughnut" (shown) vs "Pie" (not shown) but can be forced on or off via showDoughnut.
      Parameters:
      showDoughnut - New showDoughnut value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowDoughnut

      public Boolean getShowDoughnut()
      Whether to show a "doughnut hole" in the middle of pie charts. Defaults to whether chartType is set to "Doughnut" (shown) vs "Pie" (not shown) but can be forced on or off via showDoughnut.
      Returns:
      Current showDoughnut value. Default value is null
    • setShowExpectedValueLine

      public FacetChart setShowExpectedValueLine(Boolean showExpectedValueLine) throws IllegalStateException
      Display a line at the mean value.

      Note that this expected value is computed using all of the data points, pooled across all facets. The computation relies only on the values of the main value axis metric and the probability metric.

      See http://en.wikipedia.org/wiki/Expected_value.

      Parameters:
      showExpectedValueLine - New showExpectedValueLine value. Default value is false
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowExpectedValueLine

      public Boolean getShowExpectedValueLine()
      Display a line at the mean value.

      Note that this expected value is computed using all of the data points, pooled across all facets. The computation relies only on the values of the main value axis metric and the probability metric.

      See http://en.wikipedia.org/wiki/Expected_value.

      Returns:
      Current showExpectedValueLine value. Default value is false
    • setShowGradationsOverData

      public FacetChart setShowGradationsOverData(Boolean showGradationsOverData) throws IllegalStateException
      If set, gradation lines are drawn on top of data rather than underneath.
      Parameters:
      showGradationsOverData - New showGradationsOverData value. Default value is false
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowGradationsOverData

      public Boolean getShowGradationsOverData()
      If set, gradation lines are drawn on top of data rather than underneath.
      Returns:
      Current showGradationsOverData value. Default value is false
    • setShowInlineLabels

      public FacetChart setShowInlineLabels(Boolean showInlineLabels) throws IllegalStateException
      Causes labels for the X axis to be shown above the axis and to the right of the gradation line they label, making for a vertically more compact chart at the risk of gradation labels being partially obscured by data values. Also causes the last label to be skipped (nowhere to place it).
      Parameters:
      showInlineLabels - New showInlineLabels value. Default value is false
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowInlineLabels

      public Boolean getShowInlineLabels()
      Causes labels for the X axis to be shown above the axis and to the right of the gradation line they label, making for a vertically more compact chart at the risk of gradation labels being partially obscured by data values. Also causes the last label to be skipped (nowhere to place it).
      Returns:
      Current showInlineLabels value. Default value is false
    • setShowLegend

      public FacetChart setShowLegend(Boolean showLegend) throws IllegalStateException
      The legend is automatically shown for charts that need it (generally, multi-series charts) but can be forced off by setting showLegend to false.
      Parameters:
      showLegend - New showLegend value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowLegend

      public Boolean getShowLegend()
      The legend is automatically shown for charts that need it (generally, multi-series charts) but can be forced off by setting showLegend to false.
      Returns:
      Current showLegend value. Default value is null
    • setShowMinorTicks

      public FacetChart setShowMinorTicks(boolean showMinorTicks)
      If ticks are being shown, controls whether a distinction is made between major and minor tick marks.

      If minor ticks are used, by default, major ticks are used for powers of 10 and minor ticks are used for other gradations. See majorTickGradations for control over which ticks are rendered as major vs minor ticks.

      If this method is called after the component has been drawn/initialized: Setter for showMinorTicks.

      Parameters:
      showMinorTicks - new showMinorTicks value. Default value is true
      Returns:
      FacetChart instance, for chaining setter calls
    • getShowMinorTicks

      public boolean getShowMinorTicks()
      If ticks are being shown, controls whether a distinction is made between major and minor tick marks.

      If minor ticks are used, by default, major ticks are used for powers of 10 and minor ticks are used for other gradations. See majorTickGradations for control over which ticks are rendered as major vs minor ticks.

      Returns:
      Current showMinorTicks value. Default value is true
    • setShowPointSizeLegend

      public FacetChart setShowPointSizeLegend(Boolean showPointSizeLegend) throws IllegalStateException
      Whether to show an additional legend to the right of the chart to indicate point size. The default is true for bubble charts and false for all other chart types.
      Parameters:
      showPointSizeLegend - New showPointSizeLegend value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getShowPointSizeLegend

      public Boolean getShowPointSizeLegend()
      Whether to show an additional legend to the right of the chart to indicate point size. The default is true for bubble charts and false for all other chart types.
      Returns:
      Current showPointSizeLegend value. Default value is null
      See Also:
    • setShowRadarGradationLabels

      public FacetChart setShowRadarGradationLabels(Boolean showRadarGradationLabels) throws IllegalStateException
      Whether to show gradation labels in radar charts.
      Parameters:
      showRadarGradationLabels - New showRadarGradationLabels value. Default value is true
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowRadarGradationLabels

      public Boolean getShowRadarGradationLabels()
      Whether to show gradation labels in radar charts.
      Returns:
      Current showRadarGradationLabels value. Default value is true
    • setShowRegressionLine

      public FacetChart setShowRegressionLine(Boolean showRegressionLine)
      For scatter plots only, whether to display a regression curve that best fits the data of the two metric facet values.

      The type of regression curve used depends on the RegressionLineType property, which can be:

      • "line" – to draw a linear regression curve, or
      • "polynomial" – to draw a polynomial regression curve (of degree regressionPolynomialDegree).

      Note that the regression is computed using all of the data points and it does not depend on the values of any non-metric facets. For example, adding a legend facet will not change the regression curve.

      See http://en.wikipedia.org/wiki/Simple_linear_regression. See http://en.wikipedia.org/wiki/Polynomial_regression.

      If this method is called after the component has been drawn/initialized: Setter for showRegressionLine.

      Parameters:
      showRegressionLine - New value for this.showRegressionLine. Default value is false
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getShowRegressionLine

      public Boolean getShowRegressionLine()
      For scatter plots only, whether to display a regression curve that best fits the data of the two metric facet values.

      The type of regression curve used depends on the RegressionLineType property, which can be:

      • "line" – to draw a linear regression curve, or
      • "polynomial" – to draw a polynomial regression curve (of degree regressionPolynomialDegree).

      Note that the regression is computed using all of the data points and it does not depend on the values of any non-metric facets. For example, adding a legend facet will not change the regression curve.

      See http://en.wikipedia.org/wiki/Simple_linear_regression. See http://en.wikipedia.org/wiki/Polynomial_regression.

      Returns:
      Current showRegressionLine value. Default value is false
      See Also:
    • setShowScatterLines

      public FacetChart setShowScatterLines(Boolean showScatterLines)
      Whether to draw lines between adjacent data points in "Scatter" plots. See also DataLineType for enabling smoothing.

      If this method is called after the component has been drawn/initialized: Method to change the current showScatterLines. Will redraw the chart if drawn.
      Parameters:
      showScatterLines - whether to draw lines between adjacent data points in "Scatter" plots. Default value is false
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getShowScatterLines

      public Boolean getShowScatterLines()
      Whether to draw lines between adjacent data points in "Scatter" plots. See also DataLineType for enabling smoothing.
      Returns:
      Current showScatterLines value. Default value is false
      See Also:
    • setShowShadows

      public FacetChart setShowShadows(Boolean showShadows) throws IllegalStateException
      Whether to automatically show shadows for various charts.
      Parameters:
      showShadows - New showShadows value. Default value is true
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getShowShadows

      public Boolean getShowShadows()
      Whether to automatically show shadows for various charts.
      Returns:
      Current showShadows value. Default value is true
      See Also:
    • setShowStandardDeviationLines

      public FacetChart setShowStandardDeviationLines(Boolean showStandardDeviationLines) throws IllegalStateException
      Display multiple standard deviations away from the mean as lines. The exact deviations to display can be customized with standardDeviations.

      Note that these standard deviations are computed using all of the data points, pooled across all facets. The computation relies only on the values of the main value axis metric and the probability metric.

      See http://en.wikipedia.org/wiki/Standard_deviation.

      Parameters:
      showStandardDeviationLines - New showStandardDeviationLines value. Default value is false
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowStandardDeviationLines

      public Boolean getShowStandardDeviationLines()
      Display multiple standard deviations away from the mean as lines. The exact deviations to display can be customized with standardDeviations.

      Note that these standard deviations are computed using all of the data points, pooled across all facets. The computation relies only on the values of the main value axis metric and the probability metric.

      See http://en.wikipedia.org/wiki/Standard_deviation.

      Returns:
      Current showStandardDeviationLines value. Default value is false
    • setShowStatisticsOverData

      public FacetChart setShowStatisticsOverData(Boolean showStatisticsOverData) throws IllegalStateException
      If set, the mean line, standard deviation lines, standard deviation bands, and regression curves are drawn on top of the data rather than underneath.
      Parameters:
      showStatisticsOverData - New showStatisticsOverData value. Default value is false
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowStatisticsOverData

      public Boolean getShowStatisticsOverData()
      If set, the mean line, standard deviation lines, standard deviation bands, and regression curves are drawn on top of the data rather than underneath.
      Returns:
      Current showStatisticsOverData value. Default value is false
    • setShowTitle

      public FacetChart setShowTitle(Boolean showTitle)
      Whether to show a title.
      Parameters:
      showTitle - New showTitle value. Default value is true
      Returns:
      FacetChart instance, for chaining setter calls
    • getShowTitle

      public Boolean getShowTitle()
      Whether to show a title.
      Returns:
      Current showTitle value. Default value is true
    • setShowValueAxisLabel

      public FacetChart setShowValueAxisLabel(Boolean showValueAxisLabel) throws IllegalStateException
      Whether to show the valueTitle (or, in the case of proportional rendering mode, the proportionalAxisLabel) as a label on the value axis.

      Automatically disabled for non-rectangular charts (eg Pie, Radar).

      Parameters:
      showValueAxisLabel - New showValueAxisLabel value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowValueAxisLabel

      public Boolean getShowValueAxisLabel()
      Whether to show the valueTitle (or, in the case of proportional rendering mode, the proportionalAxisLabel) as a label on the value axis.

      Automatically disabled for non-rectangular charts (eg Pie, Radar).

      Returns:
      Current showValueAxisLabel value. Default value is null
    • setShowValueOnHover

      public FacetChart setShowValueOnHover(Boolean showValueOnHover) throws IllegalStateException
      Deprecated.
      in favor of showDataValuesMode, a compound setting that supports showing data-values in the chart and in hovers in various combinations. The equivalent to showValueOnHover:true is ShowDataValuesMode.inHoverOnly.
      Shows the value of the nearest data value in a floating label whenever the mouse moves within the main chart area. The visual element representing the data value will also be emphasized by brightening or highlighting it (appearance differs by chart type).

      Calculates nearest value based on getNearestDrawnValue().

      The data value will be formatted using setDataValueFormatter(). The label's appearance is controlled by hoverLabelProperties.

      Parameters:
      showValueOnHover - New showValueOnHover value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getShowValueOnHover

      public Boolean getShowValueOnHover()
      Deprecated.
      in favor of showDataValuesMode, a compound setting that supports showing data-values in the chart and in hovers in various combinations. The equivalent to showValueOnHover:true is ShowDataValuesMode.inHoverOnly.
      Shows the value of the nearest data value in a floating label whenever the mouse moves within the main chart area. The visual element representing the data value will also be emphasized by brightening or highlighting it (appearance differs by chart type).

      Calculates nearest value based on getNearestDrawnValue().

      The data value will be formatted using setDataValueFormatter(). The label's appearance is controlled by hoverLabelProperties.

      Returns:
      Current showValueOnHover value. Default value is null
      See Also:
    • setShowXTicks

      public FacetChart setShowXTicks(boolean showXTicks)
      When set, ticks are shown for the X (horizontal) axis for Scatter plots or Bar charts.

      If this method is called after the component has been drawn/initialized: Setter for showXTicks.
      Parameters:
      showXTicks - new showXTicks value. Default value is false
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getShowXTicks

      public boolean getShowXTicks()
      When set, ticks are shown for the X (horizontal) axis for Scatter plots or Bar charts.
      Returns:
      Current showXTicks value. Default value is false
      See Also:
    • setShowYTicks

      public FacetChart setShowYTicks(boolean showYTicks)
      When set, ticks are shown for the Y (vertical) axis if it's a value axis.

      Normally, ticks are not shown for the primary axis, since gradation lines show value demarcations. Gradation lines are always show for extra value axes in multi-axis charts (since there are no gradation lines for the additional axes).

      showXTicks can be used to control whether ticks are shown for the horizontal axis, for certain chart types. See also majorTickGradations for control of which ticks are shown as major vs minor ticks.

      If this method is called after the component has been drawn/initialized: Setter for showYTicks.

      Parameters:
      showYTicks - new showYTicks value. Default value is false
      Returns:
      FacetChart instance, for chaining setter calls
    • getShowYTicks

      public boolean getShowYTicks()
      When set, ticks are shown for the Y (vertical) axis if it's a value axis.

      Normally, ticks are not shown for the primary axis, since gradation lines show value demarcations. Gradation lines are always show for extra value axes in multi-axis charts (since there are no gradation lines for the additional axes).

      showXTicks can be used to control whether ticks are shown for the horizontal axis, for certain chart types. See also majorTickGradations for control of which ticks are shown as major vs minor ticks.

      Returns:
      Current showYTicks value. Default value is false
    • setStacked

      public FacetChart setStacked(Boolean stacked)
      Whether to use stacking for charts where this makes sense (column, area, pie, line and radar charts). If stacked is not set and two facets are supplied, clustering is assumed. If null (the default), line charts will be unstacked, and others will be stacked.

      If this method is called after the component has been drawn/initialized: Method to change stacked. Use null to apply a default value for the current chartType.
      Parameters:
      stacked - new value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
    • getStacked

      public Boolean getStacked()
      Whether to use stacking for charts where this makes sense (column, area, pie, line and radar charts). If stacked is not set and two facets are supplied, clustering is assumed. If null (the default), line charts will be unstacked, and others will be stacked.
      Returns:
      Current stacked value. Default value is null
    • setStandardDeviationBandProperties

      public FacetChart setStandardDeviationBandProperties(DrawItem... standardDeviationBandProperties) throws IllegalStateException
      An Array of DrawRect properties to specify the bands between the standard deviation lines. The length of the Array must be one less than the length of the standardDeviations Array.

      Having no band between certain standard deviations from the mean can be specified by having a null element at the corresponding index of this Array.

      Note that if useSymmetricStandardDeviations is set then for each standard deviation band that is drawn a corresponding band will also be drawn on the opposite side of the mean line.

      Parameters:
      standardDeviationBandProperties - New standardDeviationBandProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • setStandardDeviationLineProperties

      public FacetChart setStandardDeviationLineProperties(DrawItem standardDeviationLineProperties) throws IllegalStateException
      Properties for the standard deviation lines.

      Note that for rectangular charts the properties are for a DrawLine, and for radar charts the properties are for a DrawOval.

      Parameters:
      standardDeviationLineProperties - New standardDeviationLineProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getStandardDeviationLineProperties

      public DrawItem getStandardDeviationLineProperties()
      Properties for the standard deviation lines.

      Note that for rectangular charts the properties are for a DrawLine, and for radar charts the properties are for a DrawOval.

      Returns:
      Current standardDeviationLineProperties value. Default value is null
    • setStandardDeviations

      public FacetChart setStandardDeviations(float... standardDeviations) throws IllegalStateException
      When showStandardDeviationLines is set, the number of standard deviation lines drawn and their respective standard deviation away from the mean are specified by this property. The default is to display lines corresponding to the mean plus or minus one standard deviation.

      Note that having zero in this list of standard deviations is identical to drawing a line at the mean.

      For example assume that chart1 and chart2 both plot data with mean 1 and standard deviation 0.1. chart1 will draw a blue line at the value 1 and two red lines at the values 0.7 and 1.2. chart2 will draw three red lines at values 0.9, 1.0, and 1.1.

        DrawLine blueLine = new DrawLine(),
            redLine = new DrawLine();
        blueLine.setLineColor("blue");
        redLine.setLineColor("red");
       
        FacetChart chart1 = new FacetChart();
        chart1.setID("chart1");
        chart1.setStandardDeviations(new Float[] { -3f, 2f });
        chart1.setShowExpectedValueLine(true);
        chart1.setShowStandardDeviationLines(true);
        chart1.setExpectedValueLineProperties(blueLine);
        chart1.setStandardDeviationLineProperties(redLine);
        chart1.setUseSymmetricStandardDeviations(false);
        // ...
       
        FacetChart chart2 = new FacetChart();
        chart2.setID("chart2");
        chart2.setStandardDeviations(new Float[] { -1f, 0f, 1f });
        chart2.setShowExpectedValueLine(false);
        chart2.setShowStandardDeviationLines(true);
        chart2.setExpectedValueLineProperties(blueLine);
        chart2.setStandardDeviationLineProperties(redLine);
        chart2.setUseSymmetricStandardDeviations(false);
        // ...
       
        chart1.draw();
        chart2.draw();
        
      Parameters:
      standardDeviations - New standardDeviations value. Default value is [-1, 1]
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getStandardDeviations

      public float[] getStandardDeviations()
      When showStandardDeviationLines is set, the number of standard deviation lines drawn and their respective standard deviation away from the mean are specified by this property. The default is to display lines corresponding to the mean plus or minus one standard deviation.

      Note that having zero in this list of standard deviations is identical to drawing a line at the mean.

      For example assume that chart1 and chart2 both plot data with mean 1 and standard deviation 0.1. chart1 will draw a blue line at the value 1 and two red lines at the values 0.7 and 1.2. chart2 will draw three red lines at values 0.9, 1.0, and 1.1.

        DrawLine blueLine = new DrawLine(),
            redLine = new DrawLine();
        blueLine.setLineColor("blue");
        redLine.setLineColor("red");
       
        FacetChart chart1 = new FacetChart();
        chart1.setID("chart1");
        chart1.setStandardDeviations(new Float[] { -3f, 2f });
        chart1.setShowExpectedValueLine(true);
        chart1.setShowStandardDeviationLines(true);
        chart1.setExpectedValueLineProperties(blueLine);
        chart1.setStandardDeviationLineProperties(redLine);
        chart1.setUseSymmetricStandardDeviations(false);
        // ...
       
        FacetChart chart2 = new FacetChart();
        chart2.setID("chart2");
        chart2.setStandardDeviations(new Float[] { -1f, 0f, 1f });
        chart2.setShowExpectedValueLine(false);
        chart2.setShowStandardDeviationLines(true);
        chart2.setExpectedValueLineProperties(blueLine);
        chart2.setStandardDeviationLineProperties(redLine);
        chart2.setUseSymmetricStandardDeviations(false);
        // ...
       
        chart1.draw();
        chart2.draw();
        
      Returns:
      Current standardDeviations value. Default value is [-1, 1]
    • setStyleName

      public void setStyleName(String styleName)
      Default styleName for the chart.
      Overrides:
      setStyleName in class Canvas
      Parameters:
      styleName - New styleName value. Default value is "scChart"
      See Also:
    • getStyleName

      public String getStyleName()
      Default styleName for the chart.
      Overrides:
      getStyleName in class Canvas
      Returns:
      Current styleName value. Default value is "scChart"
      See Also:
    • setTickLength

      public FacetChart setTickLength(int tickLength)
      Length of the tick marks used when either showXTicks or showYTicks is enabled, or when extra value axes are in use.

      If minor tick marks are also shown, their length is controlled by minorTickLength.

      If this method is called after the component has been drawn/initialized: Setter for tickLength.

      Parameters:
      tickLength - new tickLength value. Default value is 5
      Returns:
      FacetChart instance, for chaining setter calls
    • getTickLength

      public int getTickLength()
      Length of the tick marks used when either showXTicks or showYTicks is enabled, or when extra value axes are in use.

      If minor tick marks are also shown, their length is controlled by minorTickLength.

      Returns:
      Current tickLength value. Default value is 5
    • setTickMarkToValueAxisMargin

      public FacetChart setTickMarkToValueAxisMargin(int tickMarkToValueAxisMargin) throws IllegalStateException
      Margin between the tick marks and the labels of the extra value axes.
      Parameters:
      tickMarkToValueAxisMargin - New tickMarkToValueAxisMargin value. Default value is 7
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getTickMarkToValueAxisMargin

      public int getTickMarkToValueAxisMargin()
      Margin between the tick marks and the labels of the extra value axes.
      Returns:
      Current tickMarkToValueAxisMargin value. Default value is 7
    • setTitle

      public void setTitle(String title)
      Title for the chart as a whole.
      Overrides:
      setTitle in class Canvas
      Parameters:
      title - New title value. Default value is null
    • getTitle

      public String getTitle()
      Title for the chart as a whole.
      Overrides:
      getTitle in class Canvas
      Returns:
      Current title value. Default value is null
    • setTitleAlign

      public FacetChart setTitleAlign(TitleAlign titleAlign)
      Horizontal alignment of the chart's title with respect to the the visible chart-width.
      Parameters:
      titleAlign - New titleAlign value. Default value is "center"
      Returns:
      FacetChart instance, for chaining setter calls
    • getTitleAlign

      public TitleAlign getTitleAlign()
      Horizontal alignment of the chart's title with respect to the the visible chart-width.
      Returns:
      Current titleAlign value. Default value is "center"
    • setTitleBackgroundProperties

      public FacetChart setTitleBackgroundProperties(DrawLabel titleBackgroundProperties)
      Properties for title background (if being drawn).
      Parameters:
      titleBackgroundProperties - New titleBackgroundProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getTitleBackgroundProperties

      public DrawLabel getTitleBackgroundProperties()
      Properties for title background (if being drawn).
      Returns:
      Current titleBackgroundProperties value. Default value is null
    • setTitleBoundaryProperties

      public FacetChart setTitleBoundaryProperties(DrawLine titleBoundaryProperties) throws IllegalStateException
      Properties for bottom boundary of the title area, when there is already an outer container around the whole chart. see drawTitleBoundary
      Parameters:
      titleBoundaryProperties - New titleBoundaryProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getTitleBoundaryProperties

      public DrawLine getTitleBoundaryProperties()
      Properties for bottom boundary of the title area, when there is already an outer container around the whole chart. see drawTitleBoundary
      Returns:
      Current titleBoundaryProperties value. Default value is null
    • setTitlePadding

      public FacetChart setTitlePadding(int titlePadding)
      if aligning the title left or right, the amount of space before (for left aligned) or after (for right aligned) to pad the title from the border edge
      Parameters:
      titlePadding - New titlePadding value. Default value is 0
      Returns:
      FacetChart instance, for chaining setter calls
    • getTitlePadding

      public int getTitlePadding()
      if aligning the title left or right, the amount of space before (for left aligned) or after (for right aligned) to pad the title from the border edge
      Returns:
      Current titlePadding value. Default value is 0
    • setTitleProperties

      public FacetChart setTitleProperties(DrawLabel titleProperties)
      Properties for title label.
      Parameters:
      titleProperties - New titleProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getTitleProperties

      public DrawLabel getTitleProperties()
      Properties for title label.
      Returns:
      Current titleProperties value. Default value is null
    • setTitleRectHeight

      public FacetChart setTitleRectHeight(int titleRectHeight)
      The height of the bordered rect around the title - defaults to 0 (assuming no border)
      Parameters:
      titleRectHeight - New titleRectHeight value. Default value is 0
      Returns:
      FacetChart instance, for chaining setter calls
    • getTitleRectHeight

      public int getTitleRectHeight()
      The height of the bordered rect around the title - defaults to 0 (assuming no border)
      Returns:
      Current titleRectHeight value. Default value is 0
    • setUseAutoGradients

      public FacetChart setUseAutoGradients(Boolean useAutoGradients) throws IllegalStateException
      Causes the chart to use the colors specified in dataColors but specify chart-specific gradients based on the primary data color per chart type.
      Parameters:
      useAutoGradients - New useAutoGradients value. Default value is true
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getUseAutoGradients

      public Boolean getUseAutoGradients()
      Causes the chart to use the colors specified in dataColors but specify chart-specific gradients based on the primary data color per chart type.
      Returns:
      Current useAutoGradients value. Default value is true
    • setUseLogGradations

      public FacetChart setUseLogGradations(Boolean useLogGradations) throws IllegalStateException
      Whether to use classic logarithmic gradations, where each order of magnitude is shown as a gradation as well as a few intervening lines. Gradations also begin and end on an order of magnitude. For example, 1,2,4,6,8,10,20,40,60,80,100.

      Default gradations can be overridden via logBase and logGradations.

      Parameters:
      useLogGradations - New useLogGradations value. Default value is false
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getUseLogGradations

      public Boolean getUseLogGradations()
      Whether to use classic logarithmic gradations, where each order of magnitude is shown as a gradation as well as a few intervening lines. Gradations also begin and end on an order of magnitude. For example, 1,2,4,6,8,10,20,40,60,80,100.

      Default gradations can be overridden via logBase and logGradations.

      Returns:
      Current useLogGradations value. Default value is false
    • setUseMultiplePointShapes

      public FacetChart setUseMultiplePointShapes(Boolean useMultiplePointShapes)
      Whether the chart should use multiple shapes to show data points. If set to true then the chart is allowed to use all supported shapes: circles, squares, diamonds, and triangles. If set to false then just the first supported shape (circles, for example) will be used. The default is false for bubble charts and color scale charts and true for all other chart types.

      If this method is called after the component has been drawn/initialized: Setter for useMultiplePointShapes.
      Parameters:
      useMultiplePointShapes - Whether the chart should now use multiple shapes to show data points. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getUseMultiplePointShapes

      public Boolean getUseMultiplePointShapes()
      Whether the chart should use multiple shapes to show data points. If set to true then the chart is allowed to use all supported shapes: circles, squares, diamonds, and triangles. If set to false then just the first supported shape (circles, for example) will be used. The default is false for bubble charts and color scale charts and true for all other chart types.
      Returns:
      Current useMultiplePointShapes value. Default value is null
      See Also:
    • setUsePointSizeLogGradations

      public FacetChart setUsePointSizeLogGradations(Boolean usePointSizeLogGradations) throws IllegalStateException
      Whether to use classic logarithmic gradations, where each order of magnitude is shown as a gradation as well as a few intervening values, for the pointSizeMetric values displayed in the point size legend. Gradations also begin and end on an order of magnitude. For example, 1, 2, 4, 6, 8, 10, 20, 40, 60, 80, 100.

      Default gradations can be overridden via pointSizeLogBase and pointSizeLogGradations.

      Parameters:
      usePointSizeLogGradations - New usePointSizeLogGradations value. Default value is false
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getUsePointSizeLogGradations

      public Boolean getUsePointSizeLogGradations()
      Whether to use classic logarithmic gradations, where each order of magnitude is shown as a gradation as well as a few intervening values, for the pointSizeMetric values displayed in the point size legend. Gradations also begin and end on an order of magnitude. For example, 1, 2, 4, 6, 8, 10, 20, 40, 60, 80, 100.

      Default gradations can be overridden via pointSizeLogBase and pointSizeLogGradations.

      Returns:
      Current usePointSizeLogGradations value. Default value is false
      See Also:
    • setUseSymmetricStandardDeviations

      public FacetChart setUseSymmetricStandardDeviations(Boolean useSymmetricStandardDeviations) throws IllegalStateException
      Whether to display both the positive and negative of the standard deviations.
      Parameters:
      useSymmetricStandardDeviations - New useSymmetricStandardDeviations value. Default value is true
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getUseSymmetricStandardDeviations

      public Boolean getUseSymmetricStandardDeviations()
      Whether to display both the positive and negative of the standard deviations.
      Returns:
      Current useSymmetricStandardDeviations value. Default value is true
    • setValueAxisLabelProperties

      public FacetChart setValueAxisLabelProperties(DrawLabel valueAxisLabelProperties)
      Properties for labels of value axis.
      Parameters:
      valueAxisLabelProperties - New valueAxisLabelProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getValueAxisLabelProperties

      public DrawLabel getValueAxisLabelProperties()
      Properties for labels of value axis.
      Returns:
      Current valueAxisLabelProperties value. Default value is null
    • setValueAxisMargin

      public FacetChart setValueAxisMargin(int valueAxisMargin) throws IllegalStateException
      Margin between multiple value axes.
      Parameters:
      valueAxisMargin - New valueAxisMargin value. Default value is 10
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getValueAxisMargin

      public int getValueAxisMargin()
      Margin between multiple value axes.
      Returns:
      Current valueAxisMargin value. Default value is 10
      See Also:
    • setValueLineProperties

      public FacetChart setValueLineProperties(DrawLine valueLineProperties) throws IllegalStateException
      Properties for a "value line" - a line shows where a particular discrete value is placed, eg, vertical lines connecting points of a line chart to the X axis, or radial lines in a Radar chart.
      Parameters:
      valueLineProperties - New valueLineProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getValueLineProperties

      public DrawLine getValueLineProperties()
      Properties for a "value line" - a line shows where a particular discrete value is placed, eg, vertical lines connecting points of a line chart to the X axis, or radial lines in a Radar chart.
      Returns:
      Current valueLineProperties value. Default value is null
    • setValueProperty

      public FacetChart setValueProperty(String valueProperty) throws IllegalStateException
      Property in each record that holds a data value. For databound charts, if valueProperty isn't set in the chart instance, it will be auto-derived from the DataSource fields. The first numeric-typed DataSource field will be assumed to be the valueProperty.

      Not used if there is an inline facet, see Chart.data.

      Parameters:
      valueProperty - New valueProperty value. Default value is "_value"
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getValueProperty

      public String getValueProperty()
      Property in each record that holds a data value. For databound charts, if valueProperty isn't set in the chart instance, it will be auto-derived from the DataSource fields. The first numeric-typed DataSource field will be assumed to be the valueProperty.

      Not used if there is an inline facet, see Chart.data.

      Returns:
      Current valueProperty value. Default value is "_value"
      See Also:
    • setValueTitle

      public FacetChart setValueTitle(String valueTitle) throws IllegalStateException
      A label for the data values, such as "Sales in Thousands", typically used as the label for the value axis.
      Parameters:
      valueTitle - New valueTitle value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getValueTitle

      public String getValueTitle()
      A label for the data values, such as "Sales in Thousands", typically used as the label for the value axis.
      Returns:
      Current valueTitle value. Default value is null
    • setXAxisEndValue

      public FacetChart setXAxisEndValue(Double xAxisEndValue) throws IllegalStateException
      For Bubble and Scatter charts only, the end value for the x-axis.

      If set to an explicit value, this will be respected. If unset, the axis end value will default to a value large enough to show the largest data point.

      If the x-axis metric is date-valued, this value should be a date (typically applies to Scatter charts only).

      Parameters:
      xAxisEndValue - New xAxisEndValue value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getXAxisEndValue

      public Double getXAxisEndValue()
      For Bubble and Scatter charts only, the end value for the x-axis.

      If set to an explicit value, this will be respected. If unset, the axis end value will default to a value large enough to show the largest data point.

      If the x-axis metric is date-valued, this value should be a date (typically applies to Scatter charts only).

      Returns:
      Current xAxisEndValue value. Default value is null
      See Also:
    • setXAxisEndValue

      public FacetChart setXAxisEndValue(Date xAxisEndValue) throws IllegalStateException
      For Bubble and Scatter charts only, the end value for the x-axis.

      If set to an explicit value, this will be respected. If unset, the axis end value will default to a value large enough to show the largest data point.

      If the x-axis metric is date-valued, this value should be a date (typically applies to Scatter charts only).

      Parameters:
      xAxisEndValue - New xAxisEndValue value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getXAxisEndValueAsDate

      public Date getXAxisEndValueAsDate()
      For Bubble and Scatter charts only, the end value for the x-axis.

      If set to an explicit value, this will be respected. If unset, the axis end value will default to a value large enough to show the largest data point.

      If the x-axis metric is date-valued, this value should be a date (typically applies to Scatter charts only).

      Returns:
      Current xAxisEndValue value. Default value is null
      See Also:
    • setXAxisMetric

      public FacetChart setXAxisMetric(String xAxisMetric) throws IllegalStateException
      For scatter charts only, the "id" of the metric facet value to use for the x-axis.

      The default x-axis metric is the second value of the metric facet.

      Parameters:
      xAxisMetric - New xAxisMetric value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getXAxisMetric

      public String getXAxisMetric()
      For scatter charts only, the "id" of the metric facet value to use for the x-axis.

      The default x-axis metric is the second value of the metric facet.

      Returns:
      Current xAxisMetric value. Default value is null
    • setXAxisStartValue

      public FacetChart setXAxisStartValue(Double xAxisStartValue) throws IllegalStateException
      For Bubble and Scatter charts only, the start value for the x-axis.

      Defaults to 0, or to a value that makes good use of horizontal space based on minXDataSpreadPercent.

      If the x-axis metric is date-valued, this value should be a date (typically applies to Scatter charts only).

      Parameters:
      xAxisStartValue - New xAxisStartValue value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getXAxisStartValue

      public Double getXAxisStartValue()
      For Bubble and Scatter charts only, the start value for the x-axis.

      Defaults to 0, or to a value that makes good use of horizontal space based on minXDataSpreadPercent.

      If the x-axis metric is date-valued, this value should be a date (typically applies to Scatter charts only).

      Returns:
      Current xAxisStartValue value. Default value is null
      See Also:
    • setXAxisStartValue

      public FacetChart setXAxisStartValue(Date xAxisStartValue) throws IllegalStateException
      For Bubble and Scatter charts only, the start value for the x-axis.

      Defaults to 0, or to a value that makes good use of horizontal space based on minXDataSpreadPercent.

      If the x-axis metric is date-valued, this value should be a date (typically applies to Scatter charts only).

      Parameters:
      xAxisStartValue - New xAxisStartValue value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getXAxisStartValueAsDate

      public Date getXAxisStartValueAsDate()
      For Bubble and Scatter charts only, the start value for the x-axis.

      Defaults to 0, or to a value that makes good use of horizontal space based on minXDataSpreadPercent.

      If the x-axis metric is date-valued, this value should be a date (typically applies to Scatter charts only).

      Returns:
      Current xAxisStartValue value. Default value is null
      See Also:
    • setYAxisLabelAlign

      public FacetChart setYAxisLabelAlign(Alignment yAxisLabelAlign)
      Horizontal alignment of y-axis labels, shown to the left of the chart.
      Parameters:
      yAxisLabelAlign - New yAxisLabelAlign value. Default value is "right"
      Returns:
      FacetChart instance, for chaining setter calls
    • getYAxisLabelAlign

      public Alignment getYAxisLabelAlign()
      Horizontal alignment of y-axis labels, shown to the left of the chart.
      Returns:
      Current yAxisLabelAlign value. Default value is "right"
    • setYAxisLabelPadding

      public FacetChart setYAxisLabelPadding(int yAxisLabelPadding) throws IllegalStateException
      Padding between each swatch and label pair.
      Parameters:
      yAxisLabelPadding - New yAxisLabelPadding value. Default value is 5
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getYAxisLabelPadding

      public int getYAxisLabelPadding()
      Padding between each swatch and label pair.
      Returns:
      Current yAxisLabelPadding value. Default value is 5
    • setYAxisMetric

      public FacetChart setYAxisMetric(String yAxisMetric) throws IllegalStateException
      For scatter charts only, the "id" of the metric facet value to use for the y-axis.

      The default y-axis metric is the first value of the metric facet.

      Parameters:
      yAxisMetric - New yAxisMetric value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getYAxisMetric

      public String getYAxisMetric()
      For scatter charts only, the "id" of the metric facet value to use for the y-axis.

      The default y-axis metric is the first value of the metric facet.

      Returns:
      Current yAxisMetric value. Default value is null
    • setZIndexMetric

      public FacetChart setZIndexMetric(String zIndexMetric)
      Specifies the attribute in the metric facet that will define the z-ordering of the segments in a histogram chart. If the z-ordering isn't specified, it will be assigned based on data order, with the last data point ordered above the first. Relative z-ordering is only important between segments within the same data label facet, since segments that differ in their data label facet value should never overlap,

      Note that zIndex values should be integers between 0 and maxDataZIndex, inclusive, and don't directly map to the DrawItem.zIndex values of the underlying DrawRects. This allows the Framework to use automatic z-ordering in the chart logic without any additional sorting or overhead that would otherwise be required.

      If this method is called after the component has been drawn/initialized: Method to change the current zIndexMetric - see property for more details. Will redraw the chart if drawn.

      Parameters:
      zIndexMetric - name of zIndex metric. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      See Also:
    • getZIndexMetric

      public String getZIndexMetric()
      Specifies the attribute in the metric facet that will define the z-ordering of the segments in a histogram chart. If the z-ordering isn't specified, it will be assigned based on data order, with the last data point ordered above the first. Relative z-ordering is only important between segments within the same data label facet, since segments that differ in their data label facet value should never overlap,

      Note that zIndex values should be integers between 0 and maxDataZIndex, inclusive, and don't directly map to the DrawItem.zIndex values of the underlying DrawRects. This allows the Framework to use automatic z-ordering in the chart logic without any additional sorting or overhead that would otherwise be required.

      Returns:
      Current zIndexMetric value. Default value is null
      See Also:
    • getZoomChart

      public FacetChart getZoomChart() throws IllegalStateException
      Mini-chart created to allow zooming when canZoom is enabled.

      This chart automatically has certain visual tweaks applied, including showInlineLabels, muted colors and logarithmic scaling. It can be further configured via zoomChartProperties.

      The selected range from this chart defaults to being shown with distinct styling as well (if zoomShowSelection is set), which can be controlled via zoomSelectionChartProperties.

      This component is an AutoChild named "zoomChart". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current zoomChart value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setZoomChartHeight

      public FacetChart setZoomChartHeight(double zoomChartHeight) throws IllegalStateException
      Height of the zoomChart. The zoomChart is always as wide as the main chart.
      Parameters:
      zoomChartHeight - New zoomChartHeight value. Default value is 100
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getZoomChartHeight

      public double getZoomChartHeight()
      Height of the zoomChart. The zoomChart is always as wide as the main chart.
      Returns:
      Current zoomChartHeight value. Default value is 100
    • setZoomChartProperties

      public FacetChart setZoomChartProperties(FacetChart zoomChartProperties) throws IllegalStateException
      Properties to further configure the zoomChart.
      Parameters:
      zoomChartProperties - New zoomChartProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getZoomChartProperties

      public FacetChart getZoomChartProperties()
      Properties to further configure the zoomChart.
      Returns:
      Current zoomChartProperties value. Default value is null
    • getZoomChartSlider

      public RangeSlider getZoomChartSlider() throws IllegalStateException
      Slider controls shown on the mini-chart which is created when canZoom is enabled.

      This component is an AutoChild named "zoomChartSlider". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current zoomChartSlider value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setZoomLogScale

      public FacetChart setZoomLogScale(Boolean zoomLogScale) throws IllegalStateException
      By default when canZoom is enabled, the zoomChart uses logarithmic scaling so that spikes in the data don't result in a zoomed chart that is mostly a flat line.

      Logarithmic scaling is automatically disabled if the dataset spans zero (eg, has negative and positive values) as this can't be shown in a logarithmic scale.

      Set zoomLogScale to explicitly enable or disable logarithmic scaling.

      Parameters:
      zoomLogScale - New zoomLogScale value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getZoomLogScale

      public Boolean getZoomLogScale()
      By default when canZoom is enabled, the zoomChart uses logarithmic scaling so that spikes in the data don't result in a zoomed chart that is mostly a flat line.

      Logarithmic scaling is automatically disabled if the dataset spans zero (eg, has negative and positive values) as this can't be shown in a logarithmic scale.

      Set zoomLogScale to explicitly enable or disable logarithmic scaling.

      Returns:
      Current zoomLogScale value. Default value is null
    • setZoomMutePercent

      public FacetChart setZoomMutePercent(float zoomMutePercent) throws IllegalStateException
      colorMutePercent to use for the zoomChart.
      Parameters:
      zoomMutePercent - New zoomMutePercent value. Default value is -35
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getZoomMutePercent

      public float getZoomMutePercent()
      colorMutePercent to use for the zoomChart.
      Returns:
      Current zoomMutePercent value. Default value is -35
    • getZoomSelectionChart

      public FacetChart getZoomSelectionChart() throws IllegalStateException
      Mini-chart created when canZoom is enabled. This chart represents the currently selected range of data shown in the main chart.

      This component is an AutoChild named "zoomSelectionChart". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current zoomSelectionChart value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setZoomSelectionChartProperties

      public FacetChart setZoomSelectionChartProperties(FacetChart zoomSelectionChartProperties) throws IllegalStateException
      Properties to further configure the zoomSelectionChart.
      Parameters:
      zoomSelectionChartProperties - New zoomSelectionChartProperties value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getZoomSelectionChartProperties

      public FacetChart getZoomSelectionChartProperties()
      Properties to further configure the zoomSelectionChart.
      Returns:
      Current zoomSelectionChartProperties value. Default value is null
    • setZoomShowSelection

      public FacetChart setZoomShowSelection(Boolean zoomShowSelection) throws IllegalStateException
      Whether the selected range should be shown in a different style, which can be configured via zoomSelectionChartProperties. This has performance consequences and makes the rendering of the mini-chart slightly slower.
      Parameters:
      zoomShowSelection - New zoomShowSelection value. Default value is true
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getZoomShowSelection

      public Boolean getZoomShowSelection()
      Whether the selected range should be shown in a different style, which can be configured via zoomSelectionChartProperties. This has performance consequences and makes the rendering of the mini-chart slightly slower.
      Returns:
      Current zoomShowSelection value. Default value is true
    • setZoomStartPosition

      public FacetChart setZoomStartPosition(ZoomStartPosition zoomStartPosition) throws IllegalStateException
      For a zoomed chart, determines what portion of the overall dataset should be initially shown in the main chart.

      Default is to show the end of the dataset if the X axis shows time and includes today's date, otherwise to show the start of the dataset.

      Set this property to override this default, or use zoomStartValue and zoomEndValue to start with a particular range.

      Parameters:
      zoomStartPosition - New zoomStartPosition value. Default value is null
      Returns:
      FacetChart instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getZoomStartPosition

      public ZoomStartPosition getZoomStartPosition()
      For a zoomed chart, determines what portion of the overall dataset should be initially shown in the main chart.

      Default is to show the end of the dataset if the X axis shows time and includes today's date, otherwise to show the start of the dataset.

      Set this property to override this default, or use zoomStartValue and zoomEndValue to start with a particular range.

      Returns:
      Current zoomStartPosition value. Default value is null
    • addChartBackgroundDrawnHandler

      public HandlerRegistration addChartBackgroundDrawnHandler(ChartBackgroundDrawnHandler handler)
      Add a chartBackgroundDrawn handler.

      Called when most elements of the chart other than data data have been drawn, including gradations and legend.

      This notification will be fired each time the chart is redrawn (due to resize, data change, etc). If you want to draw additional information on the chart using DrawPane (FacetChart's superclass) and various DrawItems, you should do in response to this notification. Due to auto-sizing, APIs that are typically used to position custom DrawItems (such as FacetChart.getChartLeft()) may return bad values if called at other times.

      Additional DrawItems added in this method will appear underneath data elements such as bars or columns. See FacetChart.chartDrawn() for placing DrawItems on top of data elements.

      Specified by:
      addChartBackgroundDrawnHandler in interface HasChartBackgroundDrawnHandlers
      Parameters:
      handler - the chartBackgroundDrawn handler
      Returns:
      HandlerRegistration used to remove this handler
    • addChartDrawnHandler

      public HandlerRegistration addChartDrawnHandler(ChartDrawnHandler handler)
      Add a chartDrawn handler.

      Called when all elements of the chart (data lines / shapes, gradations, legend, labels etc) have completed drawing.

      See FacetChart.chartBackgroundDrawn() for usage information.

      Specified by:
      addChartDrawnHandler in interface HasChartDrawnHandlers
      Parameters:
      handler - the chartDrawn handler
      Returns:
      HandlerRegistration used to remove this handler
    • addDataLabelClickHandler

      public HandlerRegistration addDataLabelClickHandler(DataLabelClickHandler handler)
      Add a dataLabelClick handler.

      Fires when the user clicks on a data label, that is, a text label showing values from the first facet. For example, the labels underneath the X-axis of a column chart, labelling each column.

      Specified by:
      addDataLabelClickHandler in interface HasDataLabelClickHandlers
      Parameters:
      handler - the dataLabelClick handler
      Returns:
      HandlerRegistration used to remove this handler
    • addDataLabelHoverHandler

      public HandlerRegistration addDataLabelHoverHandler(DataLabelHoverHandler handler)
      Add a dataLabelHover handler.

      Fires when the mouse hovers over a data label, that is, a text label showing values from the first facet. For example, the labels underneath the X-axis of a column chart, labelling each column.

      Specified by:
      addDataLabelHoverHandler in interface HasDataLabelHoverHandlers
      Parameters:
      handler - the dataLabelHover handler
      Returns:
      HandlerRegistration used to remove this handler
    • drawnValueContainsPoint

      public Boolean drawnValueContainsPoint(DrawnValue drawnValue)
      Returns whether a given DrawnValue contains a point. The point's X and Y coordinates may be passed into this method, or, if unspecified, the coordinates used are the current mouse event coordinates.

      For Area, Bubble, Line, Radar, and Scatter charts, a DrawnValue is considered to contain a point if the Euclidean distance from the DrawnValue's center (x, y) to the point is less than this.dataPointSize. For Pie charts, the DrawnValue is considered to contain a point if the point is within the pie slice. Similarly, for Doughnut charts, the DrawnValue is considered to contain a point if the point is within the pie slice and not in the doughnut hole. For Bar and Column charts, the DrawnValue is considered to contain a point if the point is within the bar or column, respectively. Note that for stacked Bar and Column charts, the point must also be in the stacked portion as opposed to anywhere within the bar or column.

      Parameters:
      drawnValue - the DrawnValue to check. The DrawnValue must be a valid DrawnValue from this chart.
      Returns:
      true if the DrawnValue contains the point at the given X, Y coordinates (or current mouse event coordinates); false if the DrawnValue does not contain the point; null for invalid parameters.
    • drawnValueContainsPoint

      public Boolean drawnValueContainsPoint(DrawnValue drawnValue, Integer x)
      See Also:
    • drawnValueContainsPoint

      public Boolean drawnValueContainsPoint(DrawnValue drawnValue, Integer x, Integer y)
      Returns whether a given DrawnValue contains a point. The point's X and Y coordinates may be passed into this method, or, if unspecified, the coordinates used are the current mouse event coordinates.

      For Area, Bubble, Line, Radar, and Scatter charts, a DrawnValue is considered to contain a point if the Euclidean distance from the DrawnValue's center (x, y) to the point is less than this.dataPointSize. For Pie charts, the DrawnValue is considered to contain a point if the point is within the pie slice. Similarly, for Doughnut charts, the DrawnValue is considered to contain a point if the point is within the pie slice and not in the doughnut hole. For Bar and Column charts, the DrawnValue is considered to contain a point if the point is within the bar or column, respectively. Note that for stacked Bar and Column charts, the point must also be in the stacked portion as opposed to anywhere within the bar or column.

      Parameters:
      drawnValue - the DrawnValue to check. The DrawnValue must be a valid DrawnValue from this chart.
      x - X coordinate of the point. If this parameter is specified, then y is a required parameter.
      y - Y coordinate of the point
      Returns:
      true if the DrawnValue contains the point at the given X, Y coordinates (or current mouse event coordinates); false if the DrawnValue does not contain the point; null for invalid parameters.
    • fetchRelatedData

      public void fetchRelatedData(ListGridRecord record, Canvas schema)
      Based on the relationship between the DataSource this component is bound to and the DataSource specified as the "schema" argument, call fetchData() to retrieve records in this grid that are related to the passed-in record.

      Relationships between DataSources are declared via DataSourceField.foreignKey.

      For example, given two related DataSources "orders" and "orderItems", where we want to fetch the "orderItems" that belong to a given "order". "orderItems" should declare a field that is a foreignKey to the "orders" table (for example, it might be named "orderId" with foreignKey="orders.id"). Then, to load the records related to a given "order", call fetchRelatedData() on the component bound to "orderItems", pass the "orders" DataSource as the "schema" and pass a record from the "orders" DataSource as the "record" argument.

      Note that multiple foreign keys into the schema are supported by this method.

      Parameters:
      record - DataSource record
      schema - schema of the DataSource record, or DataBoundComponent already bound to that schema
      See Also:
    • fetchRelatedData

      public void fetchRelatedData(ListGridRecord record, Canvas schema, DSCallback callback)
      See Also:
    • fetchRelatedData

      public void fetchRelatedData(ListGridRecord record, Canvas schema, DSCallback callback, DSRequest requestProperties)
      Based on the relationship between the DataSource this component is bound to and the DataSource specified as the "schema" argument, call fetchData() to retrieve records in this grid that are related to the passed-in record.

      Relationships between DataSources are declared via DataSourceField.foreignKey.

      For example, given two related DataSources "orders" and "orderItems", where we want to fetch the "orderItems" that belong to a given "order". "orderItems" should declare a field that is a foreignKey to the "orders" table (for example, it might be named "orderId" with foreignKey="orders.id"). Then, to load the records related to a given "order", call fetchRelatedData() on the component bound to "orderItems", pass the "orders" DataSource as the "schema" and pass a record from the "orders" DataSource as the "record" argument.

      Note that multiple foreign keys into the schema are supported by this method.

      Parameters:
      record - DataSource record
      schema - schema of the DataSource record, or DataBoundComponent already bound to that schema
      callback - callback to invoke on completion
      requestProperties - additional properties to set on the DSRequest that will be issued
      See Also:
    • formatFacetValueId

      public String formatFacetValueId(Object value, Facet facet)
      Return the text string to display for facet value labels that appear in chart legends or as labels for chartTypes that have circumference or non-axis labels, such as for example "Pie" or "Radar" charts.
      Parameters:
      value - raw value of the metric
      facet - facet containing the value
      Returns:
      the text to display.
      See Also:
    • formatSegmentLabel

      public String formatSegmentLabel(Object startValue, Object endValue)
      Defines the format of the label for a segment in a histogram chart. By default, it simply returns a label of the form "Y1 to Y2" describing the start and end values, applying setDataValueFormatter() to format the values.

      Note that this method has no impact on the facet value labels appearing on the horizontal axis of the histogram chart.

      Parameters:
      startValue - raw start value of the segment
      endValue - raw end value of the segment
      Returns:
      the text to display.
    • getChartCenter

      public Point getChartCenter()
      Returns the centerpoint for radar charts and pie charts.

      Note that unstacked pie charts draw multiple pies, each with their own centers.

      This is only allowed to be called when FacetChart.chartDrawn() fires.

      Returns:
      the centerpoint for radar charts and pie charts.
    • getChartHeight

      public float getChartHeight(boolean recalc)
      Deprecated.
      Get the height the central chart area, where data elements appear.

      This is only allowed to be called when FacetChart.chartDrawn() fires.

      Parameters:
      recalc - if false then cached value will be returned, otherwise will be recalculated.
      Returns:
      the width of the central chart area.
    • getChartHeightAsDouble

      public double getChartHeightAsDouble(boolean recalc)
      Get the height the central chart area, where data elements appear.

      This is only allowed to be called when FacetChart.chartDrawn() fires.

      Parameters:
      recalc - if false then cached value will be returned, otherwise will be recalculated.
      Returns:
      the width of the central chart area.
    • getChartLeft

      public float getChartLeft()
      Deprecated.
      Get the left margin of the central chart area, where data elements appear.

      This is only allowed to be called when FacetChart.chartDrawn() fires.

      Returns:
      left margin of the central chart area
    • getChartLeftAsDouble

      public double getChartLeftAsDouble()
      Get the left margin of the central chart area, where data elements appear.

      This is only allowed to be called when FacetChart.chartDrawn() fires.

      Returns:
      left margin of the central chart area
    • getChartRadius

      public float getChartRadius()
      Deprecated.
      Returns the radius for radar charts and pie charts. For stacked pie charts this is radius of the outermost pie.

      Note that unstacked pie charts draw multiple pies, each with their own radii.

      This is only allowed to be called when FacetChart.chartDrawn() fires.

      Returns:
      the radius for radar charts and pie charts.
    • getChartRadiusAsDouble

      public double getChartRadiusAsDouble()
      Returns the radius for radar charts and pie charts. For stacked pie charts this is radius of the outermost pie.

      Note that unstacked pie charts draw multiple pies, each with their own radii.

      This is only allowed to be called when FacetChart.chartDrawn() fires.

      Returns:
      the radius for radar charts and pie charts.
    • getChartTop

      public float getChartTop()
      Deprecated.
      Get the top coordinate of the central chart area, where data elements appear.

      This is only allowed to be called when FacetChart.chartDrawn() fires.

      Returns:
      The top coordinate of the central chart area
    • getChartTopAsDouble

      public double getChartTopAsDouble()
      Get the top coordinate of the central chart area, where data elements appear.

      This is only allowed to be called when FacetChart.chartDrawn() fires.

      Returns:
      The top coordinate of the central chart area
    • getChartWidth

      public float getChartWidth(boolean recalc)
      Deprecated.
      Get the width of the central chart area, where data elements appear.

      This is only allowed to be called when FacetChart.chartDrawn() fires.

      Parameters:
      recalc - if false then cached value will be returned, otherwise will be recalculated.
      Returns:
      the width of the central chart area.
    • getChartWidthAsDouble

      public double getChartWidthAsDouble(boolean recalc)
      Get the width of the central chart area, where data elements appear.

      This is only allowed to be called when FacetChart.chartDrawn() fires.

      Parameters:
      recalc - if false then cached value will be returned, otherwise will be recalculated.
      Returns:
      the width of the central chart area.
    • getDataLabelFacet

      public Facet getDataLabelFacet()
      Returns the Facet in the list of facets whose values are rendered as labels along the data axis of the chart or in the main chart area.

      Most single-facet charts and all multi-facet charts have the data label facet as their first facet. The exceptions are that single-facet Pie/Doughnut charts and Bubble and Scatter charts do not have data label facets.

      Note that the user may swap the data label facet and the legend facet in most chart types using the context menu.

      Returns:
      the data label facet, or null if there is no such facet
      See Also:
    • getDataLabelHoverHTML

      public String getDataLabelHoverHTML(FacetValue facetValue)
      Called when the mouse hovers over a data label, that is, a text label showing values from the first facet. For example, the labels underneath the X-axis of a column chart, labelling each column.
      Parameters:
      facetValue - facetValue that was hovered
      Returns:
      hover text to be shown. Return null to avoid a hover being shown. See HTMLString
      See Also:
    • getDrawnValue

      public DrawnValue getDrawnValue(FacetValueMap facetValues)
      Returns rendering information for the data value specified by the passed facet values.

      If called before FacetChart.chartDrawn(), logs a warning and returns null.

      Parameters:
      facetValues - facet values of desired data value
      Returns:
      the drawn value, or null for invalid arguments / incorrect timing of call
    • getDrawnValueAtPoint

      public DrawnValue getDrawnValueAtPoint()
      Returns a DrawnValue object for the data value that is shown nearest to the passed coordinates only if it's under the given coordinates, or under the current mouse event coordinates if no coordinates are passed. This method is similar to getNearestDrawnValue(), but the DrawnValue is only returned if it's under the coordinates.

      See drawnValueContainsPoint() for the criteria that determine whether a DrawnValue is under (contains) the coordinates.

      Returns:
      the nearest drawn value if under the given coordinates (or current mouse event coordinates) or null if not under the coordinates, or for invalid arguments / incorrect timing of call.
    • getDrawnValueAtPoint

      public DrawnValue getDrawnValueAtPoint(Integer x)
      See Also:
    • getDrawnValueAtPoint

      public DrawnValue getDrawnValueAtPoint(Integer x, Integer y)
      See Also:
    • getDrawnValueAtPoint

      public DrawnValue getDrawnValueAtPoint(Integer x, Integer y, String metric)
      Returns a DrawnValue object for the data value that is shown nearest to the passed coordinates only if it's under the given coordinates, or under the current mouse event coordinates if no coordinates are passed. This method is similar to getNearestDrawnValue(), but the DrawnValue is only returned if it's under the coordinates.

      See drawnValueContainsPoint() for the criteria that determine whether a DrawnValue is under (contains) the coordinates.

      Parameters:
      x - X coordinate. If this parameter is specified, then y is a required parameter.
      y - Y coordinate
      metric - metric over which to determine the drawn value
      Returns:
      the nearest drawn value if under the given coordinates (or current mouse event coordinates) or null if not under the coordinates, or for invalid arguments / incorrect timing of call.
    • getDrawnValues

      public DrawnValue[] getDrawnValues()
      Returns rendering information for the data values specified by the passed facet values.

      If called before FacetChart.chartDrawn(), logs a warning and returns null.

      Returns:
      the DrawnValues, or null for invalid arguments / incorrect timing of call
    • getDrawnValues

      public DrawnValue[] getDrawnValues(FacetValueMap facetValues)
      Returns rendering information for the data values specified by the passed facet values.

      If called before FacetChart.chartDrawn(), logs a warning and returns null.

      Parameters:
      facetValues - facet values of desired DrawnValues. If no FacetValueMap is provided, then all DrawnValues are returned.
      Returns:
      the DrawnValues, or null for invalid arguments / incorrect timing of call
    • getDrawnValuesAtPoint

      public DrawnValue[] getDrawnValuesAtPoint()
      Returns an array of DrawnValue objects for the data values of each metric that are shown nearest to the passed coordinates, but only if they're under the given coordinates, or under the current mouse event coordinates if no coordinates are passed. This method is similar to getNearestDrawnValues(), but DrawnValues are only included in the returned array if they're under the coordinates.

      See drawnValueContainsPoint() for the criteria that determine whether a DrawnValue is under (contains) the coordinates.

      Returns:
      the nearest DrawnValues that are under the given coordinates (or current mouse event coordinates), or null for invalid arguments / incorrect timing of call.
    • getDrawnValuesAtPoint

      public DrawnValue[] getDrawnValuesAtPoint(Integer x)
      See Also:
    • getDrawnValuesAtPoint

      public DrawnValue[] getDrawnValuesAtPoint(Integer x, Integer y)
      Returns an array of DrawnValue objects for the data values of each metric that are shown nearest to the passed coordinates, but only if they're under the given coordinates, or under the current mouse event coordinates if no coordinates are passed. This method is similar to getNearestDrawnValues(), but DrawnValues are only included in the returned array if they're under the coordinates.

      See drawnValueContainsPoint() for the criteria that determine whether a DrawnValue is under (contains) the coordinates.

      Parameters:
      x - X coordinate. If this parameter is specified, then y is a required parameter.
      y - Y coordinate
      Returns:
      the nearest DrawnValues that are under the given coordinates (or current mouse event coordinates), or null for invalid arguments / incorrect timing of call.
    • getFacet

      public Facet getFacet(String facetId)
      Get a facet definition by facetId.
      Parameters:
      facetId - the id of the facet to retrieve
      Returns:
      the Facet if found, or null
      See Also:
    • getFacetValue

      public FacetValue getFacetValue(String facetId, String facetValueId)
      Get facet value definition by facetId and facetValueId.
      Parameters:
      facetId - the id of the facet to retrieve
      facetValueId - the id of the facet value to retrieve
      Returns:
      the FacetValue if found, or null
      See Also:
    • getGradations

      public float[] getGradations()
      Return an array of the gradation values used in the current chart. Pass these values to getXCoord() / getYCoord() (depending on the orientation of the chart) to discover the coordinates where gradations are drawn.

      This is only allowed to be called when FacetChart.chartDrawn() fires.

      Returns:
      an array of gradation values used in the current chart.
    • getLegendFacet

      public Facet getLegendFacet()
      Returns the Facet in the list of facets whose values are rendered in the chart's legend.

      Most single-facet charts do not have a legend facet. The exceptions are that single-facet Pie/Doughnut charts have a legend facet as the first facet and Bubble and Scatter charts may optionally have a legend facet as the second facet, after the metric facet.

      In all multi-facet charts, the legend facet is the second facet.

      Note that the user may swap the legend facet and the data label facet in most chart types using the context menu.

      Returns:
      the legend facet, or null if there is no such facet
      See Also:
    • getLegendHoverHTML

      public String getLegendHoverHTML(FacetValue facetValue, FacetValue metricFacetValue)
      Called when the mouse hovers over a color swatch or its label in the legend area of the chart.

      The FacetValue that the user is hovering over is provided. If the chart is a multi-axis chart, the FacetValue for the hovered-over metric will also be provided.

      Parameters:
      facetValue - facetValue that the mouse is over
      metricFacetValue - for a multi-axis chart, facetValue representing the hovered-over metric. Null if chart is not multi-axis
      Returns:
      hover text to be shown. Return null to avoid a hover being shown. See HTMLString
      See Also:
    • getNearestDrawnValue

      public DrawnValue getNearestDrawnValue()
      Returns rendering information for the data value that is shown nearest to the passed coordinates, as a DrawnValue object.

      Passed X and Y coordinates should be relative to the FacetChart. If neither an X or Y coordinate is passed, both X and Y will use the current Canvas.getOffsetX() and Canvas.getOffsetY().

      If called before FacetChart.chartDrawn(), logs a warning and returns null. For a chart with multiple vertical axes, returns the nearest point from the first metric only (see FacetChart overview). For scatter charts, returns a DrawnValue where the value is from the y-axis metric.

      To get the nearest DrawnValue only if it contains the given coordinates, you can either use the getDrawnValueAtPoint() API or call drawnValueContainsPoint() on the return value.

      Behavior for different chart types is as follows:

      Bar / Column

      Returns the centerpoint of the end of the nearest bar or column by considering the Y coordinate (bar) or X coordinate (column) only.

      Line / Area

      Returns the nearest point based on which data label is nearest to the passed X coordinate. For multi-series charts, if Y coordinate is not passed the data point returned is from the series that has the highest value at the data label.

      Radar

      Returns the data point nearest the passed coordinates by straight line distance. Passing only one coordinate will cause a warning to be logged and null to be returned; passing neither coordinate is allowed (getOffsetX/Y will be used).

      Pie

      Returns the data point for the segment that would be hit if a line were drawn from the passed coordinates to the center of the pie.

      If there are multiple stacked pies, uses the pie that contains the passed coordinates, otherwise the outermost pie.

      If there are multiple non-stacked pies, uses the pie that is nearest the passed coordinates by straight-line distance to the center of the pie.

      Passing only one coordinate will cause a warning to be logged and null to be returned; passing neither coordinate is allowed (getOffsetX/Y will be used).

      If the chart is a multi-axis chart then this method takes an optional parameter, metric, which causes this method to return a DrawnValue from the specified metric. If a metric is not passed then the first metric of the metric facet will be used (or just the valueProperty if there is no metric facet).

      Returns:
      the nearest drawn value, or null for invalid arguments / incorrect timing of call
      See Also:
    • getNearestDrawnValue

      public DrawnValue getNearestDrawnValue(Integer x)
      See Also:
    • getNearestDrawnValue

      public DrawnValue getNearestDrawnValue(Integer x, Integer y)
      See Also:
    • getNearestDrawnValue

      public DrawnValue getNearestDrawnValue(Integer x, Integer y, String metric)
      Returns rendering information for the data value that is shown nearest to the passed coordinates, as a DrawnValue object.

      Passed X and Y coordinates should be relative to the FacetChart. If neither an X or Y coordinate is passed, both X and Y will use the current Canvas.getOffsetX() and Canvas.getOffsetY().

      If called before FacetChart.chartDrawn(), logs a warning and returns null. For a chart with multiple vertical axes, returns the nearest point from the first metric only (see FacetChart overview). For scatter charts, returns a DrawnValue where the value is from the y-axis metric.

      To get the nearest DrawnValue only if it contains the given coordinates, you can either use the getDrawnValueAtPoint() API or call drawnValueContainsPoint() on the return value.

      Behavior for different chart types is as follows:

      Bar / Column

      Returns the centerpoint of the end of the nearest bar or column by considering the Y coordinate (bar) or X coordinate (column) only.

      Line / Area

      Returns the nearest point based on which data label is nearest to the passed X coordinate. For multi-series charts, if Y coordinate is not passed the data point returned is from the series that has the highest value at the data label.

      Radar

      Returns the data point nearest the passed coordinates by straight line distance. Passing only one coordinate will cause a warning to be logged and null to be returned; passing neither coordinate is allowed (getOffsetX/Y will be used).

      Pie

      Returns the data point for the segment that would be hit if a line were drawn from the passed coordinates to the center of the pie.

      If there are multiple stacked pies, uses the pie that contains the passed coordinates, otherwise the outermost pie.

      If there are multiple non-stacked pies, uses the pie that is nearest the passed coordinates by straight-line distance to the center of the pie.

      Passing only one coordinate will cause a warning to be logged and null to be returned; passing neither coordinate is allowed (getOffsetX/Y will be used).

      If the chart is a multi-axis chart then this method takes an optional parameter, metric, which causes this method to return a DrawnValue from the specified metric. If a metric is not passed then the first metric of the metric facet will be used (or just the valueProperty if there is no metric facet).

      Parameters:
      x - X coordinate. If this parameter is specified, then y is a required parameter.
      y - Y coordinate
      metric - metric over which to determine the drawn value
      Returns:
      the nearest drawn value, or null for invalid arguments / incorrect timing of call
      See Also:
    • getNearestDrawnValues

      public DrawnValue[] getNearestDrawnValues()
      Returns an array of DrawnValue objects containing rendering information for the data values having each metric that are shown nearest to the passed coordinates.

      Passed X and Y coordinates should be relative to the FacetChart. If neither an X or Y coordinate is passed, both X and Y will use the current Canvas.getOffsetX() and Canvas.getOffsetY().

      The behavior for different chart types is the same as getNearestDrawnValue(). This method also logs a warning and returns null if called before FacetChart.chartDrawn().

      To get the nearest DrawnValues only if they contain the given coordinates, you can either use the getDrawnValuesAtPoint() API or check whether each DrawnValue in the returned array contains the point by calling drawnValueContainsPoint().

      Returns:
      the nearest drawn values for each metric, or null for invalid arguments / incorrect timing of call
      See Also:
    • getNearestDrawnValues

      public DrawnValue[] getNearestDrawnValues(Integer x)
      See Also:
    • getNearestDrawnValues

      public DrawnValue[] getNearestDrawnValues(Integer x, Integer y)
      Returns an array of DrawnValue objects containing rendering information for the data values having each metric that are shown nearest to the passed coordinates.

      Passed X and Y coordinates should be relative to the FacetChart. If neither an X or Y coordinate is passed, both X and Y will use the current Canvas.getOffsetX() and Canvas.getOffsetY().

      The behavior for different chart types is the same as getNearestDrawnValue(). This method also logs a warning and returns null if called before FacetChart.chartDrawn().

      To get the nearest DrawnValues only if they contain the given coordinates, you can either use the getDrawnValuesAtPoint() API or check whether each DrawnValue in the returned array contains the point by calling drawnValueContainsPoint().

      Parameters:
      x - X coordinate. If this parameter is specified, then y is a required parameter.
      y - Y coordinate
      Returns:
      the nearest drawn values for each metric, or null for invalid arguments / incorrect timing of call
      See Also:
    • getNumDataPoints

      public Integer getNumDataPoints()
      Count the number of data points.
      Returns:
      the number of data values
    • getNumDataPoints

      public Integer getNumDataPoints(FacetValueMap criteria)
      Count the number of data points.
      Parameters:
      criteria - a set of facetValues describing a slice of the data
      Returns:
      the number of data values
    • getPolynomialRegressionFunction

      public void getPolynomialRegressionFunction()
      For scatter plots only, get a Function from the specified independent variable X to the specified dependent variable Y that defines the polynomial that best fits the data. See http://en.wikipedia.org/wiki/Polynomial_regression.
    • getPolynomialRegressionFunction

      public void getPolynomialRegressionFunction(Integer degree)
      See Also:
    • getPolynomialRegressionFunction

      public void getPolynomialRegressionFunction(Integer degree, String xMetric)
      See Also:
    • getPolynomialRegressionFunction

      public void getPolynomialRegressionFunction(Integer degree, String xMetric, String yMetric)
      For scatter plots only, get a Function from the specified independent variable X to the specified dependent variable Y that defines the polynomial that best fits the data. See http://en.wikipedia.org/wiki/Polynomial_regression.
      Parameters:
      degree - the degree of the polynomial. Defaults to regressionPolynomialDegree.
      xMetric - ID of an inlined facet value to use as the independent variable. Defaults to the x-axis metric.
      yMetric - ID of an inlined facet value to use as the dependent variable. Defaults to the y-axis metric.
    • getSimpleLinearRegressionFunction

      public void getSimpleLinearRegressionFunction()
      For scatter plots only, get a Function from the specified independent variable X to the specified dependent variable Y that defines the line that best fits the data. See http://en.wikipedia.org/wiki/Simple_linear_regression.
    • getSimpleLinearRegressionFunction

      public void getSimpleLinearRegressionFunction(String xMetric)
      See Also:
    • getSimpleLinearRegressionFunction

      public void getSimpleLinearRegressionFunction(String xMetric, String yMetric)
      For scatter plots only, get a Function from the specified independent variable X to the specified dependent variable Y that defines the line that best fits the data. See http://en.wikipedia.org/wiki/Simple_linear_regression.
      Parameters:
      xMetric - ID of an inlined facet value to use as the independent variable. Defaults to the x-axis metric.
      yMetric - ID of an inlined facet value to use as the dependent variable. Defaults to the y-axis metric.
    • getXCoord

      public float getXCoord(double value)
      Returns the X coordinate where the passed data value either was or would be drawn. For example, this would be the X coordinate where a bar would end in a bar chart.

      This is only allowed to be called after FacetChart.chartDrawn() fires.

      If the chartType is ChartType.BAR, ChartType.BUBBLE, or ChartType.SCATTER then the value argument should be a number. For other rectangular charts, this method expects a FacetValueMap that uniquely identifies the data cell whose X-axis coordinate is to be retrieved.

      Note that when canZoom is enabled, this API is valid only for data values between zoomStartValue and zoomEndValue.

      Parameters:
      value - the value to be drawn.
      Returns:
      the X coordinate where the passed data value would be drawn; or null if the passed FacetValueMap does not identify a currently-drawn data cell.
    • getXCoord

      public float getXCoord(FacetValueMap value)
      Returns the X coordinate where the passed data value either was or would be drawn. For example, this would be the X coordinate where a bar would end in a bar chart.

      This is only allowed to be called after FacetChart.chartDrawn() fires.

      If the chartType is ChartType.BAR, ChartType.BUBBLE, or ChartType.SCATTER then the value argument should be a number. For other rectangular charts, this method expects a FacetValueMap that uniquely identifies the data cell whose X-axis coordinate is to be retrieved.

      Note that when canZoom is enabled, this API is valid only for data values between zoomStartValue and zoomEndValue.

      Parameters:
      value - the value to be drawn.
      Returns:
      the X coordinate where the passed data value would be drawn; or null if the passed FacetValueMap does not identify a currently-drawn data cell.
    • getYCoord

      public float getYCoord(double value)
      Returns the Y coordinate where the passed data value either was or would be drawn. For example, this would be the Y coordinate that a line would pass through on a line chart, or the top of a column on a column chart.

      This is only allowed to be called after FacetChart.chartDrawn() fires.

      If the chartType is ChartType.AREA, ChartType.BUBBLE, ChartType.COLUMN, ChartType.HISTOGRAM, ChartType.LINE, or ChartType.SCATTER then the value argument should be a number. For ChartType.BAR charts this method expects a FacetValueMap that uniquely identifies the data cell whose Y-axis coordinate is to be retrieved.

      Parameters:
      value - the value to be drawn.
      Returns:
      the Y coordinate where the passed data value would be drawn.
    • getYCoord

      public float getYCoord(FacetValueMap value)
      Returns the Y coordinate where the passed data value either was or would be drawn. For example, this would be the Y coordinate that a line would pass through on a line chart, or the top of a column on a column chart.

      This is only allowed to be called after FacetChart.chartDrawn() fires.

      If the chartType is ChartType.AREA, ChartType.BUBBLE, ChartType.COLUMN, ChartType.HISTOGRAM, ChartType.LINE, or ChartType.SCATTER then the value argument should be a number. For ChartType.BAR charts this method expects a FacetValueMap that uniquely identifies the data cell whose Y-axis coordinate is to be retrieved.

      Parameters:
      value - the value to be drawn.
      Returns:
      the Y coordinate where the passed data value would be drawn.
    • addLegendClickHandler

      public HandlerRegistration addLegendClickHandler(LegendClickHandler handler)
      Add a legendClick handler.

      Fires when the user clicks on the legend area of the chart.

      If the user specifically clicks on a color swatch or it's label, the FacetValue clicked on will be provided.

      If the chart is a multi-axis chart, the FacetValue for the clicked-on metric will also be provided.

      Specified by:
      addLegendClickHandler in interface HasLegendClickHandlers
      Parameters:
      handler - the legendClick handler
      Returns:
      HandlerRegistration used to remove this handler
    • addLegendHoverHandler

      public HandlerRegistration addLegendHoverHandler(LegendHoverHandler handler)
      Add a legendHover handler.

      Fires when the mouse hovers over a color swatch or its label in the legend area of the chart.

      The FacetValue that the user is hovering over is provided. If the chart is a multi-axis chart, the FacetValue for the hovered-over metric will also be provided.

      Specified by:
      addLegendHoverHandler in interface HasLegendHoverHandlers
      Parameters:
      handler - the legendHover handler
      Returns:
      HandlerRegistration used to remove this handler
    • addValueClickHandler

      public HandlerRegistration addValueClickHandler(ValueClickHandler handler)
      Add a valueClick handler.

      Fires when a data value is clicked, and provides information about the data value that was clicked as a DrawnValue object.

      Specifically, this fires for clicks on pie slices, bars or columns, areas, lines or points (in a Bubble or Scatter plot).

      If there are multiple data values at the clicked position, you can use FacetChart.getNearestDrawnValues() to discover the full list of values at the current coordinate (pass in getOffsetX/Y() for the coordinates).

      If you want to create behaviors for clicking or moving near shapes without requiring a direct hit, implement a standard Canvas.click() handler on the FacetChart as a whole and use FacetChart.getNearestDrawnValue() to discover the nearest data values.

      Specified by:
      addValueClickHandler in interface HasValueClickHandlers
      Parameters:
      handler - the valueClick handler
      Returns:
      HandlerRegistration used to remove this handler
    • addZoomChangedHandler

      public HandlerRegistration addZoomChangedHandler(ZoomChangedHandler handler)
      Add a zoomChanged handler.

      Fires when the end user changes the zoom position in a zoomed chart.

      Specified by:
      addZoomChangedHandler in interface HasZoomChangedHandlers
      Parameters:
      handler - the zoomChanged handler
      Returns:
      HandlerRegistration used to remove this handler
    • zoomTo

      public void zoomTo(Object startValue, Object endValue)
      For a zoomed chart, simultaneously sets the zoomStartValue and zoomEndValue.
      Parameters:
      startValue - starting value for the data range shown in the main chart
      endValue - ending value for the data range shown in the main chart
    • setDefaultProperties

      public static void setDefaultProperties(FacetChart facetChartProperties)
      Class level method to set the default properties of this class. If set, then all existing and subsequently created instances of this class will automatically have default properties corresponding to the properties set on the SmartGWT class instance passed to this function before its underlying SmartClient JS object was created. This is a powerful feature that eliminates the need for users to create a separate hierarchy of subclasses that only alter the default properties of this class. Can also be used for skinning / styling purposes.

      Note: This method is intended for setting default attributes only and will affect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead. Calling this method after instances have been created can result in undefined behavior, since it bypasses any setters and a class instance may have already examined a particular property and not be expecting any changes through this route.

      Parameters:
      facetChartProperties - properties that should be used as new defaults when instances of this class are created
      See Also:
    • setData

      public void setData(Record[] records)
      Dataset for this chart.&#010

      Data should be specified as an array of Records where each record contains one data value. Each record also contains a property named after each facetId&#010 whose value is a facetValueId from that facet.&#010

      &#010 For example, with a facet with id "regions" and facetValues "west", "north" and "east", and&#010 with valueProperty with it's default value "_value", the data property could be:

          FacetChart chart = new FacetChart();
          chart.setFacets(new Facet("regions"));
          Record[] records = new Record[3]; 
          records[0] = new Record();
          records[0].setAttribute("regions", "west");
          records[0].setAttribute("_value", 4);
          records[1] = new Record();
          records[1].setAttribute("regions", "north");
          records[1].setAttribute("_value", 2);
          records[2] = new Record();
          records[2].setAttribute("regions", "east");
          records[2].setAttribute("_value", 5);
          chart.setData(records);
       
      If there were a second facet with id "product" and facetValues "cars" and "trucks", a Chart with a complete set of values would be:
          FacetChart chart = new FacetChart();
          chart.setFacets(new Facet("regions"), new Facet("product"));
          Record[] records = new Record[6]; 
          records[0] = new Record();
          records[0].setAttribute("product", "cars");
          records[0].setAttribute("regions", "west");
          records[0].setAttribute("_value", 4);
          records[1] = new Record();
          records[1].setAttribute("product", "cars");
          records[1].setAttribute("regions", "north");
          records[1].setAttribute("_value", 2);
          records[2] = new Record();
          records[2].setAttribute("product", "cars");
          records[2].setAttribute("regions", "east");
          records[2].setAttribute("_value", 5);
          records[3] = new Record();
          records[3].setAttribute("product", "trucks");
          records[3].setAttribute("regions", "west");
          records[3].setAttribute("_value", 1);
          records[4] = new Record();
          records[4].setAttribute("product", "trucks");
          records[4].setAttribute("regions", "north");
          records[4].setAttribute("_value", 9);
          records[5] = new Record();
          records[5].setAttribute("product", "trucks");
          records[5].setAttribute("regions", "east");
          records[5].setAttribute("_value", 3);           
          chart.setData(records);
       
      This 2 facet (or "2 dimensional") dataset, if rendered as a bar chart, would use stacked or&#010 clustered bars and a legend.&#010
      Parameters:
      data - data Default value is null
    • setData

      public void setData(RecordList records)
    • getRecords

      public Record[] getRecords()
    • getDataAsRecordList

      public RecordList getDataAsRecordList()
    • setPointHoverCustomizer

      public void setPointHoverCustomizer(ChartPointHoverCustomizer hoverCustomizer)
      Display custom HTML when showDataPoints is true and the mouse hovers over a point.
      Parameters:
      hoverCustomizer -
    • setDataLabelHoverHTMLCustomizer

      public void setDataLabelHoverHTMLCustomizer(DataLabelHoverCustomizer dataLabelHoverHTMLCustomizer)
      Called when the mouse hovers over a data label, that is, a text label showing values from the first facet. For example, the labels underneath the X-axis of a column chart, labelling each column.
      Parameters:
      dataLabelHoverHTMLCustomizer -
    • setLegendHoverCustomizer

      public void setLegendHoverCustomizer(LegendHoverCustomizer legendHoverHTMLCustomizer)
      Called when the mouse hovers over a color swatch or its label in the legend area of the chart.

      The FacetValue that the user is hovering over is provided. If the chart is a multi-axis chart, the FacetValue for the hovered-over metric will also be provided.

      Parameters:
      facetValue - (FacetValue) facetValue that the mouse is over
      metricFacetValue - (FacetValue) for a multi-axis chart, facetValue representing the hovered-over metric. Null if chart is not multi-axis
    • setPointClickHandler

      public void setPointClickHandler(ChartPointClickHandler handler)
      Apply a handler to fire when showDataPoints is true, and the user clicks on a point.
      Parameters:
      handler -
    • getPrintHTML

      public String getPrintHTML(PrintProperties printProperties, PrintHTMLCallback callback)
      Retrieves printable HTML for this component and all printable subcomponents.

      By default any Canvas with children will simply collect the printable HTML of its children by calling getPrintHTML() on each child that is considered printable.

      If overriding this method for a custom component, you should either return a String of printable HTML string directly or return null, and fire the callback (if provided).

      To return an empty print representation, return an empty string ("") rather than null.

      The printProperties argument, if passed, must be passed to any subcomponents on which getPrintHTML() is called.

      Notes on printing

      To print a FacetChart for export on IE8 and earlier, it is PrintProperties with printForExport:true:

       final PrintProperties pp = new PrintProperties();
       pp.setPrintForExport(true);
       final String exportHTML = chart.getPrintHTML(pp, null);
       

      Note: this is an override point.

      Overrides:
      getPrintHTML in class DrawPane
      Parameters:
      printProperties - properties to configure printing behavior - may be null.
      callback - optional callback to fire. Generated HTML should be passed to the PrintHTMLCallback.setHTML(String) method of the callback.
      Returns:
      null if the print HTML is being generated asynchronously and/or a callback is provided; otherwise, the direct print HTML for this component (but note that returning direct print HTML is a deprecated feature).
      See Also:
    • setZoomStartValue

      public void setZoomStartValue(Object zoomStartValue)
      For a zoomed chart, start value of the data range shown in the main chart. If zoomEndValue is not also set, the range shown will be from zoomStartValue to the end of the dataset.

      The value provided should be a value in the range of the facet for the X axis, for example, for a time-based axis, a Date instance, for a numeric axis, a Number, for an axis that just has text labels (such as city names), a String.

      If this method is called after the component has been drawn/initialized: Setter for zoomStartValue.

      Note that the zoomStartValue and zoomEndValue may be set simultaneously using FacetChart.zoomTo.

      Parameters:
      zoomStartValue - New start value for the data range shown in the main chart. Default value is null
    • getZoomStartValue

      public Object getZoomStartValue()
      For a zoomed chart, start value of the data range shown in the main chart. If zoomEndValue is not also set, the range shown will be from zoomStartValue to the end of the dataset.

      The value provided should be a value in the range of the facet for the X axis, for example, for a time-based axis, a Date instance, for a numeric axis, a Number, for an axis that just has text labels (such as city names), a String.

      Returns:
      Object
    • setZoomEndValue

      public void setZoomEndValue(Object zoomEndValue)
      For a zoomed chart, end value of the data range shown in the main chart. If zoomStartValue is not also set, the range shown will be from the beginning of the dataset up to zoomEndValue

      The value provided should be a value in the range of the facet for the X axis, for example, for a time-based axis, a Date instance, for a numeric axis, a Number, for an axis that just has text labels (such as city names), a String.

      If this method is called after the component has been drawn/initialized: Setter for zoomEndValue.

      Note that the zoomStartValue and zoomEndValue may be set simultaneously using FacetChart.zoomTo.

      Parameters:
      zoomEndValue - New end value for the data range shown in the main chart. Default value is null
    • getZoomEndValue

      public Object getZoomEndValue()
      For a zoomed chart, end value of the data range shown in the main chart. If zoomStartValue is not also set, the range shown will be from the beginning of the dataset up to zoomEndValue

      The value provided should be a value in the range of the facet for the X axis, for example, for a time-based axis, a Date instance, for a numeric axis, a Number, for an axis that just has text labels (such as city names), a String.

      Returns:
      Object
    • setAxisValueFormatter

      public void setAxisValueFormatter(ValueFormatter formatter)
      Formatter to apply to values displayed in the gradation labels.
      Parameters:
      formatter - Formatter to apply to values displayed in the gradation labels
    • setXAxisValueFormatter

      public void setXAxisValueFormatter(ValueFormatter formatter)
      Formatter to apply to values displayed in the gradation labels on the x-axis. Some documentation directing here may also relate to setYAxisValueFormatter().

      Note that the installed formatter will only be called if the x-axis has gradation labels, meaning labels drawn at regular intervals not associated with any particular facet value. So, it will not be called if the labels on the x-axis are merely facet value ids. In that case, you may wish to build an array of FacetValues for the x-axis facet, as a FacetValue constructor is available to set a separate facet id and title, and then call Facet.setValues().

      Parameters:
      formatter - Formatter to apply to values displayed in the gradation labels
    • setYAxisValueFormatter

      public void setYAxisValueFormatter(ValueFormatter formatter)
      Formatter to apply to values displayed in the gradation labels on the y-axis. See also the similar setter setXAxisValueFormatter() for the other axis.
      Parameters:
      formatter - Formatter to apply to values displayed in the gradation labels
    • setDataValueFormatter

      public void setDataValueFormatter(ValueFormatter formatter)
      Formatter to apply to values displayed in the hover labels and other value labels
      Parameters:
      formatter - Formatter to apply to values displayed in the hover labels and other value labels
    • getMean

      public Float getMean(String criteria)
      Calculate the mean, or expected value, of the data over a single metric. See http://en.wikipedia.org/wiki/Expected_value.

      The first argument, criteria, determines which metric is used to calculate the mean. The criteria may be a String that is the "id" of some FacetValue of the metric facet, or a FacetValueMap that contains an entry for the metric facet, or null to use the valueProperty. A FacetValueMap criteria may also be used to restrict the calculation to a slice of the data.

      Parameters:
      criteria - the "id" of a metric facet value, or a set of mappings describing the data over which to calculate, or null
      Returns:
      the mean of the data values
    • getMean

      public Float getMean(FacetValueMap criteria)
      Calculate the mean, or expected value, of the data over a single metric. See http://en.wikipedia.org/wiki/Expected_value.

      The first argument, criteria, determines which metric is used to calculate the mean. The criteria may be a String that is the "id" of some FacetValue of the metric facet, or a FacetValueMap that contains an entry for the metric facet, or null to use the valueProperty. A FacetValueMap criteria may also be used to restrict the calculation to a slice of the data.

      Parameters:
      criteria - the "id" of a metric facet value, or a set of mappings describing the data over which to calculate, or null
      Returns:
      the mean of the data values
    • getMedian

      public Float getMedian(String criteria)
      Calculate the median of the data over a single metric. See http://en.wikipedia.org/wiki/Median.

      The first argument, criteria, determines which metric is used to calculate the median. The criteria may be a String that is the "id" of some FacetValue of the metric facet, or a FacetValueMap that contains an entry for the metric facet, or null to use the valueProperty. A FacetValueMap criteria may also be used to restrict the calculation to a slice of the data.

      Parameters:
      criteria - the "id" of a metric facet value, or a set of mappings describing the data over which to calculate, or null
      Returns:
      the median of the data values
    • getMedian

      public Float getMedian(FacetValueMap criteria)
      Calculate the median of the data over a single metric. See http://en.wikipedia.org/wiki/Median.

      The first argument, criteria, determines which metric is used to calculate the median. The criteria may be a String that is the "id" of some FacetValue of the metric facet, or a FacetValueMap that contains an entry for the metric facet, or null to use the valueProperty. A FacetValueMap criteria may also be used to restrict the calculation to a slice of the data.

      Parameters:
      criteria - the "id" of a metric facet value, or a set of mappings describing the data over which to calculate, or null
      Returns:
      the median of the data values
    • getPercentile

      public Float getPercentile(String criteria, float percentile)
      Calculate a percentile of the data over a single metric. See http://en.wikipedia.org/wiki/Percentile.

      The first argument, criteria, determines which metric is used to calculate a percentile. The criteria may be a String that is the "id" of some FacetValue of the metric facet, or a FacetValueMap that contains an entry for the metric facet, or null to use the valueProperty. A FacetValueMap criteria may also be used to restrict the calculation to a slice of the data.

      The second argument is the percentile to calculate and it must be a number from 0 to 100.

      Parameters:
      criteria - the "id" of a metric facet value, or a set of mappings describing the data over which to calculate, or null
      percentile - the percentile to calculate
      Returns:
      a percentile of the data values
    • getPercentile

      public Float getPercentile(FacetValueMap criteria, float percentile)
      Calculate a percentile of the data over a single metric. See http://en.wikipedia.org/wiki/Percentile.

      The first argument, criteria, determines which metric is used to calculate a percentile. The criteria may be a String that is the "id" of some FacetValue of the metric facet, or a FacetValueMap that contains an entry for the metric facet, or null to use the valueProperty. A FacetValueMap criteria may also be used to restrict the calculation to a slice of the data.

      The second argument is the percentile to calculate and it must be a number from 0 to 100.

      Parameters:
      criteria - the "id" of a metric facet value, or a set of mappings describing the data over which to calculate, or null
      percentile - the percentile to calculate
      Returns:
      a percentile of the data values
    • getRange

      public Float getRange(String criteria)
      Calculate the range of the data from a single metric.

      The first argument, criteria, determines which metric is used to calculate the range. The criteria may be a String that is the "id" of some FacetValue of the metric facet, or a FacetValueMap that contains an entry for the metric facet, or null to use the valueProperty. A FacetValueMap criteria may also be used to restrict the calculation to a slice of the data.

      Parameters:
      criteria - the "id" of a metric facet value, or a set of mappings describing the data over which to calculate, or null
      Returns:
      the range of the data values
    • getRange

      public Float getRange(FacetValueMap criteria)
      Calculate the range of the data from a single metric.

      The first argument, criteria, determines which metric is used to calculate the range. The criteria may be a String that is the "id" of some FacetValue of the metric facet, or a FacetValueMap that contains an entry for the metric facet, or null to use the valueProperty. A FacetValueMap criteria may also be used to restrict the calculation to a slice of the data.

      Parameters:
      criteria - the "id" of a metric facet value, or a set of mappings describing the data over which to calculate, or null
      Returns:
      the range of the data values
    • getStdDev

      public Float getStdDev(String criteria, boolean population)
      Calculate the standard deviation of the data from a single metric. See http://en.wikipedia.org/wiki/Standard_deviation.

      The first argument, criteria, determines which metric is used to calculate the standard deviation. The criteria may be a String that is the "id" of some FacetValue of the metric facet, or a FacetValueMap that contains an entry for the metric facet, or null to use the valueProperty. A FacetValueMap criteria may also be used to restrict the calculation to a slice of the data.

      Parameters:
      criteria - the "id" of a metric facet value, or a set of mappings describing the data over which to calculate, or null
      population - false to calculate a sample standard deviation, true to calculate a population standard deviation
      Returns:
      the standard deviation of the data values
    • getStdDev

      public Float getStdDev(FacetValueMap criteria, boolean population)
      Calculate the standard deviation of the data from a single metric. See http://en.wikipedia.org/wiki/Standard_deviation.

      The first argument, criteria, determines which metric is used to calculate the standard deviation. The criteria may be a String that is the "id" of some FacetValue of the metric facet, or a FacetValueMap that contains an entry for the metric facet, or null to use the valueProperty. A FacetValueMap criteria may also be used to restrict the calculation to a slice of the data.

      Parameters:
      criteria - the "id" of a metric facet value, or a set of mappings describing the data over which to calculate, or null
      population - false to calculate a sample standard deviation, true to calculate a population standard deviation
      Returns:
      the standard deviation of the data values
    • getVariance

      public Float getVariance(String criteria, boolean population)
      Calculate the variance of the data from a single metric. See http://en.wikipedia.org/wiki/Variance.

      The first argument, criteria, determines which metric is used to calculate the variance. The criteria may be a String that is the "id" of some FacetValue of the metric facet, or a FacetValueMap that contains an entry for the metric facet, or null to use the valueProperty. A FacetValueMap criteria may also be used to restrict the calculation to a slice of the data.

      Parameters:
      criteria - the "id" of a metric facet value, or a set of mappings describing the data over which to calculate, or null
      population - false to calculate a sample variance, true to calculate a population variance
      Returns:
      the variance of the data values
    • getVariance

      public Float getVariance(FacetValueMap criteria, boolean population)
      Calculate the variance of the data from a single metric. See http://en.wikipedia.org/wiki/Variance.

      The first argument, criteria, determines which metric is used to calculate the variance. The criteria may be a String that is the "id" of some FacetValue of the metric facet, or a FacetValueMap that contains an entry for the metric facet, or null to use the valueProperty. A FacetValueMap criteria may also be used to restrict the calculation to a slice of the data.

      Parameters:
      criteria - the "id" of a metric facet value, or a set of mappings describing the data over which to calculate, or null
      population - false to calculate a sample variance, true to calculate a population variance
      Returns:
      the variance of the data values
    • getMax

      public Float getMax(String criteria)
      Calculate the maximum of the data from a single metric.

      The first argument, criteria, determines which metric is used to calculate the maximum. The criteria may be a String that is the "id" of some FacetValue of the metric facet, or a FacetValueMap that contains an entry for the metric facet, or null to use the valueProperty. A FacetValueMap criteria may also be used to restrict the calculation to a slice of the data.

      Parameters:
      criteria - the "id" of a metric facet value, or a set of mappings describing the data over which to calculate, or null
      Returns:
      the maximum of the data values
    • getMax

      public Float getMax(FacetValueMap criteria)
      Calculate the maximum of the data from a single metric.

      The first argument, criteria, determines which metric is used to calculate the maximum. The criteria may be a String that is the "id" of some FacetValue of the metric facet, or a FacetValueMap that contains an entry for the metric facet, or null to use the valueProperty. A FacetValueMap criteria may also be used to restrict the calculation to a slice of the data.

      Parameters:
      criteria - the "id" of a metric facet value, or a set of mappings describing the data over which to calculate, or null
      Returns:
      the maximum of the data values
    • getMin

      public Float getMin(String criteria)
      Calculate the minimum of the data from a single metric.

      The first argument, criteria, determines which metric is used to calculate the minimum. The criteria may be a String that is the "id" of some FacetValue of the metric facet, or a FacetValueMap that contains an entry for the metric facet, or null to use the valueProperty. A FacetValueMap criteria may also be used to restrict the calculation to a slice of the data.

      Parameters:
      criteria - the "id" of a metric facet value, or a set of mappings describing the data over which to calculate, or null
      Returns:
      the minimum of the data values
    • getMin

      public Float getMin(FacetValueMap criteria)
      Calculate the minimum of the data from a single metric.

      The first argument, criteria, determines which metric is used to calculate the minimum. The criteria may be a String that is the "id" of some FacetValue of the metric facet, or a FacetValueMap that contains an entry for the metric facet, or null to use the valueProperty. A FacetValueMap criteria may also be used to restrict the calculation to a slice of the data.

      Parameters:
      criteria - the "id" of a metric facet value, or a set of mappings describing the data over which to calculate, or null
      Returns:
      the minimum of the data values
    • getDataColor

      public String getDataColor(int index, String facetValueId, String purpose)
      Get a color from the dataColors Array. The colors returned by this method define what colors are used for the data in the chart.

      This is not an override point, but you can provide your own function by setting a customizer with setDataColorMapper().

      Parameters:
      index - index of the visual element to be colored
      facetValueId - id of the facet value to be colored
      purpose - purpose for the requested color - such as "legend", "line", "area", "points", etc.
      Returns:
      chosen color
      See Also:
    • getDataColor

      public String getDataColor(int index, Integer facetValueId, String purpose)
    • getDataColor

      public String getDataColor(int index, Double facetValueId, String purpose)
    • getDataColor

      public String getDataColor(int index, Date facetValueId, String purpose)
    • getDataColor

      public String getDataColor(int index)
    • setDataColorMapper

      public void setDataColorMapper(ColorMapper colorMapper)
      Sets a customizer to redefine what colors are used when rendering the chart data.
      Parameters:
      colorMapper - the customizer redefining what colors are used for chart data
      See Also:
    • setDataLineColorMapper

      public void setDataLineColorMapper(ColorMapper colorMapper)
      Sets a customizer to redefine what colors are used when rendering lines for the chart data. No default implementation. If not defined or null is returned, the Framework will default to using the data color - either getDataColor() or the ColorMapper installed by setDataColorMapper() if one has been provided.
      Parameters:
      colorMapper - the customizer redefining what line colors are used for chart data
      See Also:
    • setDataGradientMapper

      public void setDataGradientMapper(GradientMapper gradientMapper)
      Sets a customizer to redefine what gradients are used when rendering the chart data.
      Parameters:
      gradientMapper - the customizer redefining what gradients are used for chart data
      See Also:
    • setDataLineWidthMapper

      public void setDataLineWidthMapper(LineWidthMapper lineWidthMapper)
      Sets a customizer to define what widths to use for data lines in the chart. No default implementation. If not defined or null is returned, the line width will be determined by the appropriate chart properties, such as dataLineProperties, barProperties, or bubbleProperties.
      Parameters:
      lineWidthMapper - the customizer defining what line widths are used for chart data
      See Also:
    • setMinClusterSizeMapper

      public void setMinClusterSizeMapper(ClusterSizeMapper clusterSizeMapper)
      Sets a customizer to define the minimum cluster size (for clustered charts), or minimum bar thickness (for histogram or stacked charts) for the specified data label facet value. Only applicable to a column, bar, or histogram chart. There is no default customizer in place - only the chart-wide minBarThickness.

      Both this minimum and minBarThickness are used together to determine the effective minimum of the cluster or bar stack.

      Per-facet-value minimum cluster sizes aren't supported for multi-axis charts, in which multiple chart types are overlaid onto the same chart.

      Parameters:
      clusterSizeMapper - customizer defining the minimum size for each cluster
    • setDataPageSize

      public FacetChart setDataPageSize(int dataPageSize)
      Description copied from interface: DataBoundComponent
      When using data paging, how many records to fetch at a time. If set to a positive integer, dataPageSize will override the default resultSize for ResultSets automatically created when you call fetchData() (and similarly for the resultSize of ResultTrees). The default of 0 means to just use the default page size of the data container.

      Note that regardless of the dataPageSize setting, a component will always fetch all of data that it needs to draw. Settings such as showAllRecords:true, drawAllMaxCells and drawAheadRatio can cause more rows than the configured dataPageSize to be fetched.

      Specified by:
      setDataPageSize in interface DataBoundComponent
      Parameters:
      dataPageSize - dataPageSize Default value is 0
      Returns:
      DataBoundComponent instance, for chaining setter calls
      See Also:
    • getDataPageSize

      public int getDataPageSize()
      Description copied from interface: DataBoundComponent
      When using data paging, how many records to fetch at a time. If set to a positive integer, dataPageSize will override the default resultSize for ResultSets automatically created when you call fetchData() (and similarly for the resultSize of ResultTrees). The default of 0 means to just use the default page size of the data container.

      Note that regardless of the dataPageSize setting, a component will always fetch all of data that it needs to draw. Settings such as showAllRecords:true, drawAllMaxCells and drawAheadRatio can cause more rows than the configured dataPageSize to be fetched.

      Specified by:
      getDataPageSize in interface DataBoundComponent
      Returns:
      int
      See Also:
    • setUseAllDataSourceFields

      public FacetChart setUseAllDataSourceFields(Boolean useAllDataSourceFields)
      Description copied from interface: DataBoundComponent
      If true, the set of fields given by the "default binding" (see &#010 fields) is used, with any fields specified in&#010 component.fields acting as overrides that can suppress or modify the&#010 display of individual fields, without having to list the entire set of fields that&#010 should be shown.&#010

      &#010 If component.fields contains fields that are not found in the DataSource,&#010 they will be shown after the most recently referred to DataSource field. If the new&#010 fields appear first, they will be shown first.

      Specified by:
      setUseAllDataSourceFields in interface DataBoundComponent
      Parameters:
      useAllDataSourceFields - useAllDataSourceFields Default value is false
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getUseAllDataSourceFields

      public Boolean getUseAllDataSourceFields()
      Description copied from interface: DataBoundComponent
      If true, the set of fields given by the "default binding" (see &#010 fields) is used, with any fields specified in&#010 component.fields acting as overrides that can suppress or modify the&#010 display of individual fields, without having to list the entire set of fields that&#010 should be shown.&#010

      &#010 If component.fields contains fields that are not found in the DataSource,&#010 they will be shown after the most recently referred to DataSource field. If the new&#010 fields appear first, they will be shown first.

      Specified by:
      getUseAllDataSourceFields in interface DataBoundComponent
      Returns:
      Boolean
    • setSparseFieldState

      public FacetChart setSparseFieldState(Boolean sparseFieldState)
      Description copied from interface: DataBoundComponent
      If true, ListGrid.getFieldState() and ListGrid.setFieldState(java.lang.String) will omit state information for hidden fields by default.
      Specified by:
      setSparseFieldState in interface DataBoundComponent
      Parameters:
      sparseFieldState - sparseFieldState Default value is false
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getSparseFieldState

      public Boolean getSparseFieldState()
      Description copied from interface: DataBoundComponent
      If true, ListGrid.getFieldState() and ListGrid.setFieldState(java.lang.String) will omit state information for hidden fields by default.
      Specified by:
      getSparseFieldState in interface DataBoundComponent
      Returns:
      Boolean
    • setShowHiddenFields

      public FacetChart setShowHiddenFields(Boolean showHiddenFields)
      Description copied from interface: DataBoundComponent
      Whether to show fields marked hidden:true when a DataBoundComponent is given a&#010 DataSource but no component.fields.&#010

      &#010 The hidden property is used on DataSource fields to mark fields that are&#010 never of meaning to an end user.

      Specified by:
      setShowHiddenFields in interface DataBoundComponent
      Parameters:
      showHiddenFields - showHiddenFields Default value is false
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getShowHiddenFields

      public Boolean getShowHiddenFields()
      Description copied from interface: DataBoundComponent
      Whether to show fields marked hidden:true when a DataBoundComponent is given a&#010 DataSource but no component.fields.&#010

      &#010 The hidden property is used on DataSource fields to mark fields that are&#010 never of meaning to an end user.

      Specified by:
      getShowHiddenFields in interface DataBoundComponent
      Returns:
      Boolean
    • setShowComplexFields

      public FacetChart setShowComplexFields(Boolean showComplexFields)
      Description copied from interface: DataBoundComponent
      Whether to show fields of non-atomic types when a DataBoundComponent is given a&#010 DataSource but no component.fields.&#010

      &#010 If true, the component will show fields that declare a complex type, for example, a&#010 field 'shippingAddress' that declares type 'Address', where 'Address' is the ID of a&#010 DataSource that declares the fields of a shipping address (city, street name, etc).&#010

      &#010 Such fields may need custom formatters or editors in order to create a usable interface,&#010 for example, an Address field in a ListGrid might use a custom formatter to combine the&#010 relevant fields of an address into one column, and might use a pop-up dialog for&#010 editing.

      Note : This is an advanced setting

      Specified by:
      setShowComplexFields in interface DataBoundComponent
      Parameters:
      showComplexFields - showComplexFields Default value is true
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getShowComplexFields

      public Boolean getShowComplexFields()
      Description copied from interface: DataBoundComponent
      Whether to show fields of non-atomic types when a DataBoundComponent is given a&#010 DataSource but no component.fields.&#010

      &#010 If true, the component will show fields that declare a complex type, for example, a&#010 field 'shippingAddress' that declares type 'Address', where 'Address' is the ID of a&#010 DataSource that declares the fields of a shipping address (city, street name, etc).&#010

      &#010 Such fields may need custom formatters or editors in order to create a usable interface,&#010 for example, an Address field in a ListGrid might use a custom formatter to combine the&#010 relevant fields of an address into one column, and might use a pop-up dialog for&#010 editing.

      Specified by:
      getShowComplexFields in interface DataBoundComponent
      Returns:
      Boolean
    • setFetchOperation

      public FacetChart setFetchOperation(String fetchOperation)
      Description copied from interface: DataBoundComponent
      Operation ID this component should use when performing fetch operations.
      Specified by:
      setFetchOperation in interface DataBoundComponent
      Parameters:
      fetchOperation - fetchOperation Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getFetchOperation

      public String getFetchOperation()
      Description copied from interface: DataBoundComponent
      Operation ID this component should use when performing fetch operations.
      Specified by:
      getFetchOperation in interface DataBoundComponent
      Returns:
      String
    • setUpdateOperation

      public FacetChart setUpdateOperation(String updateOperation)
      Description copied from interface: DataBoundComponent
      operationId this component should use when performing update operations.
      Specified by:
      setUpdateOperation in interface DataBoundComponent
      Parameters:
      updateOperation - Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
      See Also:
    • getUpdateOperation

      public String getUpdateOperation()
      Description copied from interface: DataBoundComponent
      operationId this component should use when performing update operations.
      Specified by:
      getUpdateOperation in interface DataBoundComponent
      Returns:
      String
      See Also:
    • setAddOperation

      public FacetChart setAddOperation(String addOperation)
      Description copied from interface: DataBoundComponent
      operationId this component should use when performing add operations.
      Specified by:
      setAddOperation in interface DataBoundComponent
      Parameters:
      addOperation - Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
      See Also:
    • getAddOperation

      public String getAddOperation()
      Description copied from interface: DataBoundComponent
      operationId this component should use when performing add operations.
      Specified by:
      getAddOperation in interface DataBoundComponent
      Returns:
      String
      See Also:
    • setRemoveOperation

      public FacetChart setRemoveOperation(String removeOperation)
      Description copied from interface: DataBoundComponent
      operationId this component should use when performing remove operations.
      Specified by:
      setRemoveOperation in interface DataBoundComponent
      Parameters:
      removeOperation - Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
      See Also:
    • getRemoveOperation

      public String getRemoveOperation()
      Description copied from interface: DataBoundComponent
      operationId this component should use when performing remove operations.
      Specified by:
      getRemoveOperation in interface DataBoundComponent
      Returns:
      String
      See Also:
    • setExportFields

      public FacetChart setExportFields(String[] exportFields)
      Description copied from interface: DataBoundComponent
      The list of field-names to export. If provided, the field-list in the exported output is &#010 limited and sorted as per the list.&#010

      &#010 If exportFields is not provided, the exported output includes all visible fields &#010 from this component, sorted as they appear.

      Specified by:
      setExportFields in interface DataBoundComponent
      Parameters:
      exportFields - exportFields Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getExportFields

      public String[] getExportFields()
      Description copied from interface: DataBoundComponent
      The list of field-names to export. If provided, the field-list in the exported output is &#010 limited and sorted as per the list.&#010

      &#010 If exportFields is not provided, the exported output includes all visible fields &#010 from this component, sorted as they appear.

      Specified by:
      getExportFields in interface DataBoundComponent
      Returns:
      the list of field-names to export.
    • setExportAll

      public FacetChart setExportAll(Boolean exportAll)
      Description copied from interface: DataBoundComponent
      Setting exportAll to true prevents the component from passing its list of fields to the &#010 export call. The result is the export of all visible fields from fields.&#010

      &#010 If exportAll is false, an export operation will first consider &#010 exportFields, if it's set, and fall back on all visible fields from&#010 fields otherwise.

      Specified by:
      setExportAll in interface DataBoundComponent
      Parameters:
      exportAll - exportAll Default value is false
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getExportAll

      public Boolean getExportAll()
      Description copied from interface: DataBoundComponent
      Setting exportAll to true prevents the component from passing its list of fields to the &#010 export call. The result is the export of all visible fields from fields.&#010

      &#010 If exportAll is false, an export operation will first consider &#010 exportFields, if it's set, and fall back on all visible fields from&#010 fields otherwise.

      Specified by:
      getExportAll in interface DataBoundComponent
      Returns:
      Boolean
    • setExportIncludeSummaries

      public FacetChart setExportIncludeSummaries(Boolean exportIncludeSummaries)
      Description copied from interface: DataBoundComponent
      If Summary rows exist for this component, whether to include them when exporting client data. Defaults to true if not set
      Specified by:
      setExportIncludeSummaries in interface DataBoundComponent
      Parameters:
      exportIncludeSummaries - exportIncludeSummaries Default value is true
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getExportIncludeSummaries

      public Boolean getExportIncludeSummaries()
      Description copied from interface: DataBoundComponent
      If Summary rows exist for this component, whether to include them when exporting client data. Defaults to true if not set
      Specified by:
      getExportIncludeSummaries in interface DataBoundComponent
      Returns:
      Boolean
    • setPreventDuplicates

      public FacetChart setPreventDuplicates(Boolean preventDuplicates) throws IllegalStateException
      Description copied from interface: DataBoundComponent
      If set, detect and prevent duplicate records from being transferred to this component, either via&#010 drag and drop or via DataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent). When a duplicate transfer is detected,&#010 a dialog will appear showing the duplicateDragMessage.&#010

      &#010 If the component either does not have a DataSource or has a DataSource with no&#010 primaryKey declared, duplicate checking is off by&#010 default. If duplicate checking is enabled, it looks for an existing record in the dataset&#010 that has all of the properties of the dragged record, and considers that a duplicate.&#010

      &#010 For DragDataAction:"copy" where the target DataSource is related to the source&#010 DataSource by foreignKey, a duplicate means that the target list, as filtered by the current&#010 criteria, already has a record whose value for the foreignKey field matches the&#010 primaryKey of the record being transferred.&#010

      &#010 For example, consider dragging "employees" to "teams", where "teams" has a field&#010 "teams.employeeId" which is a foreignKey pointing to "employees.id", and the target&#010 grid has search criteria causing it to show all the members of one team. A duplicate -&#010 adding an employee to the same team twice - is when the target grid's dataset contains an&#010 record with "employeeId" matching the "id" field of the dropped employee.

      Specified by:
      setPreventDuplicates in interface DataBoundComponent
      Parameters:
      preventDuplicates - preventDuplicates Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getPreventDuplicates

      public Boolean getPreventDuplicates()
      Description copied from interface: DataBoundComponent
      If set, detect and prevent duplicate records from being transferred to this component, either via&#010 drag and drop or via DataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent). When a duplicate transfer is detected,&#010 a dialog will appear showing the duplicateDragMessage.&#010

      &#010 If the component either does not have a DataSource or has a DataSource with no&#010 primaryKey declared, duplicate checking is off by&#010 default. If duplicate checking is enabled, it looks for an existing record in the dataset&#010 that has all of the properties of the dragged record, and considers that a duplicate.&#010

      &#010 For DragDataAction:"copy" where the target DataSource is related to the source&#010 DataSource by foreignKey, a duplicate means that the target list, as filtered by the current&#010 criteria, already has a record whose value for the foreignKey field matches the&#010 primaryKey of the record being transferred.&#010

      &#010 For example, consider dragging "employees" to "teams", where "teams" has a field&#010 "teams.employeeId" which is a foreignKey pointing to "employees.id", and the target&#010 grid has search criteria causing it to show all the members of one team. A duplicate -&#010 adding an employee to the same team twice - is when the target grid's dataset contains an&#010 record with "employeeId" matching the "id" field of the dropped employee.

      Specified by:
      getPreventDuplicates in interface DataBoundComponent
      Returns:
      Boolean
    • setDuplicateDragMessage

      public FacetChart setDuplicateDragMessage(String duplicateDragMessage) throws IllegalStateException
      Description copied from interface: DataBoundComponent
      Message to show when a user attempts to transfer duplicate records into this component, and&#010 preventDuplicates is enabled. If set to null, duplicates will not be reported and the dragged duplicates will not be saved.
      Specified by:
      setDuplicateDragMessage in interface DataBoundComponent
      Parameters:
      duplicateDragMessage - duplicateDragMessage Default value is "Duplicates not allowed"
      Returns:
      DataBoundComponent instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getDuplicateDragMessage

      public String getDuplicateDragMessage()
      Description copied from interface: DataBoundComponent
      Message to show when a user attempts to transfer duplicate records into this component, and&#010 preventDuplicates is enabled. If set to null, duplicates will not be reported and the dragged duplicates will not be saved.
      Specified by:
      getDuplicateDragMessage in interface DataBoundComponent
      Returns:
      String
    • setAddDropValues

      public FacetChart setAddDropValues(Boolean addDropValues)
      Description copied from interface: DataBoundComponent
      Indicates whether to add "drop values" to items dropped on this component, if both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key. "Drop values" are properties of the dropped item that you wish to change (and persist) as a result of the item being dropped on this grid.

      If this value is true and this component is databound, DataBoundComponent.getDropValues() will be called for every databound item dropped on this grid, and an update performed on the item

      Specified by:
      setAddDropValues in interface DataBoundComponent
      Parameters:
      addDropValues - addDropValues Default value is true
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getAddDropValues

      public Boolean getAddDropValues()
      Description copied from interface: DataBoundComponent
      Indicates whether to add "drop values" to items dropped on this component, if both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key. "Drop values" are properties of the dropped item that you wish to change (and persist) as a result of the item being dropped on this grid.

      If this value is true and this component is databound, DataBoundComponent.getDropValues() will be called for every databound item dropped on this grid, and an update performed on the item

      Specified by:
      getAddDropValues in interface DataBoundComponent
      Returns:
      Boolean
    • setDropValues

      public FacetChart setDropValues(Map dropValues)
      Description copied from interface: DataBoundComponent
      When an item is dropped on this component, and addDropValues is true and both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key, this object provides the "drop values" that Smart GWT will apply to the dropped object before updating it.

      If this property is not defined, Smart GWT defaults to returning the selection criteria currently in place for this component. Thus, any databound items (for example, rows from other grids bound to the same DataSource) dropped on the grid will, by default, be subjected to an update that makes them conform to the grid's current filter criteria.

      Note : This is an advanced setting

      Specified by:
      setDropValues in interface DataBoundComponent
      Parameters:
      dropValues - dropValues Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getDropValues

      public Map getDropValues()
      Description copied from interface: DataBoundComponent
      When an item is dropped on this component, and addDropValues is true and both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key, this object provides the "drop values" that Smart GWT will apply to the dropped object before updating it.

      If this property is not defined, Smart GWT defaults to returning the selection criteria currently in place for this component. Thus, any databound items (for example, rows from other grids bound to the same DataSource) dropped on the grid will, by default, be subjected to an update that makes them conform to the grid's current filter criteria.

      Note : This is an advanced setting

      Specified by:
      getDropValues in interface DataBoundComponent
      Returns:
      Returns the "drop values" to apply to a record dropped on this component prior to update. Only&#010 applicable to databound components - see dropValues for more details. If multiple records &#010 are being dropped, this method is called for each of them in turn.&#010

      &#010 This method returns the following:&#010

        &#010
      • Nothing, if addDropValues is false
      • &#010
      • dropValues, if that property is set. If the component's criteria object is applicable (as explained&#010 in the next item), it is merged into dropValues, with properties in dropValues taking precedence.
      • &#010
      • The component's criteria object, if the most recent textMatchStyle for the component was "exact" &#010 and it is simple criteria (ie, not an AdvancedCriteria object)
      • &#010
      • Otherwise nothing
      • &#010
      &#010

      &#010 You can override this method if you need more complex setting of drop values than can be &#010 provided by simply supplying a dropValues object.&#010 &#010

    • setProgressiveLoading

      public FacetChart setProgressiveLoading(Boolean progressiveLoading)
      Indicates whether or not this component will load its data progressively
      Parameters:
      progressiveLoading -
      Returns:
      DataBoundComponent instance, for chaining setter calls
      See Also:
    • getProgressiveLoading

      public Boolean getProgressiveLoading()
      Indicates whether or not this component will load its data progressively
      Returns:
      See Also:
    • setUseFlatFields

      public FacetChart setUseFlatFields(Boolean useFlatFields) throws IllegalStateException
      Description copied from interface: DataBoundComponent
      The useFlatFields flag causes all simple type fields anywhere in a nested&#010 set of DataSources to be exposed as a flat list for form binding. &#010

      &#010 useFlatFields is typically used with imported metadata, such as &#010 XMLTools.loadXMLSchema(java.lang.String, com.smartgwt.client.data.XSDLoadCallback) from a &#010 XMLTools.loadWSDL(java.lang.String, com.smartgwt.client.data.WSDLLoadCallback), as a means of eliminating levels of XML&#010 nesting that aren't meaningful in a user interface, without the cumbersome and fragile&#010 process of mapping form fields to XML structures.&#010

      &#010 For example, having called WebService.getInputDS(java.lang.String) to retrieve the input message&#010 schema for a web service operation whose input message looks like this:&#010

      &#010 <FindServices>&#010     <searchFor>search text</searchFor>&#010     <Options>&#010         <caseSensitive>false</caseSensitive>&#010     </Options>&#010     <IncludeInSearch>&#010         <serviceName>true</serviceName>&#010         <documentation>true</documentation>&#010         <keywords>true</keywords>&#010     </IncludeInSearch>&#010 </FindServices>&#010 
      &#010 Setting useFlatFields on a DynamicForm that is bound to this input&#010 message schema would result in 5 FormItem reflecting the 5 simple type&#010 fields in the message.&#010

      &#010 For this form, the result of DynamicForm.getValues() might look&#010 like:&#010

      &#010

      {&#010    searchFor: "search text",&#010    caseSensitive: false,&#010    serviceName: true,&#010    documentation : true,&#010    keywords : true&#010 }
      &#010 When contacting a WebService, these values can be automatically&#010 mapped to the structure of the input message for a web service operation by setting&#010 {@link com.smartgwt.client..WSRequest#getUseFlatFields useFlatFields} (for use with WebService.callOperation(java.lang.String, java.util.Map, java.lang.String, com.smartgwt.client.data.WebServiceCallback)) or by setting&#010 useFlatFields (for use with a DataSource that is&#010 'bound to a WSDL web service' via&#010 wsOperation). &#010

      &#010 Using these two facilities in conjunction (component.useFlatFields and&#010 request.useFlatFields) allows gratuitous nesting to be consistently bypassed in both the user&#010 presentation and when providing the data for XML messages.&#010

      &#010 You can also set useFlatFields to automatically enable &#010 "flattened" XML serialization (request.useFlatFields) for all DataSource requests of a&#010 particular operationType.&#010

      &#010 Note that useFlatFields is not generally recommended for use with structures&#010 where multiple simple type fields exist with the same name, however if used with such a&#010 structure, the first field to use a given name wins. "first" means the first field&#010 encountered in a depth first search. "wins" means only the first field will be present as a&#010 field when data binding.

      Specified by:
      setUseFlatFields in interface DataBoundComponent
      Parameters:
      useFlatFields - useFlatFields Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getUseFlatFields

      public Boolean getUseFlatFields()
      Description copied from interface: DataBoundComponent
      The useFlatFields flag causes all simple type fields anywhere in a nested&#010 set of DataSources to be exposed as a flat list for form binding. &#010

      &#010 useFlatFields is typically used with imported metadata, such as &#010 XMLTools.loadXMLSchema(java.lang.String, com.smartgwt.client.data.XSDLoadCallback) from a &#010 XMLTools.loadWSDL(java.lang.String, com.smartgwt.client.data.WSDLLoadCallback), as a means of eliminating levels of XML&#010 nesting that aren't meaningful in a user interface, without the cumbersome and fragile&#010 process of mapping form fields to XML structures.&#010

      &#010 For example, having called WebService.getInputDS(java.lang.String) to retrieve the input message&#010 schema for a web service operation whose input message looks like this:&#010

      &#010 <FindServices>&#010     <searchFor>search text</searchFor>&#010     <Options>&#010         <caseSensitive>false</caseSensitive>&#010     </Options>&#010     <IncludeInSearch>&#010         <serviceName>true</serviceName>&#010         <documentation>true</documentation>&#010         <keywords>true</keywords>&#010     </IncludeInSearch>&#010 </FindServices>&#010 
      &#010 Setting useFlatFields on a DynamicForm that is bound to this input&#010 message schema would result in 5 FormItem reflecting the 5 simple type&#010 fields in the message.&#010

      &#010 For this form, the result of DynamicForm.getValues() might look&#010 like:&#010

      &#010

      {&#010    searchFor: "search text",&#010    caseSensitive: false,&#010    serviceName: true,&#010    documentation : true,&#010    keywords : true&#010 }
      &#010 When contacting a WebService, these values can be automatically&#010 mapped to the structure of the input message for a web service operation by setting&#010 {@link com.smartgwt.client..WSRequest#getUseFlatFields useFlatFields} (for use with WebService.callOperation(java.lang.String, java.util.Map, java.lang.String, com.smartgwt.client.data.WebServiceCallback)) or by setting&#010 useFlatFields (for use with a DataSource that is&#010 'bound to a WSDL web service' via&#010 wsOperation). &#010

      &#010 Using these two facilities in conjunction (component.useFlatFields and&#010 request.useFlatFields) allows gratuitous nesting to be consistently bypassed in both the user&#010 presentation and when providing the data for XML messages.&#010

      &#010 You can also set useFlatFields to automatically enable &#010 "flattened" XML serialization (request.useFlatFields) for all DataSource requests of a&#010 particular operationType.&#010

      &#010 Note that useFlatFields is not generally recommended for use with structures&#010 where multiple simple type fields exist with the same name, however if used with such a&#010 structure, the first field to use a given name wins. "first" means the first field&#010 encountered in a depth first search. "wins" means only the first field will be present as a&#010 field when data binding.

      Specified by:
      getUseFlatFields in interface DataBoundComponent
      Returns:
      Boolean
    • setHiliteProperty

      public FacetChart setHiliteProperty(String hiliteProperty)
      Description copied from interface: DataBoundComponent
      Marker that can be set on a record to flag that record as hilited. Should be set to a value&#010 that matches {@link com.smartgwt.client..Hilite#getId id} for a hilite defined on this component.
      Specified by:
      setHiliteProperty in interface DataBoundComponent
      Parameters:
      hiliteProperty - hiliteProperty Default value is "_hilite"
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getHiliteProperty

      public String getHiliteProperty()
      Description copied from interface: DataBoundComponent
      Marker that can be set on a record to flag that record as hilited. Should be set to a value&#010 that matches {@link com.smartgwt.client..Hilite#getId id} for a hilite defined on this component.
      Specified by:
      getHiliteProperty in interface DataBoundComponent
      Returns:
      String
    • editFields

      public void editFields()
      Shows a FieldPicker interface allowing end-users to rearrange the order and visibiility of the fields in the associated DataBoundComponent.
    • editHilites

      public void editHilites()
      Description copied from interface: DataBoundComponent
      Shows a HiliteEditor interface allowing end-users to edit the data-hilites currently in use by this DataBoundComponent.
      Specified by:
      editHilites in interface DataBoundComponent
    • getHiliteState

      public String getHiliteState()
      Description copied from interface: DataBoundComponent
      Get the current hilites encoded as a String, for saving.
      Specified by:
      getHiliteState in interface DataBoundComponent
      Returns:
      the hilite state
    • setHiliteState

      public FacetChart setHiliteState(String hiliteState)
      Description copied from interface: DataBoundComponent
      Set the current hilites based on a hiliteState String previously returned from getHilitesState.
      Specified by:
      setHiliteState in interface DataBoundComponent
      Parameters:
      hiliteState - hilites state encoded as a String
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • setHilites

      public FacetChart setHilites(Hilite[] hilites)
      Description copied from interface: DataBoundComponent
      Accepts an array of hilite objects and applies them to this DataBoundComponent. See also getHilites for a method of retrieving the hilite array for storage, including hilites manually added by the user.

      NOTE: This is only supported on ListGrid for now.

      Specified by:
      setHilites in interface DataBoundComponent
      Parameters:
      hilites - array of hilite objects
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getHilites

      public Hilite[] getHilites()
      Description copied from interface: DataBoundComponent
      Return the set of hilite-objects currently applied to this DataBoundComponent. These can be saved for storage and then restored to a component later via setHilites().
      Specified by:
      getHilites in interface DataBoundComponent
      Returns:
      array of hilite objects
    • setDragDataAction

      public FacetChart setDragDataAction(DragDataAction dragDataAction)
      Description copied from interface: DataBoundComponent
      Indicates what to do with data dragged into another DataBoundComponent. See&#010 DragDataAction type for details.
      Specified by:
      setDragDataAction in interface DataBoundComponent
      Parameters:
      dragDataAction - dragDataAction Default value is Canvas.MOVE
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getDragDataAction

      public DragDataAction getDragDataAction()
      Description copied from interface: DataBoundComponent
      Indicates what to do with data dragged into another DataBoundComponent. See&#010 DragDataAction type for details.
      Specified by:
      getDragDataAction in interface DataBoundComponent
      Returns:
      DragDataAction
    • setDragTrackerStyle

      public FacetChart setDragTrackerStyle(String dragTrackerStyle)
      Description copied from interface: DataBoundComponent
      CSS Style to apply to the drag tracker when dragging occurs on this component.
      Specified by:
      setDragTrackerStyle in interface DataBoundComponent
      Parameters:
      dragTrackerStyle - dragTrackerStyle Default value is "gridDragTracker"
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getDragTrackerStyle

      public String getDragTrackerStyle()
      Description copied from interface: DataBoundComponent
      CSS Style to apply to the drag tracker when dragging occurs on this component.
      Specified by:
      getDragTrackerStyle in interface DataBoundComponent
      Returns:
      String
    • setCanAddFormulaFields

      public FacetChart setCanAddFormulaFields(Boolean canAddFormulaFields)
      Description copied from interface: DataBoundComponent
      Adds an item to the header context menu allowing users to launch a dialog to define a new&#010 field based on values present in other fields, using the {@link com.smartgwt.client..FormulaBuilder}.&#010

      &#010 User-added formula fields can be persisted via ListGrid.getFieldState() and &#010 ListGrid.setFieldState(java.lang.String).

      Specified by:
      setCanAddFormulaFields in interface DataBoundComponent
      Parameters:
      canAddFormulaFields - canAddFormulaFields Default value is false
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • addSummaryField

      public void addSummaryField()
      Description copied from interface: DataBoundComponent
      Convenience method to display a {@link com.smartgwt.client..SummaryBuilder} to create a new Summary Field. This &#010 is equivalent to calling DataBoundComponentGen#editSummaryField with &#010 no parameter.&#010&#010
      Specified by:
      addSummaryField in interface DataBoundComponent
    • addFormulaField

      public void addFormulaField()
      Description copied from interface: DataBoundComponent
      Convenience method to display a {@link com.smartgwt.client..FormulaBuilder} to create a new Formula Field. This &#010 is equivalent to calling DataBoundComponentGen#editFormulaField with &#010 no parameter.&#010&#010
      Specified by:
      addFormulaField in interface DataBoundComponent
    • getCanAddFormulaFields

      public Boolean getCanAddFormulaFields()
      Description copied from interface: DataBoundComponent
      Adds an item to the header context menu allowing users to launch a dialog to define a new&#010 field based on values present in other fields, using the {@link com.smartgwt.client..FormulaBuilder}.&#010

      &#010 User-added formula fields can be persisted via ListGrid.getFieldState() and &#010 ListGrid.setFieldState(java.lang.String).

      Specified by:
      getCanAddFormulaFields in interface DataBoundComponent
      Returns:
      Boolean
    • setAddFormulaFieldText

      public FacetChart setAddFormulaFieldText(String addFormulaFieldText)
      Description copied from interface: DataBoundComponent
      Text for a menu item allowing users to add a formula field
      Specified by:
      setAddFormulaFieldText in interface DataBoundComponent
      Parameters:
      addFormulaFieldText - addFormulaFieldText Default value is "Add formula column..."
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getAddFormulaFieldText

      public String getAddFormulaFieldText()
      Description copied from interface: DataBoundComponent
      Text for a menu item allowing users to add a formula field
      Specified by:
      getAddFormulaFieldText in interface DataBoundComponent
      Returns:
      String
    • setEditFormulaFieldText

      public FacetChart setEditFormulaFieldText(String editFormulaFieldText)
      Description copied from interface: DataBoundComponent
      Text for a menu item allowing users to edit a formula field
      Specified by:
      setEditFormulaFieldText in interface DataBoundComponent
      Parameters:
      editFormulaFieldText - editFormulaFieldText Default value is "Edit formula..."
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getEditFormulaFieldText

      public String getEditFormulaFieldText()
      Description copied from interface: DataBoundComponent
      Text for a menu item allowing users to edit a formula field
      Specified by:
      getEditFormulaFieldText in interface DataBoundComponent
      Returns:
      String
    • setCanAddSummaryFields

      public FacetChart setCanAddSummaryFields(Boolean canAddSummaryFields)
      Description copied from interface: DataBoundComponent
      Adds an item to the header context menu allowing users to launch a dialog to define a new&#010 text field that can contain both user-defined text and the formatted values present in other &#010 fields, using the {@link com.smartgwt.client..SummaryBuilder}.&#010

      &#010 User-added summary fields can be persisted via ListGrid.getFieldState() and &#010 ListGrid.setFieldState(java.lang.String).

      Specified by:
      setCanAddSummaryFields in interface DataBoundComponent
      Parameters:
      canAddSummaryFields - canAddSummaryFields Default value is false
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getCanAddSummaryFields

      public Boolean getCanAddSummaryFields()
      Description copied from interface: DataBoundComponent
      Adds an item to the header context menu allowing users to launch a dialog to define a new&#010 text field that can contain both user-defined text and the formatted values present in other &#010 fields, using the {@link com.smartgwt.client..SummaryBuilder}.&#010

      &#010 User-added summary fields can be persisted via ListGrid.getFieldState() and &#010 ListGrid.setFieldState(java.lang.String).

      Specified by:
      getCanAddSummaryFields in interface DataBoundComponent
      Returns:
      Boolean
    • setAddSummaryFieldText

      public FacetChart setAddSummaryFieldText(String addSummaryFieldText)
      Description copied from interface: DataBoundComponent
      Text for a menu item allowing users to add a formula field
      Specified by:
      setAddSummaryFieldText in interface DataBoundComponent
      Parameters:
      addSummaryFieldText - addSummaryFieldText Default value is "Add summary column..."
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getAddSummaryFieldText

      public String getAddSummaryFieldText()
      Description copied from interface: DataBoundComponent
      Text for a menu item allowing users to add a formula field
      Specified by:
      getAddSummaryFieldText in interface DataBoundComponent
      Returns:
      String
    • setEditSummaryFieldText

      public FacetChart setEditSummaryFieldText(String editSummaryFieldText)
      Description copied from interface: DataBoundComponent
      Text for a menu item allowing users to edit the formatter for a field
      Specified by:
      setEditSummaryFieldText in interface DataBoundComponent
      Parameters:
      editSummaryFieldText - editSummaryFieldText Default value is "Edit summary format..."
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getEditSummaryFieldText

      public String getEditSummaryFieldText()
      Description copied from interface: DataBoundComponent
      Text for a menu item allowing users to edit the formatter for a field
      Specified by:
      getEditSummaryFieldText in interface DataBoundComponent
      Returns:
      String
    • setSavedSearchId

      public FacetChart setSavedSearchId(String savedSearchId)
      Description copied from interface: DataBoundComponent
      Optional identifier for saved searches that should be applied to this component.

      By default SavedSearches are associated with a component via its local ID and DataSource ID. This property allows developers to override this behavior and explicitly associate a component with a set of saved searches. This can provide a couple of benefits:
      Firstly this ensures that saved searches will be unambiguously associated with the particular component even if the page changes such that a stored minimal locator would no longer applied to the component, without requiring an explicit Canvas.ID.
      Secondly this allows the same set of saved searches to be applied to more than one component on a page. This may be valueable for cases where the same information from the same dataSource is presented to users in multiple places.

      Note: This is an advanced setting.

      Specified by:
      setSavedSearchId in interface DataBoundComponent
      Parameters:
      savedSearchId - New savedSearchId value. Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getSavedSearchId

      public String getSavedSearchId()
      Description copied from interface: DataBoundComponent
      Optional identifier for saved searches that should be applied to this component.

      By default SavedSearches are associated with a component via its local ID and DataSource ID. This property allows developers to override this behavior and explicitly associate a component with a set of saved searches. This can provide a couple of benefits:
      Firstly this ensures that saved searches will be unambiguously associated with the particular component even if the page changes such that a stored minimal locator would no longer applied to the component, without requiring an explicit Canvas.ID.
      Secondly this allows the same set of saved searches to be applied to more than one component on a page. This may be valueable for cases where the same information from the same dataSource is presented to users in multiple places.

      Specified by:
      getSavedSearchId in interface DataBoundComponent
      Returns:
      Current savedSearchId value. Default value is null
    • setShowSavedSearchesByDS

      public FacetChart setShowSavedSearchesByDS(boolean showSavedSearchesByDS) throws IllegalStateException
      Description copied from interface: DataBoundComponent
      Whether to associate saved searches by default with the current DataSource of a component when a savedSearchId is not provided. If this property is true, then when the DataSource is changed, existing saved searches will disappear and only be available if the DataSource is set back to its original value.

      If this property is false, saved searches will persist across DataSource changes so that searches that aren't applicable to the current DataSource might still be shown.

      Note: This is an advanced setting

      Specified by:
      setShowSavedSearchesByDS in interface DataBoundComponent
      Parameters:
      showSavedSearchesByDS - New showSavedSearchesByDS value. Default value is true
      Returns:
      DataBoundComponent instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowSavedSearchesByDS

      public boolean getShowSavedSearchesByDS()
      Description copied from interface: DataBoundComponent
      Whether to associate saved searches by default with the current DataSource of a component when a savedSearchId is not provided. If this property is true, then when the DataSource is changed, existing saved searches will disappear and only be available if the DataSource is set back to its original value.

      If this property is false, saved searches will persist across DataSource changes so that searches that aren't applicable to the current DataSource might still be shown.

      Specified by:
      getShowSavedSearchesByDS in interface DataBoundComponent
      Returns:
      Current showSavedSearchesByDS value. Default value is true
    • findAll

      public Record[] findAll(AdvancedCriteria adCriteria)
      Filters all objects according to the AdvancedCriteria passed
      Parameters:
      adCriteria - AdvancedCriteria to use to filter results
      Returns:
      all matching Objects or null if none found
    • find

      public Record find(AdvancedCriteria adCriteria)
      Filters all objects according to the AdvancedCriteria passed and returns the first matching object or null if not found
      Parameters:
      adCriteria - AdvancedCriteria to use to filter results
      Returns:
      first matching object or null if not found
    • findIndex

      public int findIndex(AdvancedCriteria adCriteria)
      Finds the index of the first Record that matches with the AdvacendCriteria passed.
      Parameters:
      adCriteria - AdvancedCriteria to use to filter results
      Returns:
      index of the first matching Record or -1 if not found
    • findNextIndex

      public int findNextIndex(int startIndex, AdvancedCriteria adCriteria, int endIndex)
      Like RecordList.findIndex(java.util.Map), but considering the startIndex and endIndex parameters.
      Parameters:
      startIndex - first index to consider
      adCriteria - AdvancedCriteria to use to filter results
      endIndex - last index to consider
      Returns:
      index of the first matching Record or -1 if not found
    • findNextIndex

      public int findNextIndex(int startIndex, AdvancedCriteria adCriteria)
      Like RecordList.findIndex(java.util.Map), but considering the startIndex parameter.
      Parameters:
      startIndex - first index to consider
      adCriteria - AdvancedCriteria to use to filter results
      Returns:
      index of the first matching Record or -1 if not found
    • selectRecord

      public void selectRecord(Record record)
      Description copied from interface: DataBoundComponent
      Select/deselect a Record passed in explicitly, or by index.
      Specified by:
      selectRecord in interface DataBoundComponent
      Parameters:
      record - record (or row number) to select
    • selectRecord

      public void selectRecord(int record)
      Description copied from interface: DataBoundComponent
      Select/deselect a Record passed in explicitly, or by index.
      Specified by:
      selectRecord in interface DataBoundComponent
      Parameters:
      record - record (or row number) to select
    • selectRecord

      public void selectRecord(int record, boolean newState)
      Description copied from interface: DataBoundComponent
      Select/deselect a Record passed in explicitly, or by index.
      Specified by:
      selectRecord in interface DataBoundComponent
      Parameters:
      record - record (or row number) to select
      newState - new selection state (if null, defaults to true)
    • selectRecord

      public void selectRecord(Record record, boolean newState)
      Description copied from interface: DataBoundComponent
      Select/deselect a Record passed in explicitly, or by index.
      Specified by:
      selectRecord in interface DataBoundComponent
      Parameters:
      record - record (or row number) to select
      newState - new selection state (if null, defaults to true)
    • selectRecords

      public void selectRecords(int[] records)
      Description copied from interface: DataBoundComponent
      Select/deselect a list of Records passed in explicitly, or by index.
      Specified by:
      selectRecords in interface DataBoundComponent
      Parameters:
      records - records (or row numbers) to select
    • selectRecords

      public void selectRecords(int[] records, boolean newState)
      Description copied from interface: DataBoundComponent
      Select/deselect a list of Records passed in explicitly, or by index.
      Specified by:
      selectRecords in interface DataBoundComponent
      Parameters:
      records - records (or row numbers) to select
      newState - new selection state
    • selectRecords

      public void selectRecords(Record[] records)
      Description copied from interface: DataBoundComponent
      Select/deselect a list of Records passed in explicitly, or by index.
      Specified by:
      selectRecords in interface DataBoundComponent
      Parameters:
      records - records (or row numbers) to select
    • selectRecords

      public void selectRecords(Record[] records, boolean newState)
      Description copied from interface: DataBoundComponent
      Select/deselect a list of Records passed in explicitly, or by index.
      Specified by:
      selectRecords in interface DataBoundComponent
      Parameters:
      records - records (or row numbers) to select
      newState - new selection state (if null, defaults to true)
    • deselectRecord

      public void deselectRecord(Record record)
      Description copied from interface: DataBoundComponent
      Deselect a Record passed in explicitly, or by index.

      Synonym for selectRecord(record, false)

      Specified by:
      deselectRecord in interface DataBoundComponent
      Parameters:
      record - record (or row number) to deselect
    • deselectRecord

      public void deselectRecord(int record)
      Description copied from interface: DataBoundComponent
      Deselect a Record passed in explicitly, or by index.

      Synonym for selectRecord(record, false)

      Specified by:
      deselectRecord in interface DataBoundComponent
      Parameters:
      record - record (or row number) to deselect
    • deselectRecords

      public void deselectRecords(int[] records)
      Description copied from interface: DataBoundComponent
      Deselect a list of Records passed in explicitly, or by index.

      Synonym for selectRecords(records, false)

      Specified by:
      deselectRecords in interface DataBoundComponent
      Parameters:
      records - records (or row numbers) to deselect
    • deselectRecords

      public void deselectRecords(Record[] records)
      Description copied from interface: DataBoundComponent
      Deselect a list of Records passed in explicitly, or by index.

      Synonym for selectRecords(records, false)

      Specified by:
      deselectRecords in interface DataBoundComponent
      Parameters:
      records - records (or row numbers) to deselect
    • selectAllRecords

      public void selectAllRecords()
      Description copied from interface: DataBoundComponent
      Select all records&#010&#010
      Specified by:
      selectAllRecords in interface DataBoundComponent
    • deselectAllRecords

      public void deselectAllRecords()
      Description copied from interface: DataBoundComponent
      &#010 Deselect all records&#010&#010
      Specified by:
      deselectAllRecords in interface DataBoundComponent
    • anySelected

      public Boolean anySelected()
      Description copied from interface: DataBoundComponent
      Whether at least one item is selected&#010
      Specified by:
      anySelected in interface DataBoundComponent
      Returns:
      true == at least one item is selected false == nothing at all is selected
    • enableHilite

      public void enableHilite(String hiliteID)
      Description copied from interface: DataBoundComponent
      Enable / disable a hilites&#010&#010
      Specified by:
      enableHilite in interface DataBoundComponent
      Parameters:
      hiliteID - ID of hilite to enable
    • enableHilite

      public void enableHilite(String hiliteID, boolean enable)
      Description copied from interface: DataBoundComponent
      Enable / disable a hilites&#010&#010
      Specified by:
      enableHilite in interface DataBoundComponent
      Parameters:
      hiliteID - ID of hilite to enable
      enable - new enabled state to apply - if null, defaults to true
    • disableHilite

      public void disableHilite(String hiliteID)
      Description copied from interface: DataBoundComponent
      Disable a hilite&#010&#010
      Specified by:
      disableHilite in interface DataBoundComponent
      Parameters:
      hiliteID - ID of hilite to disable
    • enableHiliting

      public void enableHiliting()
      Description copied from interface: DataBoundComponent
      Enable all hilites.&#010&#010
      Specified by:
      enableHiliting in interface DataBoundComponent
    • enableHiliting

      public void enableHiliting(boolean enable)
      Description copied from interface: DataBoundComponent
      Enable all hilites.&#010&#010
      Specified by:
      enableHiliting in interface DataBoundComponent
      Parameters:
      enable - new enabled state to apply - if null, defaults to true
    • disableHiliting

      public void disableHiliting()
      Description copied from interface: DataBoundComponent
      Disable all hilites.&#010&#010
      Specified by:
      disableHiliting in interface DataBoundComponent
    • getDragData

      public Record[] getDragData()
      Description copied from interface: DataBoundComponent
      During a drag-and-drop interaction, this method returns the set of records being dragged out of the component. In the default implementation, this is the list of currently selected records.

      This method is consulted by&#010 ListGrid.willAcceptDrop().

      Specified by:
      getDragData in interface DataBoundComponent
      Returns:
      Array of Records that are currently selected.
    • transferSelectedData

      public void transferSelectedData(DataBoundComponent source)
      Description copied from interface: DataBoundComponent
      Simulates a drag / drop type transfer of the selected records in some other component to this component, without requiring any user interaction. This method acts on the dropped records exactly as if they had been dropped in an actual drag / drop interaction, including any special databound behavior invoked by calling DataBoundComponent.getDropValues() for each dropped record.

      To transfer all data in, for example, a ListGrid, call grid.selection.selectAll() first.

      Note that drag/drop type transfers of records between components are asynchronous operations: Smart GWT may need to perform server turnarounds to establish whether dropped records already exist in the target component. Therefore, it is possible to issue a call to transferSelectedData() and/or the drop() method of a databound component whilst a transfer is still active. When this happens, Smart GWT adds the second and subsequent transfer requests to a queue and runs them one after the other. If you want to be notified when a transfer process has actually completed, use HasDropCompleteHandlers.addDropCompleteHandler(com.smartgwt.client.widgets.events.DropCompleteHandler). See the Dragging documentation for an overview of list grid drag/drop data transfer.

      Specified by:
      transferSelectedData in interface DataBoundComponent
      Parameters:
      source - source component from which the records will be tranferred
    • transferSelectedData

      public void transferSelectedData(DataBoundComponent source, int index)
      Description copied from interface: DataBoundComponent
      Simulates a drag / drop type transfer of the selected records in some other component to this component, without requiring any user interaction. This method acts on the dropped records exactly as if they had been dropped in an actual drag / drop interaction, including any special databound behavior invoked by calling DataBoundComponent.getDropValues() for each dropped record.

      To transfer all data in, for example, a ListGrid, call grid.selection.selectAll() first.

      Note that drag/drop type transfers of records between components are asynchronous operations: Smart GWT may need to perform server turnarounds to establish whether dropped records already exist in the target component. Therefore, it is possible to issue a call to transferSelectedData() and/or the drop() method of a databound component whilst a transfer is still active. When this happens, Smart GWT adds the second and subsequent transfer requests to a queue and runs them one after the other. If you want to be notified when a transfer process has actually completed, use HasDropCompleteHandlers.addDropCompleteHandler(com.smartgwt.client.widgets.events.DropCompleteHandler). See the Dragging documentation for an overview of list grid drag/drop data transfer.

      Specified by:
      transferSelectedData in interface DataBoundComponent
      Parameters:
      source - source component from which the records will be transferred
      index - target index (drop position) of the rows within this grid.
    • getRecordIndex

      public int getRecordIndex(Record record)
      Description copied from interface: DataBoundComponent
      Get the index of the provided record.&#010

      &#010 Override in subclasses to provide more specific behaviour, for instance, when data holds a&#010 large number of records&#010&#010

      Specified by:
      getRecordIndex in interface DataBoundComponent
      Parameters:
      record - the record whose index is to be retrieved
      Returns:
      indexindex of the record, or -1 if not found
    • getTitleFieldValue

      public String getTitleFieldValue(Record record)
      Description copied from interface: DataBoundComponent
      Get the value of the titleField for the passed record&#010

      &#010 Override in subclasses &#010&#010

      Specified by:
      getTitleFieldValue in interface DataBoundComponent
      Parameters:
      record - the record whose index is to be retrieved
      Returns:
      valuethe value of the titleField for the passed record
    • setTitleField

      public FacetChart setTitleField(String titleField)
      Description copied from interface: DataBoundComponent
      Sets the best field to use for a user-visible title for an individual record from this component.
      Specified by:
      setTitleField in interface DataBoundComponent
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getTitleField

      public String getTitleField()
      Description copied from interface: DataBoundComponent
      Method to return the fieldName which represents the "title" for records in this&#010 Component.
      &#010 If this.titleField is explicitly specified it will always be used.&#010 Otherwise, default implementation will check titleField for databound&#010 components.
      &#010 For non databound components returns the first defined field name of "title", &#010 "name", or "id". If we dont find any field-names that match these&#010 titles, the first field in the component will be used instead.&#010
      Specified by:
      getTitleField in interface DataBoundComponent
      Returns:
      fieldName the title field for this component.
    • getDataSource

      public DataSource getDataSource()
      Description copied from interface: DataBoundComponent
      The DataSource that this component should bind to for default fields and for performing DataSource requests.
      Specified by:
      getDataSource in interface DataBoundComponent
      Returns:
      DataSource
    • setAutoFetchData

      public FacetChart setAutoFetchData(Boolean autoFetchData) throws IllegalStateException
      Description copied from interface: DataBoundComponent
      If true, when this component is first drawn, automatically call DataBoundComponent.fetchData() or DataBoundComponent.filterData() depending on DataBoundComponent.getAutoFetchAsFilter() . Criteria for this fetch may be picked up from initialCriteria and textMatchStyle may be specified via DataBoundComponent.getAutoFetchTextMatchStyle().

      NOTE: If autoFetchData is set, calling ListGrid.fetchData() before draw will cause two requests to be issued, one from the manual call to fetchData() and one from the autoFetchData setting. The second request will use only initialCriteria and not any other criteria or settings from the first request. Generally, turn off autoFetchData if you are going to manually call fetchData() at any time.

      Specified by:
      setAutoFetchData in interface DataBoundComponent
      Parameters:
      autoFetchData - autoFetchData
      Returns:
      DataBoundComponent instance, for chaining setter calls
      Throws:
      IllegalStateException
    • getAutoFetchData

      public Boolean getAutoFetchData()
      Description copied from interface: DataBoundComponent
      If true, when this component is first drawn, automatically call DataBoundComponent.fetchData() or DataBoundComponent.filterData() depending on DataBoundComponent.getAutoFetchAsFilter() . Criteria for this fetch may be picked up from initialCriteria and textMatchStyle may be specified via DataBoundComponent.getAutoFetchTextMatchStyle().

      NOTE: If autoFetchData is set, calling ListGrid.fetchData() before draw will cause two requests to be issued, one from the manual call to fetchData() and one from the autoFetchData setting. The second request will use only initialCriteria and not any other criteria or settings from the first request. Generally, turn off autoFetchData if you are going to manually call fetchData() at any time.

      Specified by:
      getAutoFetchData in interface DataBoundComponent
      Returns:
      autoFetchData autoFetchData
    • setAutoFetchTextMatchStyle

      public FacetChart setAutoFetchTextMatchStyle(TextMatchStyle autoFetchTextMatchStyle) throws IllegalStateException
      Description copied from interface: DataBoundComponent
      If autoFetchData is true, this attribute allows the developer to specify a textMatchStyle for the initial DataBoundComponent.fetchData() call.
      Specified by:
      setAutoFetchTextMatchStyle in interface DataBoundComponent
      Returns:
      DataBoundComponent instance, for chaining setter calls
      Throws:
      IllegalStateException
    • getAutoFetchTextMatchStyle

      public TextMatchStyle getAutoFetchTextMatchStyle()
      Description copied from interface: DataBoundComponent
      If autoFetchData is true, this attribute allows the developer to specify a textMatchStyle for the initial DataBoundComponent.fetchData() call.
      Specified by:
      getAutoFetchTextMatchStyle in interface DataBoundComponent
      Returns:
      autoFetchTextMatchStyle autoFetchTextMatchStyle
    • setAutoFetchAsFilter

      public FacetChart setAutoFetchAsFilter(Boolean autoFetchAsFilter) throws IllegalStateException
      Description copied from interface: DataBoundComponent
      If DataBoundComponent.setAutoFetchData(Boolean) is true, this attribute determines whether the initial fetch operation should be performed via DataBoundComponent.fetchData() or DataBoundComponent.filterData()
      Specified by:
      setAutoFetchAsFilter in interface DataBoundComponent
      Parameters:
      autoFetchAsFilter - autoFetchAsFilter
      Returns:
      DataBoundComponent instance, for chaining setter calls
      Throws:
      IllegalStateException
    • getAutoFetchAsFilter

      public Boolean getAutoFetchAsFilter()
      Description copied from interface: DataBoundComponent
      If DataBoundComponent.setAutoFetchData(Boolean) is true, this attribute determines whether the initial fetch operation should be performed via DataBoundComponent.fetchData() or DataBoundComponent.filterData()
      Specified by:
      getAutoFetchAsFilter in interface DataBoundComponent
      Returns:
      auto fetch as filter
    • setInitialCriteria

      public FacetChart setInitialCriteria(Criteria initialCriteria) throws IllegalStateException
      Description copied from interface: DataBoundComponent
      Criteria to use when DataBoundComponent.setAutoFetchData(Boolean) is used.
      Specified by:
      setInitialCriteria in interface DataBoundComponent
      Parameters:
      initialCriteria - the initial criteria
      Returns:
      DataBoundComponent instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getInitialCriteria

      public Criteria getInitialCriteria()
      Description copied from interface: DataBoundComponent
      Criteria to use when DataBoundComponent.setAutoFetchData(Boolean) is used.
      Specified by:
      getInitialCriteria in interface DataBoundComponent
      Returns:
      the criteria
    • setImplicitCriteria

      public FacetChart setImplicitCriteria(Criteria implicitCriteria)
      Description copied from interface: DataBoundComponent
      Criteria that are never shown to or edited by the user and are cumulative with any criteria provided via DataBoundComponent.initialCriteria, DataBoundComponent.setCriteria() etc.
      Specified by:
      setImplicitCriteria in interface DataBoundComponent
      Parameters:
      implicitCriteria - New implicitCriteria value. Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • setImplicitCriteria

      public Boolean setImplicitCriteria(Criteria implicitCriteria, DSCallback callback)
    • setImplicitCriteria

      public Boolean setImplicitCriteria(Criteria criteria, DSCallback callback, Boolean initialFetch)
    • getImplicitCriteria

      public Criteria getImplicitCriteria()
      Description copied from interface: DataBoundComponent
      Criteria that are never shown to or edited by the user and are cumulative with any criteria provided via DataBoundComponent.initialCriteria, DataBoundComponent.setCriteria() etc.
      Specified by:
      getImplicitCriteria in interface DataBoundComponent
      Returns:
      Current implicitCriteria value. Default value is null
    • fetchData

      public void fetchData()
      Description copied from interface: DataBoundComponent
      Retrieves data from the DataSource that matches the specified criteria.

      When fetchData() is first called, if data has not already been provided via setData(), this method will create a ResultSet, which will be configured based on component settings such as fetchOperation and dataPageSize, as well as the general purpose dataProperties. The created ResultSet will automatically send a DSRequest to retrieve data from the dataSource, and from then on will automatically manage paging through large datasets, as well as performing filtering and sorting operations inside the browser when possible - see the ResultSet docs for details.

      NOTE: do not use both autoFetchData and a call to fetchData() - this may result in two DSRequests to fetch data. Use either autoFetchData and setAutoFetchCriteria() or a manual call to fetchData() passing criteria.

      Whether a ResultSet was automatically created or provided via setData(), subsequent calls to fetchData() will simply call resultSet.setCriteria().

      Changes to criteria may or may not result in a DSRequest to the server due to client-side filtering. You can call willFetchData(criteria) to determine if new criteria will result in a server fetch.

      If you need to force data to be re-fetched, you can call invalidateCache() and new data will automatically be fetched from the server using the current criteria and sort direction. NOTE: when using invalidateCache() there is no need to also call fetchData() and in fact this could produce unexpected results.

      This method takes an optional callback parameter (set to a DSCallback) to fire when the fetch completes. Note that this callback will not fire if no server fetch is performed. In this case the data is updated synchronously, so as soon as this method completes you can interact with the new data. If necessary, you can use resultSet.willFetchData() to determine whether or not a server fetch will occur when fetchData() is called with new criteria.

      In addition to the callback parameter for this method, developers can use resultSet.addDataArrivedHandler to be notified every time data is loaded.

      Specified by:
      fetchData in interface DataBoundComponent
    • fetchData

      public void fetchData(Criteria criteria)
      Description copied from interface: DataBoundComponent
      Retrieves data from the DataSource that matches the specified criteria.

      When fetchData() is first called, if data has not already been provided via setData(), this method will create a ResultSet, which will be configured based on component settings such as fetchOperation and dataPageSize, as well as the general purpose dataProperties. The created ResultSet will automatically send a DSRequest to retrieve data from the dataSource, and from then on will automatically manage paging through large datasets, as well as performing filtering and sorting operations inside the browser when possible - see the ResultSet docs for details.

      NOTE: do not use both autoFetchData and a call to fetchData() - this may result in two DSRequests to fetch data. Use either autoFetchData and setAutoFetchCriteria() or a manual call to fetchData() passing criteria.

      Whether a ResultSet was automatically created or provided via setData(), subsequent calls to fetchData() will simply call resultSet.setCriteria().

      Changes to criteria may or may not result in a DSRequest to the server due to client-side filtering. You can call willFetchData(criteria) to determine if new criteria will result in a server fetch.

      If you need to force data to be re-fetched, you can call invalidateCache() and new data will automatically be fetched from the server using the current criteria and sort direction. NOTE: when using invalidateCache() there is no need to also call fetchData() and in fact this could produce unexpected results.

      This method takes an optional callback parameter (set to a DSCallback) to fire when the fetch completes. Note that this callback will not fire if no server fetch is performed. In this case the data is updated synchronously, so as soon as this method completes you can interact with the new data. If necessary, you can use resultSet.willFetchData() to determine whether or not a server fetch will occur when fetchData() is called with new criteria.

      In addition to the callback parameter for this method, developers can use resultSet.addDataArrivedHandler to be notified every time data is loaded.

      Specified by:
      fetchData in interface DataBoundComponent
      Parameters:
      criteria - Search criteria. If a DynamicForm is passed in as this argument instead of a raw criteria object, will be derived by calling DynamicForm.getValuesAsCriteria()
    • fetchData

      public void fetchData(Criteria criteria, DSCallback callback)
      Description copied from interface: DataBoundComponent
      Retrieves data from the DataSource that matches the specified criteria.

      When fetchData() is first called, if data has not already been provided via setData(), this method will create a ResultSet, which will be configured based on component settings such as fetchOperation and dataPageSize, as well as the general purpose dataProperties. The created ResultSet will automatically send a DSRequest to retrieve data from the dataSource, and from then on will automatically manage paging through large datasets, as well as performing filtering and sorting operations inside the browser when possible - see the ResultSet docs for details.

      NOTE: do not use both autoFetchData and a call to fetchData() - this may result in two DSRequests to fetch data. Use either autoFetchData and setAutoFetchCriteria() or a manual call to fetchData() passing criteria.

      Whether a ResultSet was automatically created or provided via setData(), subsequent calls to fetchData() will simply call resultSet.setCriteria().

      Changes to criteria may or may not result in a DSRequest to the server due to client-side filtering. You can call willFetchData(criteria) to determine if new criteria will result in a server fetch.

      If you need to force data to be re-fetched, you can call invalidateCache() and new data will automatically be fetched from the server using the current criteria and sort direction. NOTE: when using invalidateCache() there is no need to also call fetchData() and in fact this could produce unexpected results.

      This method takes an optional callback parameter (set to a DSCallback) to fire when the fetch completes. Note that this callback will not fire if no server fetch is performed. In this case the data is updated synchronously, so as soon as this method completes you can interact with the new data. If necessary, you can use resultSet.willFetchData() to determine whether or not a server fetch will occur when fetchData() is called with new criteria.

      In addition to the callback parameter for this method, developers can use resultSet.addDataArrivedHandler to be notified every time data is loaded.

      Specified by:
      fetchData in interface DataBoundComponent
      Parameters:
      criteria - Search criteria. If a DynamicForm is passed in as this argument instead of a raw criteria object, will be derived by calling DynamicForm.getValuesAsCriteria()
      callback - callback to invoke when a fetch is complete. Fires only if server contact was required
    • fetchData

      public void fetchData(Criteria criteria, DSCallback callback, DSRequest requestProperties)
      Description copied from interface: DataBoundComponent
      Retrieves data from the DataSource that matches the specified criteria.

      When fetchData() is first called, if data has not already been provided via setData(), this method will create a ResultSet, which will be configured based on component settings such as fetchOperation and dataPageSize, as well as the general purpose dataProperties. The created ResultSet will automatically send a DSRequest to retrieve data from the dataSource, and from then on will automatically manage paging through large datasets, as well as performing filtering and sorting operations inside the browser when possible - see the ResultSet docs for details.

      NOTE: do not use both autoFetchData and a call to fetchData() - this may result in two DSRequests to fetch data. Use either autoFetchData and setAutoFetchCriteria() or a manual call to fetchData() passing criteria.

      Whether a ResultSet was automatically created or provided via setData(), subsequent calls to fetchData() will simply call resultSet.setCriteria().

      Changes to criteria may or may not result in a DSRequest to the server due to client-side filtering. You can call willFetchData(criteria) to determine if new criteria will result in a server fetch.

      If you need to force data to be re-fetched, you can call invalidateCache() and new data will automatically be fetched from the server using the current criteria and sort direction. NOTE: when using invalidateCache() there is no need to also call fetchData() and in fact this could produce unexpected results.

      This method takes an optional callback parameter (set to a DSCallback) to fire when the fetch completes. Note that this callback will not fire if no server fetch is performed. In this case the data is updated synchronously, so as soon as this method completes you can interact with the new data. If necessary, you can use resultSet.willFetchData() to determine whether or not a server fetch will occur when fetchData() is called with new criteria.

      In addition to the callback parameter for this method, developers can use resultSet.addDataArrivedHandler to be notified every time data is loaded.

      Specified by:
      fetchData in interface DataBoundComponent
      Parameters:
      criteria - Search criteria. If a DynamicForm is passed in as this argument instead of a raw criteria object, will be derived by calling DynamicForm.getValuesAsCriteria()
      callback - callback to invoke when a fetch is complete. Fires only if server contact was required
      requestProperties - additional properties to set on the DSRequest that will be issued
    • filterData

      public void filterData()
      Description copied from interface: DataBoundComponent
      Retrieves data that matches the provided criteria and displays the matching data in this component.

      This method behaves exactly like ListGrid.fetchData() except that textMatchStyle is automatically set to "substring" so that String-valued fields are matched by case-insensitive substring comparison.

      Specified by:
      filterData in interface DataBoundComponent
    • filterData

      public void filterData(Criteria criteria)
      Description copied from interface: DataBoundComponent
      Retrieves data that matches the provided criteria and displays the matching data in this component.

      This method behaves exactly like ListGrid.fetchData() except that textMatchStyle is automatically set to "substring" so that String-valued fields are matched by case-insensitive substring comparison.

      Specified by:
      filterData in interface DataBoundComponent
      Parameters:
      criteria - Search criteria. If a DynamicForm is passed in as this argument instead of a raw criteria object, will be derived by calling DynamicForm.getValuesAsCriteria()
    • filterData

      public void filterData(Criteria criteria, DSCallback callback)
      Description copied from interface: DataBoundComponent
      Retrieves data that matches the provided criteria and displays the matching data in this component.

      This method behaves exactly like ListGrid.fetchData() except that textMatchStyle is automatically set to "substring" so that String-valued fields are matched by case-insensitive substring comparison.

      Specified by:
      filterData in interface DataBoundComponent
      Parameters:
      criteria - Search criteria. If a DynamicForm is passed in as this argument instead of a raw criteria object, will be derived by calling DynamicForm.getValuesAsCriteria()
      callback - callback to invoke when a fetch is complete. Fires only if server contact was required; see DataBoundComponent.fetchData() for details
    • filterData

      public void filterData(Criteria criteria, DSCallback callback, DSRequest requestProperties)
      Description copied from interface: DataBoundComponent
      Retrieves data that matches the provided criteria and displays the matching data in this component.

      This method behaves exactly like ListGrid.fetchData() except that textMatchStyle is automatically set to "substring" so that String-valued fields are matched by case-insensitive substring comparison.

      Specified by:
      filterData in interface DataBoundComponent
      Parameters:
      criteria - Search criteria. If a DynamicForm is passed in as this argument instead of a raw criteria object, will be derived by calling DynamicForm.getValuesAsCriteria()
      callback - callback to invoke when a fetch is complete. Fires only if server contact was required; see DataBoundComponent.fetchData() for details
      requestProperties - for databound components only - optional additional properties to set on the DSRequest that will be issued
    • invalidateCache

      public void invalidateCache()
      Description copied from interface: DataBoundComponent
      Invalidate the current data cache for this databound component via a call to the dataset's invalidateCache() method, for example, ResultSet.invalidateCache().

      NOTE: there is no need to call invalidateCache() when a save operation is performed on a DataSource. Automatic cache synchronization features will automatically update caches - see ResultSet for details. If automatic cache synchronization isn't working, troubleshoot the problem using the steps suggested in the FAQ rather than just calling invalidateCache(). Calling invalidateCache() unnecessarily causes extra server load and added code complexity.

      Calling invalidateCache() will automatically cause a new fetch to be performed with the current set of criteria if data had been previously fetched and the component is currently drawn with data visible - there is no need to manually call fetchData() after invalidateCache() and this could result in duplicate fetches.

      While data is being re-loaded after a call to invalidateCache(), the widget is in a state similar to initial data load - it doesn't know the total length of the dataset and any APIs that act on records or row indices will necessarily fail and should not be called. To detect that the widget is in this state, call ResultSet.lengthIsKnown().

      invalidateCache() only has an effect if this component's dataset is a data manager class that manages a cache (eg ResultSet or ResultTree). If data was provided as a simple Array or List, invalidateCache() does nothing.

      Specified by:
      invalidateCache in interface DataBoundComponent
      See Also:
    • getResultSet

      public ResultSet getResultSet()
      Description copied from interface: DataBoundComponent
      Return the underlying data of this DataBoundComponent as a ResultSet.

      Note that this method should only be called after initial data has been fetched by this DataBoundComponent.

      Specified by:
      getResultSet in interface DataBoundComponent
      Returns:
      ResultSet, or null if the underlying data is not a ResultSet
      See Also:
    • getRecordList

      public RecordList getRecordList()
      Description copied from interface: DataBoundComponent
      Return the underlying data of this DataBoundComponent as a RecordList.

      Depending on the component configuration, the actual JavaScript instance of the returned RecordList may be one of several types:

      • If the component is not bound to a DataSource, the instance is generally an Array of Record.
      • If the component is bound to a DataSource, the instance is a ResultSet.
      • If the component is a grouped ListGrid, the instance is a Tree. To access the ungrouped record list regardless of grouping status, use
        isGrouped() ? getOriginalRecordList() : getRecordList()
      • If the component is a TreeGrid, the instance is a ResultTree.
      The underlying type determines the structure of the returned data. An Array or ResultSet represents a list of records, but a Tree or ResultTree represents a list of open rows in the tree, including groups or other nodes which contain no records.
      Specified by:
      getRecordList in interface DataBoundComponent
      Returns:
      the RecordList
    • getDataAsJSList

      public JavaScriptObject getDataAsJSList()
      Specified by:
      getDataAsJSList in interface DataBoundComponent
    • exportData

      public void exportData()
      Description copied from interface: DataBoundComponent
      Specified by:
      exportData in interface DataBoundComponent
    • exportData

      public void exportData(DSRequest requestProperties)
      Description copied from interface: DataBoundComponent
      Specified by:
      exportData in interface DataBoundComponent
    • exportData

      public void exportData(DSRequest requestProperties, RPCCallback callback)
      Description copied from interface: DataBoundComponent
      Uses a "fetch" operation on the current DataSource to retrieve data that matches the current filter and sort criteria for this component, then exports the resulting data to a file or window in the requested format.

      A variety of DSRequest settings, such as exportAs and exportFilename, affect the exporting process: see exportResults for further detail.

      Note that data exported via this method does not include any client-side formatting and relies on both the Smart GWT server and server-side DataSources. To export client-data with formatters applied, see exportClientData, which still requires the Smart GWT server but does not rely on server-side DataSources.

      For more information on exporting data, see DataSource.exportData.

      Specified by:
      exportData in interface DataBoundComponent
      Parameters:
      requestProperties - additional properties to set on DSRequest that will be issued
      callback - Optional callback. Note that this parameter only applies if you specify exportToClient: false in the request properties, because file downloads don't provide ordinary framework callbacks
      See Also:
    • addFetchDataHandler

      public HandlerRegistration addFetchDataHandler(FetchDataHandler handler)
      Add a fetchData handler.

      Notification function fired on fetchData() or filterData()

      Specified by:
      addFetchDataHandler in interface HasFetchDataHandlers
      Parameters:
      handler - the filterData handler
      Returns:
      HandlerRegistration used to remove this handler
    • addDropCompleteHandler

      public HandlerRegistration addDropCompleteHandler(DropCompleteHandler handler)
      Add a com.smartgwt.client.widgets.DropCompleteHandler. See that class's documentation for a definition of "drop complete", and how it differs from "drag complete" (com.smartgwt.client.widgets.DragCompleteHandler).
      Specified by:
      addDropCompleteHandler in interface HasDropCompleteHandlers
      Parameters:
      handler - the DropCompleteHandler
      Returns:
      HandlerRegistration used to remove this handler
    • addDragCompleteHandler

      public HandlerRegistration addDragCompleteHandler(DragCompleteHandler handler)
      Add a com.smartgwt.client.widgets.DragCompleteHandler. See that class's documentation for a definition of "drag complete", and how it differs from "drop complete" (com.smartgwt.client.widgets.DropCompleteHandler).
      Specified by:
      addDragCompleteHandler in interface HasDragCompleteHandlers
      Parameters:
      handler - the DropCompleteHandler
      Returns:
      HandlerRegistration used to remove this handler
    • getFieldAlignments

      public Alignment[] getFieldAlignments()
      Description copied from interface: DataBoundComponent
      Returna an array of field alignments for this grid
      Specified by:
      getFieldAlignments in interface DataBoundComponent
      Returns:
      array of Alignments
    • getDeepCloneOnEdit

      public Boolean getDeepCloneOnEdit()
      Description copied from interface: DataBoundComponent
      Before we start editing values in this DataBoundComponent, should we perform a deep clone of the underlying values. See DataSource.getDeepCloneOnEdit() for details of what this means.

      If this value is not explicitly set, it defaults to the DataSource deepCloneOnEdit value. This value can also be overridden per-field with DataSourceField.setDeepCloneOnEdit(java.lang.Boolean).

      Like the other deepCloneOnEdit settings, this flag only has an effect if you are editing a values object that contains nested objects or arrays, using Canvas.setDataPath(java.lang.String)

      Specified by:
      getDeepCloneOnEdit in interface DataBoundComponent
    • setDeepCloneOnEdit

      public FacetChart setDeepCloneOnEdit(Boolean deepCloneOnEdit)
      Description copied from interface: DataBoundComponent
      Before we start editing values in this DataBoundComponent, should we perform a deep clone of the underlying values. See DataSource.getDeepCloneOnEdit() for details of what this means.

      If this value is not explicitly set, it defaults to the DataSource deepCloneOnEdit value. This value can also be overridden per-field with DataSourceField.setDeepCloneOnEdit(java.lang.Boolean).

      Like the other deepCloneOnEdit settings, this flag only has an effect if you are editing a values object that contains nested objects or arrays, using Canvas.setDataPath(java.lang.String)

      Specified by:
      setDeepCloneOnEdit in interface DataBoundComponent
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • setFields

      public FacetChart setFields(JavaScriptObject... fields)
      Description copied from interface: DataBoundComponent
      Field setter variant (alternative to setFields(FormItem...), setFields(ListGridField...), etc.) that will accept an array of JavaScriptObject, rather than an array of SmartGWT Java wrappers of the field class type (e.g. FormItem, ListGridField, etc.) This is an advanced method and only for cases where you have the JavaScriptObject for each field but want to avoid having to create each associated SmartGWT Java wrapper.

      Note: use toArray() to create a Java array of JavaScriptObject if you only have the array itself as a single JavaScriptObject.

      Specified by:
      setFields in interface DataBoundComponent
      Parameters:
      fields - the component fields
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getFieldsAsJavaScriptObjects

      public JavaScriptObject[] getFieldsAsJavaScriptObjects()
      Description copied from interface: DataBoundComponent
      Return the fields as JavaScriptObjects rather than as SmartGWT Java wrappers of the field class type (e.g. FormItem, ListGridField, etc.) This avoids building the SmartGWT Java wrappers for the fields in situations where they aren't needed - and for FormItems in particular - where there may not be enough information to determine the correct subclass, such as before the SmartClient instance underlying the DynamicForm has been created.
      Specified by:
      getFieldsAsJavaScriptObjects in interface DataBoundComponent
      Returns:
      the component fields
    • getFieldCount

      public int getFieldCount()
      Description copied from interface: DataBoundComponent
      Return the number of fields.
      Specified by:
      getFieldCount in interface DataBoundComponent
      Returns:
      the number of fields
    • transferRecords

      public void transferRecords(Record[] records, Record targetRecord, Integer index, Canvas sourceWidget, TransferRecordsCallback callback)
      Description copied from interface: DataBoundComponent
      Transfer a list of Records from another component (does not have to be a databound component) into this component. This method is only applicable to list-type components, such as ListGrid or com.smartgwt.client.widgets.tile.TileGridTileGrid. Notably, it does not apply to TreeGrid; the equivalent for treeGrids is transferNodes.

      This method implements the automatic drag-copy and drag-move behaviors of components like ListGrid, and calling it is equivalent to completing a drag and drop of the dropRecords (the default record drop behavior is simply to call transferRecords(), passing in the dropped nodes)

      Note that this method is asynchronous - it may need to perform server turnarounds to prevent duplicates in the target component's data. If you wish to be notified when the transfer process has completed, you can either pass a non-null callback to this method or add a DropCompleteHandler to this component.

      See also transferSelectedData()

      Specified by:
      transferRecords in interface DataBoundComponent
      Parameters:
      records - Recordss to transfer to this component
      targetRecord - The target record (eg, of a drop interaction), for context
      index - Insert point relative to the target record for the transferred records
      sourceWidget - The databound or non-databound component from which the records are to be transferred.
      callback - optional TransferRecordsCallback to be fired when the transfer process has completed (pass null if your code does not need to be called back). The callback will be passed the list of records actually transferred to this component
    • setDragDataCustomizer

      public FacetChart setDragDataCustomizer(DragDataCustomizer customizer)
      During a drag-and-drop interaction, this method returns the set of records being dragged out of the component. In the default implementation, this is the list of currently selected records.

      This method is consulted by willAcceptDrop().

      Parameters:
      DragDataCustomizer - customizer
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getSort

      public SortSpecifier[] getSort()
      Description copied from interface: DataBoundComponent
      Returns the current SortSpecifiers for this component. Will return null if this component has never been sorted, or the underlying SmartClient widget does not exist.
      Specified by:
      getSort in interface DataBoundComponent
      Returns:
      current sort specifiers for this component (null if unsorted or no SC widget)
    • setSort

      public FacetChart setSort(SortSpecifier... sortSpecifiers)
      Description copied from interface: DataBoundComponent
      Sort the component on one or more fields.

      Pass in an array of SortSpecifiers to have the component's data sorted by the fields in each specifier.property and in the directions specified. The component can be sorted by any combination of fields, including fields specified in the fields array and unused fields from the underlying dataSource, if there is one.

      If setSort() is called on a component which doesn't yet have a SmartClient widget, the widget will be created. If autoFetchData is set and a DataSource has been set, this will result in data being fetched.

      Specified by:
      setSort in interface DataBoundComponent
      Parameters:
      sortSpecifiers - Array of SortSpecifier objects
    • setLogicalStructure

      public LogicalStructureObject setLogicalStructure(FacetChartLogicalStructure s)
      Setter implementing the LogicalStructure interface, which supports Eclipse's logical structure debugging facility.
    • getLogicalStructure

      public LogicalStructureObject getLogicalStructure()
      Getter implementing the LogicalStructure interface, which supports Eclipse's logical structure debugging facility.
      Specified by:
      getLogicalStructure in interface LogicalStructure
      Overrides:
      getLogicalStructure in class DrawPane