public class MetricSettings extends DataClass
additional value axes
of a FacetChart
. These properties behave identically to the same-named properties of
FacetChart. Two exceptions are the properties gradationLineProperties
and gradationZeroLineProperties
because
they are used to draw tick marks along an extra value axis instead of lines through the chart rectangle. Also the
default behavior of the dataColors
property is
different, in that the default is to use unused colors from, and in the order of, the main data colors array
.
The extra value axes that are
not positioned directly adjacent to the chart
rect.
of the FacetChart may additionally have an axis line to connect the gradation tick marks. Whether to draw this
line is controlled by the showAxisLine
property, and the properties of the line are specified using axisLineProperties
. The default is to draw the
axis lines whenever the chart rect. is drawn and to draw the line using the same properties as the lines of the chart
rect. (for example, lineColor and lineWidth).
The extra value axis charts may be single- or multi-facet
charts. If the underlying data
is multi-facet then the extra value axes may use the facet
whose values are labelled on the data axis or the facet used to create the legend (the first and second facets,
respectively). Both types of charts vary the first facet to get a data series to plot. Multi-facet charts also vary
the second facet, but single-facet charts keep the second facet fixed at a constant FacetValue
.
The exact facet value to use for the second facet is specified using
the fixedFacetValue
property.
factoryCreated, factoryProperties
Constructor and Description |
---|
MetricSettings() |
MetricSettings(com.google.gwt.core.client.JavaScriptObject jsObj) |
Modifier and Type | Method and Description |
---|---|
static void |
changeAutoChildDefaults(java.lang.String autoChildName,
Canvas defaults)
Changes the defaults for Canvas AutoChildren named
autoChildName . |
static void |
changeAutoChildDefaults(java.lang.String autoChildName,
FormItem defaults)
Changes the defaults for FormItem AutoChildren named
autoChildName . |
DrawLine |
getAxisLineProperties()
Properties for the axis line drawn if this extra value axis is not positioned directly adjacent to the chart rect.
|
java.lang.Double |
getAxisStartValue()
Same as
FacetChart.axisStartValue but affects
only one metric. |
ChartType |
getChartType()
See
ChartType for a list of known types - Column, Bar, Line, Pie, Doughnut, Area,
Radar, and Histogram charts are supported. |
java.lang.String |
getDataColor(int index)
|
java.lang.String |
getDataColor(int index,
java.util.Date facetValueId,
java.lang.String purpose)
|
java.lang.String |
getDataColor(int index,
java.lang.Double facetValueId,
java.lang.String purpose)
|
java.lang.String |
getDataColor(int index,
java.lang.Integer facetValueId,
java.lang.String purpose)
|
java.lang.String |
getDataColor(int index,
java.lang.String facetValueId,
java.lang.String purpose)
Get a color from the
dataColors Array. |
java.lang.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.
|
DrawLine |
getDataLineProperties()
Properties for lines that show data (as opposed to gradations or borders around the data area).
|
DrawItem |
getDataOutlineProperties()
Properties for lines that outline a data shape (in filled charts such as area or radar charts).
|
DrawItem |
getDataPointProperties()
Common properties to apply for all data points (see
showDataPoints ). |
int |
getDataPointSize()
Size in pixels for data points drawn for line, area, radar and other chart types.
|
DrawPath |
getDataShapeProperties()
Properties for data shapes (filled areas in area or radar charts).
|
int |
getDecimalPrecision()
The
FacetChart.decimalPrecision used to render
the numeric labels of this metric axis. |
java.lang.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.
|
java.lang.String |
getFixedFacetValue()
For a
single-facet chart of an extra value axis,
this property provides a constant facet value for the second facet. |
DrawLabel |
getGradationLabelProperties()
Properties for gradation labels
|
DrawLine |
getGradationLineProperties()
Properties for gradation lines
|
float[] |
getGradations()
Return an array of the gradation values used in the current chart.
|
DrawLine |
getGradationZeroLineProperties()
Properties for the gradation line drawn for zero (slightly thicker by default).
|
java.lang.String |
getLegendLabel()
For
single-facet charts embedded in a multi-facet
main chart, the legendLabel defines the text of the legend label for this chart. |
int |
getLogBase()
When
useLogGradations , base value for
logarithmic gradation lines. |
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 . |
java.lang.Boolean |
getLogScale()
Whether to use logarithmic scaling for values.
|
java.lang.String |
getMatchGradations()
When this property is set to the metric of another MetricSettings object, the extra value axis and chart corresponding
to these settings will use the same scale for the gradations as the extra value axis and chart of the other
MetricSettings object.
|
java.lang.Integer |
getMinDataSpreadPercent()
Same as
FacetChart.minDataSpreadPercent but
affects only one metric. |
java.lang.Boolean |
getMultiFacet()
Whether this extra value axis plots values while varying the facet values of just the first facet (single-facet) or both
first and second facets (multi-facet).
|
static MetricSettings |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj) |
java.lang.Boolean |
getProportional()
For multi-facet charts, render data values as a proportion of the sum of all data values that have the same label.
|
java.lang.String |
getProportionalAxisLabel()
Default title for the value axis label when the chart is in
proportional rendering mode . |
DrawOval |
getShadowProperties()
Properties for shadows.
|
java.lang.Boolean |
getShowAxis()
Whether to show the extra value axis.
|
java.lang.Boolean |
getShowAxisLine()
Whether to show an axis line for this extra value axis if it is not placed directly adjacent to the chart rect.
|
java.lang.Boolean |
getShowDataPoints()
For Line, Area, Radar, Scatter or Bubble charts, whether to show data points for each individual data value.
|
java.lang.Boolean |
getShowDataValues()
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?
|
java.lang.Boolean |
getShowShadows()
Whether to automatically show shadows for various charts.
|
java.lang.Boolean |
getShowValueAxisLabel()
Whether to show the
valueTitle (or, in the case
of proportional rendering mode , proportionalAxisLabel ) as a label on this
extra value axis. |
java.lang.Boolean |
getShowValueOnHover()
Shows the value of the nearest data value in a floating label whenever the mouse moves within the main chart area.
|
java.lang.Boolean |
getStacked()
If the
ChartType is "Column" then the metric settings may include a setting for FacetChart.stacked . |
java.lang.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.
|
DrawLabel |
getValueAxisLabelProperties()
Properties for labels of value axis.
|
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.
|
java.lang.String |
getValueTitle()
A label for the data values, such as "Sales in Thousands", typically used as the label for the value axis.
|
java.lang.Double |
getXAxisEndValue()
Same as
FacetChart.xAxisEndValue but affects only
one metric. |
float |
getXCoord(float value)
Deprecated.
|
java.lang.Double |
getXCoordAsDouble(double value)
Returns the X coordinate where the passed data value either was or would be drawn.
|
float |
getYCoord(float value)
Deprecated.
|
double |
getYCoordAsDouble(double value)
Returns the Y coordinate where the passed data value either was or would be drawn.
|
void |
setAxisLineProperties(DrawLine axisLineProperties)
Properties for the axis line drawn if this extra value axis is not positioned directly adjacent to the chart rect.
|
void |
setAxisStartValue(java.lang.Double axisStartValue)
Same as
FacetChart.axisStartValue but affects
only one metric. |
void |
setAxisValueFormatter(ValueFormatter formatter)
Formatter to apply to values displayed in the gradation labels.
|
void |
setChartType(ChartType chartType)
See
ChartType for a list of known types - Column, Bar, Line, Pie, Doughnut, Area,
Radar, and Histogram charts are supported. |
void |
setDataColorMapper(ColorMapper colorMapper)
Sets a customizer to redefine what colors are used when rendering the chart data.
|
void |
setDataColors(java.lang.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.
|
void |
setDataGradientMapper(GradientMapper gradientMapper)
Sets a customizer to redefine what gradients are used when rendering the chart data.
|
void |
setDataLineColorMapper(ColorMapper colorMapper)
Sets a customizer to redefine what colors are used when rendering lines for the chart
data.
|
void |
setDataLineProperties(DrawLine dataLineProperties)
Properties for lines that show data (as opposed to gradations or borders around the data area).
|
void |
setDataOutlineProperties(DrawItem dataOutlineProperties)
Properties for lines that outline a data shape (in filled charts such as area or radar charts).
|
void |
setDataPointProperties(DrawItem dataPointProperties)
Common properties to apply for all data points (see
showDataPoints ). |
void |
setDataPointSize(int dataPointSize)
Size in pixels for data points drawn for line, area, radar and other chart types.
|
void |
setDataShapeProperties(DrawPath dataShapeProperties)
Properties for data shapes (filled areas in area or radar charts).
|
void |
setDataValueFormatter(ValueFormatter formatter)
Formatter to apply to values displayed in the hover labels and other value labels
|
void |
setDecimalPrecision(int decimalPrecision)
The
FacetChart.decimalPrecision used to render
the numeric labels of this metric axis. |
void |
setFilled(java.lang.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.
|
void |
setFixedFacetValue(java.lang.Integer fixedFacetValue)
For a
single-facet chart of an extra value axis,
this property provides a constant facet value for the second facet. |
void |
setFixedFacetValue(java.lang.String fixedFacetValue)
For a
single-facet chart of an extra value axis,
this property provides a constant facet value for the second facet. |
void |
setGradationLabelProperties(DrawLabel gradationLabelProperties)
Properties for gradation labels
|
void |
setGradationLineProperties(DrawLine gradationLineProperties)
Properties for gradation lines
|
void |
setGradationZeroLineProperties(DrawLine gradationZeroLineProperties)
Properties for the gradation line drawn for zero (slightly thicker by default).
|
void |
setLegendLabel(java.lang.String legendLabel)
For
single-facet charts embedded in a multi-facet
main chart, the legendLabel defines the text of the legend label for this chart. |
void |
setLogBase(int logBase)
When
useLogGradations , base value for
logarithmic gradation lines. |
void |
setLogGradations(float... logGradations)
When
useLogGradations is set, gradation
lines to show in between powers,
expressed as a series of integer or float values between 1 and logBase . |
void |
setLogScale(java.lang.Boolean logScale)
Whether to use logarithmic scaling for values.
|
void |
setMatchGradations(java.lang.String matchGradations)
When this property is set to the metric of another MetricSettings object, the extra value axis and chart corresponding
to these settings will use the same scale for the gradations as the extra value axis and chart of the other
MetricSettings object.
|
void |
setMinDataSpreadPercent(java.lang.Integer minDataSpreadPercent)
Same as
FacetChart.minDataSpreadPercent but
affects only one metric. |
void |
setMultiFacet(java.lang.Boolean multiFacet)
Whether this extra value axis plots values while varying the facet values of just the first facet (single-facet) or both
first and second facets (multi-facet).
|
void |
setPointClickHandler(ChartPointClickHandler handler)
Apply a handler to fire when
showDataPoints is true,
and the user clicks on a point. |
void |
setPointHoverCustomizer(ChartPointHoverCustomizer hoverCustomizer)
Display custom HTML when
showDataPoints is true and the mouse hovers
over a point. |
void |
setProportional(java.lang.Boolean proportional)
For multi-facet charts, render data values as a proportion of the sum of all data values that have the same label.
|
void |
setProportionalAxisLabel(java.lang.String proportionalAxisLabel)
Default title for the value axis label when the chart is in
proportional rendering mode . |
void |
setShadowProperties(DrawOval shadowProperties)
Properties for shadows.
|
void |
setShowAxis(java.lang.Boolean showAxis)
Whether to show the extra value axis.
|
void |
setShowAxisLine(java.lang.Boolean showAxisLine)
Whether to show an axis line for this extra value axis if it is not placed directly adjacent to the chart rect.
|
void |
setShowDataPoints(java.lang.Boolean showDataPoints)
For Line, Area, Radar, Scatter or Bubble charts, whether to show data points for each individual data value.
|
void |
setShowDataValues(java.lang.Boolean showDataValues)
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?
|
void |
setShowShadows(java.lang.Boolean showShadows)
Whether to automatically show shadows for various charts.
|
void |
setShowValueAxisLabel(java.lang.Boolean showValueAxisLabel)
Whether to show the
valueTitle (or, in the case
of proportional rendering mode , proportionalAxisLabel ) as a label on this
extra value axis. |
void |
setShowValueOnHover(java.lang.Boolean showValueOnHover)
Shows the value of the nearest data value in a floating label whenever the mouse moves within the main chart area.
|
void |
setStacked(java.lang.Boolean stacked)
If the
ChartType is "Column" then the metric settings may include a setting for FacetChart.stacked . |
void |
setUseLogGradations(java.lang.Boolean useLogGradations)
Whether to use classic logarithmic gradations, where each order of magnitude is shown as a gradation as well as a few
intervening lines.
|
void |
setValueAxisLabelProperties(DrawLabel valueAxisLabelProperties)
Properties for labels of value axis.
|
void |
setValueLineProperties(DrawLine valueLineProperties)
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.
|
void |
setValueTitle(java.lang.String valueTitle)
A label for the data values, such as "Sales in Thousands", typically used as the label for the value axis.
|
void |
setXAxisEndValue(java.lang.Double xAxisEndValue)
Same as
FacetChart.xAxisEndValue but affects only
one metric. |
applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated
public MetricSettings()
public MetricSettings(com.google.gwt.core.client.JavaScriptObject jsObj)
public static MetricSettings getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public static void changeAutoChildDefaults(java.lang.String autoChildName, Canvas defaults)
autoChildName
.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
.AutoChildUsage
public static void changeAutoChildDefaults(java.lang.String autoChildName, FormItem defaults)
autoChildName
.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
.AutoChildUsage
public void setAxisLineProperties(DrawLine axisLineProperties)
lineCap
, lineColor
, lineOpacity
, linePattern
, and lineWidth
of the FacetChart's chart rect.
for each axis line.axisLineProperties
- New axisLineProperties value. Default value is nullSGWTProperties
public DrawLine getAxisLineProperties()
lineCap
, lineColor
, lineOpacity
, linePattern
, and lineWidth
of the FacetChart's chart rect.
for each axis line.public void setAxisStartValue(java.lang.Double axisStartValue)
FacetChart.axisStartValue
but affects
only one metric.axisStartValue
- New axisStartValue value. Default value is nullpublic java.lang.Double getAxisStartValue()
FacetChart.axisStartValue
but affects
only one metric.public void setChartType(ChartType chartType)
ChartType
for a list of known types - Column, Bar, Line, Pie, Doughnut, Area,
Radar, and Histogram charts are supported.
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.
chartType
- new chart type. Default value is nullpublic ChartType getChartType()
ChartType
for a list of known types - Column, Bar, Line, Pie, Doughnut, Area,
Radar, and Histogram charts are supported.public void setDataColors(java.lang.String... dataColors)
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
.
dataColors
- New set of data colors. Default value is see belowCSSColor
public java.lang.String[] getDataColors()
Colors must be in the format of a leading hash (#) plus 6 hexadecimal digits, for example, "#FFFFFF" is white, "#FF0000" is pure red.
CSSColor
public void setDataLineProperties(DrawLine dataLineProperties)
dataLineProperties
- New dataLineProperties value. Default value is nullSGWTProperties
public DrawLine getDataLineProperties()
public void setDataOutlineProperties(DrawItem dataOutlineProperties)
dataOutlineProperties
- New dataOutlineProperties value. Default value is nullSGWTProperties
public DrawItem getDataOutlineProperties()
public void setDataPointProperties(DrawItem dataPointProperties)
showDataPoints
).dataPointProperties
- New dataPointProperties value. Default value is nullSGWTProperties
public DrawItem getDataPointProperties()
showDataPoints
).public void setDataPointSize(int dataPointSize)
dataPointSize
- New dataPointSize value. Default value is 6public int getDataPointSize()
public void setDataShapeProperties(DrawPath dataShapeProperties)
dataShapeProperties
- New dataShapeProperties value. Default value is nullSGWTProperties
public DrawPath getDataShapeProperties()
public void setDecimalPrecision(int decimalPrecision)
FacetChart.decimalPrecision
used to render
the numeric labels of this metric axis.decimalPrecision
- New decimalPrecision value. Default value is 2public int getDecimalPrecision()
FacetChart.decimalPrecision
used to render
the numeric labels of this metric axis.public void setFilled(java.lang.Boolean filled)
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
.
filled
- new value. Default value is nullpublic java.lang.Boolean getFilled()
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.
public void setFixedFacetValue(java.lang.String fixedFacetValue)
single-facet
chart of an extra value axis,
this property provides a constant facet value for the second facet. By varying the value of the other facet in
multi-facet data, the chart obtains the series of values to plot. The default facet value is the first facet value of
the second facet.fixedFacetValue
- New fixedFacetValue value. Default value is nullpublic java.lang.String getFixedFacetValue()
single-facet
chart of an extra value axis,
this property provides a constant facet value for the second facet. By varying the value of the other facet in
multi-facet data, the chart obtains the series of values to plot. The default facet value is the first facet value of
the second facet.public void setFixedFacetValue(java.lang.Integer fixedFacetValue)
single-facet
chart of an extra value axis,
this property provides a constant facet value for the second facet. By varying the value of the other facet in
multi-facet data, the chart obtains the series of values to plot. The default facet value is the first facet value of
the second facet.fixedFacetValue
- New fixedFacetValue value. Default value is nullpublic void setGradationLabelProperties(DrawLabel gradationLabelProperties)
gradationLabelProperties
- New gradationLabelProperties value. Default value is nullSGWTProperties
public DrawLabel getGradationLabelProperties()
public void setGradationLineProperties(DrawLine gradationLineProperties)
gradationLineProperties
- New gradationLineProperties value. Default value is nullSGWTProperties
public DrawLine getGradationLineProperties()
public void setGradationZeroLineProperties(DrawLine gradationZeroLineProperties)
gradationZeroLineProperties
- New gradationZeroLineProperties value. Default value is nullSGWTProperties
public DrawLine getGradationZeroLineProperties()
public void setLegendLabel(java.lang.String legendLabel)
single-facet
charts embedded in a multi-facet
main chart, the legendLabel
defines the text of the legend label for this chart. The default text is the
title
of the metric facet value of this value axis
concatenated with the title
of the fixed facet value
in parentheses. Set the
legendLabel
to provide custom text for the legend label.legendLabel
- New legendLabel value. Default value is nullpublic java.lang.String getLegendLabel()
single-facet
charts embedded in a multi-facet
main chart, the legendLabel
defines the text of the legend label for this chart. The default text is the
title
of the metric facet value of this value axis
concatenated with the title
of the fixed facet value
in parentheses. Set the
legendLabel
to provide custom text for the legend label.public void setLogBase(int logBase)
useLogGradations
, base value for
logarithmic gradation lines. Gradation lines will be shown at every power of this value plus intervening values
specified by logGradations
.logBase
- New logBase value. Default value is 10public int getLogBase()
useLogGradations
, base value for
logarithmic gradation lines. Gradation lines will be shown at every power of this value plus intervening values
specified by logGradations
.public void setLogGradations(float... logGradations)
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 quartersOr base 2:
[ 1 ] [ 1, 1.5 ]
logGradations
- New logGradations value. Default value is [ 1,2,4,6,8 ]public float[] getLogGradations()
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 quartersOr base 2:
[ 1 ] [ 1, 1.5 ]
public void setLogScale(java.lang.Boolean logScale)
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).
logScale
- New logScale value. Default value is falsepublic java.lang.Boolean getLogScale()
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).
public void setMatchGradations(java.lang.String matchGradations)
matchGradations
can only be one of the metrics of the metric facet
whose values will be displayed by the chart.matchGradations
- New matchGradations value. Default value is nullFacetChart.setExtraAxisMetrics(java.lang.String...)
public java.lang.String getMatchGradations()
matchGradations
can only be one of the metrics of the metric facet
whose values will be displayed by the chart.FacetChart.getExtraAxisMetrics()
public void setMinDataSpreadPercent(java.lang.Integer minDataSpreadPercent)
FacetChart.minDataSpreadPercent
but
affects only one metric. Default of null means that the chart-wide setting facetChart.minDataSpreadPercent
will be used.minDataSpreadPercent
- New minDataSpreadPercent value. Default value is nullpublic java.lang.Integer getMinDataSpreadPercent()
FacetChart.minDataSpreadPercent
but
affects only one metric. Default of null means that the chart-wide setting facetChart.minDataSpreadPercent
will be used.public void setMultiFacet(java.lang.Boolean multiFacet)
multiFacet
- New multiFacet value. Default value is truepublic java.lang.Boolean getMultiFacet()
public void setProportional(java.lang.Boolean proportional)
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
.
proportional
- Whether the chart should now use proportional mode. Default value is nullpublic java.lang.Boolean getProportional()
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.
public void setProportionalAxisLabel(java.lang.String proportionalAxisLabel)
proportional rendering mode
. This title will be used
unless the legend facet
defines a proportionalTitle
.proportionalAxisLabel
- New proportionalAxisLabel value. Default value is "Percent"public java.lang.String getProportionalAxisLabel()
proportional rendering mode
. This title will be used
unless the legend facet
defines a proportionalTitle
.public void setShadowProperties(DrawOval shadowProperties)
shadowProperties
- New shadowProperties value. Default value is nullSGWTProperties
public DrawOval getShadowProperties()
public void setShowAxis(java.lang.Boolean showAxis)
showAxis
- New showAxis value. Default value is nullpublic java.lang.Boolean getShowAxis()
public void setShowAxisLine(java.lang.Boolean showAxisLine)
showChartRect
property of the FacetChart.showAxisLine
- New showAxisLine value. Default value is nullpublic java.lang.Boolean getShowAxisLine()
showChartRect
property of the FacetChart.public void setShowDataPoints(java.lang.Boolean showDataPoints)
If
shown, the pointClick()
and getPointHoverHTML()
APIs can be used to create
interactivity.
showDataPoints
- New showDataPoints value. Default value is falsepublic java.lang.Boolean getShowDataPoints()
If
shown, the pointClick()
and getPointHoverHTML()
APIs can be used to create
interactivity.
public void setShowDataValues(java.lang.Boolean showDataValues)
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.
showDataValues
- New showDataValues value. Default value is nullpublic java.lang.Boolean getShowDataValues()
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.
public void setShowShadows(java.lang.Boolean showShadows)
showShadows
- New showShadows value. Default value is truepublic java.lang.Boolean getShowShadows()
public void setShowValueAxisLabel(java.lang.Boolean showValueAxisLabel)
valueTitle
(or, in the case
of proportional rendering mode
, proportionalAxisLabel
) as a label on this
extra value axis.showValueAxisLabel
- New showValueAxisLabel value. Default value is nullpublic java.lang.Boolean getShowValueAxisLabel()
valueTitle
(or, in the case
of proportional rendering mode
, proportionalAxisLabel
) as a label on this
extra value axis.public void setShowValueOnHover(java.lang.Boolean showValueOnHover)
Calculates nearest value based on FacetChart.getNearestDrawnValue()
.
The data value
will be formatted using FacetChart.setDataValueFormatter()
. The label's appearance is controlled by FacetChart.hoverLabelProperties
.
showValueOnHover
- New showValueOnHover value. Default value is nullpublic java.lang.Boolean getShowValueOnHover()
Calculates nearest value based on FacetChart.getNearestDrawnValue()
.
The data value
will be formatted using FacetChart.setDataValueFormatter()
. The label's appearance is controlled by FacetChart.hoverLabelProperties
.
public void setStacked(java.lang.Boolean stacked)
ChartType
is "Column" then the metric settings may include a setting for FacetChart.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
.
stacked
- new value. Default value is nullpublic java.lang.Boolean getStacked()
ChartType
is "Column" then the metric settings may include a setting for FacetChart.stacked
. public void setUseLogGradations(java.lang.Boolean useLogGradations)
Default gradations can be overridden via logBase
and logGradations
.
useLogGradations
- New useLogGradations value. Default value is falsepublic java.lang.Boolean getUseLogGradations()
Default gradations can be overridden via logBase
and logGradations
.
public void setValueAxisLabelProperties(DrawLabel valueAxisLabelProperties)
valueAxisLabelProperties
- New valueAxisLabelProperties value. Default value is nullSGWTProperties
public DrawLabel getValueAxisLabelProperties()
public void setValueLineProperties(DrawLine valueLineProperties)
valueLineProperties
- New valueLineProperties value. Default value is nullSGWTProperties
public DrawLine getValueLineProperties()
public void setValueTitle(java.lang.String valueTitle)
valueTitle
- New valueTitle value. Default value is nullpublic java.lang.String getValueTitle()
public void setXAxisEndValue(java.lang.Double xAxisEndValue)
FacetChart.xAxisEndValue
but affects only
one metric.xAxisEndValue
- New xAxisEndValue value. Default value is nullpublic java.lang.Double getXAxisEndValue()
FacetChart.xAxisEndValue
but affects only
one metric.public float[] getGradations()
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.
public float getXCoord(float value)
GwtFloatVsDouble
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
.
value
- the value to be drawn.FacetValueMap
does not
identify a currently-drawn data cell.public java.lang.Double getXCoordAsDouble(double value)
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
.
value
- the value to be drawn.FacetValueMap
does not
identify a currently-drawn data cell.public float getYCoord(float value)
GwtFloatVsDouble
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.
value
- the value to be drawn.public double getYCoordAsDouble(double value)
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.
value
- the value to be drawn.public void setPointHoverCustomizer(ChartPointHoverCustomizer hoverCustomizer)
showDataPoints
is true and the mouse hovers
over a point.hoverCustomizer
- public void setPointClickHandler(ChartPointClickHandler handler)
showDataPoints
is true,
and the user clicks on a point.handler
- public void setAxisValueFormatter(ValueFormatter formatter)
formatter
- Formatter to apply to values displayed in the gradation labelspublic void setDataValueFormatter(ValueFormatter formatter)
formatter
- Formatter to apply to values displayed in the hover labels and other value labelspublic java.lang.String getDataColor(int index, java.lang.String facetValueId, java.lang.String purpose)
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()
.
index
- index of the visual element to be coloredfacetValueId
- id of the facet value to be coloredpurpose
- purpose for the requested color - such as "legend", "line", "area",
"points", etc.ColorMapper
,
setDataLineColorMapper(com.smartgwt.client.widgets.chart.ColorMapper)
,
setDataGradientMapper(com.smartgwt.client.widgets.chart.GradientMapper)
public java.lang.String getDataColor(int index, java.lang.Integer facetValueId, java.lang.String purpose)
public java.lang.String getDataColor(int index, java.lang.Double facetValueId, java.lang.String purpose)
public java.lang.String getDataColor(int index, java.util.Date facetValueId, java.lang.String purpose)
public java.lang.String getDataColor(int index)
public void setDataColorMapper(ColorMapper colorMapper)
colorMapper
- the customizer redefining what colors are used for chart datagetDataColor(int, java.lang.String, java.lang.String)
,
setDataLineColorMapper(com.smartgwt.client.widgets.chart.ColorMapper)
,
setDataGradientMapper(com.smartgwt.client.widgets.chart.GradientMapper)
public void setDataLineColorMapper(ColorMapper colorMapper)
getDataColor()
or the
ColorMapper
installed by
setDataColorMapper()
if one has been provided.colorMapper
- the customizer redefining what line colors are used for chart datagetDataColor(int, java.lang.String, java.lang.String)
,
setDataColorMapper(com.smartgwt.client.widgets.chart.ColorMapper)
,
setDataGradientMapper(com.smartgwt.client.widgets.chart.GradientMapper)
public void setDataGradientMapper(GradientMapper gradientMapper)
gradientMapper
- the customizer redefining what gradients are used for chart datagetDataColor(int, java.lang.String, java.lang.String)
,
setDataLineColorMapper(com.smartgwt.client.widgets.chart.ColorMapper)
,
setDataGradientMapper(com.smartgwt.client.widgets.chart.GradientMapper)