|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.smartgwt.client.widgets.BaseWidget
com.smartgwt.client.widgets.Canvas
com.smartgwt.client.widgets.chart.FacetChart
public class FacetChart
HTML5-based charting engine, implementing most chartTypes of the Chart interface.
Can be used directly, or specified as chartConstructor or
chartConstructor.
To create a FacetChart, set facets to an Array of Facet
objects describing the
chart dimensions and valueProperty to value field
name. For example:
"Inlined facet" is another method to provide data to the chart.
// 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");
data is a single CellRecord or
Array of CellRecords where each record contains multiple data values. In this case, 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. For example:
Example with two facets:
// 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");
// 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");
In order to use this component, you must load the Drawing module (ISC_Drawing.js) before loading the Charts module (ISC_Charts.js).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
| Field Summary |
|---|
| Fields inherited from class com.smartgwt.client.widgets.BaseWidget |
|---|
config, configOnly, id, isElementSet, scClassName |
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
FacetChart()
|
|
FacetChart(JavaScriptObject jsObj)
|
|
| Method Summary | |
|---|---|
protected JavaScriptObject |
create()
|
Boolean |
getAutoRotateLabels()
Whether to automatically rotate labels if needed in order to make them legible and non-overlapping. |
int |
getBarMargin()
Distance between bars. |
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. |
ChartType |
getChartType()
See ChartType for a list of known types - Column, Bar, Line, Pie, Doughnut, Area, and
Radar charts are supported. |
float |
getClusterMarginRatio()
For clustered charts, ratio between margins between individual bars and margins between clusters. |
RecordList |
getDataAsRecordList()
|
String |
getDataColor(int index)
Get a color from the dataColors Array |
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. |
int |
getDataMargin()
For rectangular charts (bar, column, line), margin around the inside of the chartRect, so that data elements are not flush to edge. |
int |
getDataPointSize()
Size in pixels for data points drawn for line, area, radar and other chart types. |
int |
getDecimalPrecision()
Default precision used when formatting float numbers for axis labels |
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. |
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. |
int |
getLegendItemPadding()
Padding between each swatch and label pair. |
int |
getLegendMargin()
Space between the legend and the chart rect or axis labels (whatever the legend is adjacent to. |
int |
getLegendPadding()
Padding around the legend as a whole. |
int |
getLegendSwatchSize()
Size of individual color swatches in legend. |
int |
getLegendTextPadding()
Padding between color swatch and its label. |
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 0 and logBase.
|
Boolean |
getLogScale()
Whether to use logarithmic scaling for values. |
int |
getMaxBarThickness()
Bars will not be drawn over this thickness, instead, margins will be increased. |
int |
getMinBarThickness()
If bars would be smaller than this size, margins are reduced until bars overlap. |
static FacetChart |
getOrCreateRef(JavaScriptObject jsObj)
|
int |
getPieLabelAngleStart()
Angle where first label is placed in a Pie chart in stacked mode, in degrees. |
int |
getPieLabelLineExtent()
How far label lines stick out of the pie radius in a Pie chart in stacked mode. |
int |
getRadialLabelOffset()
Distance in pixels that radial labels are offset from the outside of the circle. |
Record[] |
getRecords()
|
Boolean |
getShowChartRect()
Whether to show a rectangular shape around the area of the chart where data is plotted. |
Boolean |
getShowDataPoints()
For line charts, whether to show data points for each individual data value. |
Boolean |
getShowDoughnut()
Whether to show a "doughnut hole" in the middle of pie charts. |
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. |
Boolean |
getShowRadarGradationLabels()
Whether to show gradation labels in radar charts. |
Boolean |
getShowShadows()
Whether to automatically show shadows for various charts. |
String |
getShowTitle()
Whether to show a title. |
Boolean |
getStacked()
Whether to use stacking for charts where this makes sense (column, area, pie, line and radar charts). |
String |
getStyleName()
Default styleName for the chart. |
String |
getTitle()
Title for the chart as a whole. |
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. |
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. |
String |
getValueProperty()
Property in each record that holds a data value. |
String |
getValueTitle()
A label for the data values, such as "Sales in Thousands", typically used as the label for the value axis. |
void |
setAutoRotateLabels(Boolean autoRotateLabels)
Whether to automatically rotate labels if needed in order to make them legible and non-overlapping. |
void |
setBarMargin(int barMargin)
Distance between bars. |
void |
setChartRectMargin(int chartRectMargin)
Margin around the main chart rect: between title and chart, between chart and axis labels, and chart rect and right edge of chart. |
void |
setChartType(ChartType chartType)
See ChartType for a list of known types - Column, Bar, Line, Pie, Doughnut, Area, and
Radar charts are supported. |
void |
setClusterMarginRatio(float clusterMarginRatio)
For clustered charts, ratio between margins between individual bars and margins between clusters. |
void |
setData(Record[] records)
Dataset for this chart. |
void |
setData(RecordList records)
|
void |
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. |
void |
setDataMargin(int dataMargin)
For rectangular charts (bar, column, line), margin around the inside of the chartRect, so that data elements are not flush to edge. |
void |
setDataPointSize(int dataPointSize)
Size in pixels for data points drawn for line, area, radar and other chart types. |
void |
setDecimalPrecision(int decimalPrecision)
Default precision used when formatting float numbers for axis labels |
static void |
setDefaultProperties(FacetChart facetChartProperties)
Class level method to set the default properties of this class. |
void |
setDoughnutRatio(float doughnutRatio)
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. |
void |
setFacets(Facet... facets)
Set the facets for this chart. |
void |
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. |
void |
setLegendItemPadding(int legendItemPadding)
Padding between each swatch and label pair. |
void |
setLegendMargin(int legendMargin)
Space between the legend and the chart rect or axis labels (whatever the legend is adjacent to. |
void |
setLegendPadding(int legendPadding)
Padding around the legend as a whole. |
void |
setLegendSwatchSize(int legendSwatchSize)
Size of individual color swatches in legend. |
void |
setLegendTextPadding(int legendTextPadding)
Padding between color swatch and its label. |
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 0 and logBase.
|
void |
setLogScale(Boolean logScale)
Whether to use logarithmic scaling for values. |
void |
setMaxBarThickness(int maxBarThickness)
Bars will not be drawn over this thickness, instead, margins will be increased. |
void |
setMinBarThickness(int minBarThickness)
If bars would be smaller than this size, margins are reduced until bars overlap. |
void |
setPieLabelAngleStart(int pieLabelAngleStart)
Angle where first label is placed in a Pie chart in stacked mode, in degrees. |
void |
setPieLabelLineExtent(int pieLabelLineExtent)
How far label lines stick out of the pie radius in a Pie chart in stacked mode. |
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 |
setRadialLabelOffset(int radialLabelOffset)
Distance in pixels that radial labels are offset from the outside of the circle. |
void |
setShowChartRect(Boolean showChartRect)
Whether to show a rectangular shape around the area of the chart where data is plotted. |
void |
setShowDataPoints(Boolean showDataPoints)
For line charts, whether to show data points for each individual data value. |
void |
setShowDoughnut(Boolean showDoughnut)
Whether to show a "doughnut hole" in the middle of pie charts. |
void |
setShowLegend(Boolean showLegend)
The legend is automatically shown for charts that need it (generally, multi-series charts) but can be forced off by setting showLegend to false. |
void |
setShowRadarGradationLabels(Boolean showRadarGradationLabels)
Whether to show gradation labels in radar charts. |
void |
setShowShadows(Boolean showShadows)
Whether to automatically show shadows for various charts. |
void |
setShowTitle(String showTitle)
Whether to show a title. |
void |
setStacked(Boolean stacked)
Whether to use stacking for charts where this makes sense (column, area, pie, line and radar charts). |
void |
setStyleName(String styleName)
Default styleName for the chart. |
void |
setTitle(String title)
Title for the chart as a whole. |
void |
setUseAutoGradients(Boolean useAutoGradients)
Causes the chart to use the colors specified in dataColors but specify chart-specific gradients based on the primary data color per chart type. |
void |
setUseLogGradations(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 |
setValueProperty(String valueProperty)
Property in each record that holds a data value. |
void |
setValueTitle(String valueTitle)
A label for the data values, such as "Sales in Thousands", typically used as the label for the value axis. |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
|---|
fireEvent |
| Constructor Detail |
|---|
public FacetChart()
public FacetChart(JavaScriptObject jsObj)
| Method Detail |
|---|
public static FacetChart getOrCreateRef(JavaScriptObject jsObj)
protected JavaScriptObject create()
create in class Canvas
public void setAutoRotateLabels(Boolean autoRotateLabels)
throws IllegalStateException
autoRotateLabels - autoRotateLabels Default value is true
IllegalStateException - this property cannot be changed after the component has been createdpublic Boolean getAutoRotateLabels()
public void setBarMargin(int barMargin)
throws IllegalStateException
minBarThickness.
barMargin - barMargin Default value is 4
IllegalStateException - this property cannot be changed after the component has been createdpublic int getBarMargin()
minBarThickness.
public void setChartRectMargin(int chartRectMargin)
throws IllegalStateException
chartRectMargin - chartRectMargin Default value is 5
IllegalStateException - this property cannot be changed after the component has been createdpublic int getChartRectMargin()
public void setChartType(ChartType chartType)
ChartType for a list of known types - Column, Bar, Line, Pie, Doughnut, Area, and
Radar 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.
chartType - new chart type. Default value is "Column"public ChartType getChartType()
ChartType for a list of known types - Column, Bar, Line, Pie, Doughnut, Area, and
Radar charts are supported.
public void setClusterMarginRatio(float clusterMarginRatio)
throws IllegalStateException
clusterMarginRatio - clusterMarginRatio Default value is 4
IllegalStateException - this property cannot be changed after the component has been createdpublic float getClusterMarginRatio()
public void setDataColors(String... dataColors)
throws IllegalStateException
Colors must be in the format of a leading hash (#) plus 6 hexadecimal digits, for example, "#FFFFFF" is white, "#FF0000" is pure red.
dataColors - dataColors Default value is see below
IllegalStateException - this property cannot be changed after the component has been createdpublic 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.
public void setDataMargin(int dataMargin)
throws IllegalStateException
chartRect, so that data elements are not flush to edge.
dataMargin - dataMargin Default value is 10
IllegalStateException - this property cannot be changed after the component has been createdpublic int getDataMargin()
chartRect, so that data elements are not flush to edge.
public void setDataPointSize(int dataPointSize)
throws IllegalStateException
dataPointSize - dataPointSize Default value is 6
IllegalStateException - this property cannot be changed after the component has been createdpublic int getDataPointSize()
public void setDecimalPrecision(int decimalPrecision)
throws IllegalStateException
decimalPrecision - decimalPrecision Default value is 2
IllegalStateException - this property cannot be changed after the component has been createdpublic int getDecimalPrecision()
public void setDoughnutRatio(float doughnutRatio)
throws IllegalStateException
showDoughnut),
ratio of the size of the doughnut hole to the size of the overall pie chart, as a number between 0 to 1.
doughnutRatio - doughnutRatio Default value is true
IllegalStateException - this property cannot be changed after the component has been createdpublic float getDoughnutRatio()
showDoughnut),
ratio of the size of the doughnut hole to the size of the overall pie chart, as a number between 0 to 1.
public void setFilled(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:
Nethod to change filled. Use null to apply a default value for the current chartType.
filled - new value. Default value is nullpublic 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 setLegendItemPadding(int legendItemPadding)
throws IllegalStateException
legendItemPadding - legendItemPadding Default value is 5
IllegalStateException - this property cannot be changed after the component has been createdpublic int getLegendItemPadding()
public void setLegendMargin(int legendMargin)
throws IllegalStateException
legendMargin - legendMargin Default value is 10
IllegalStateException - this property cannot be changed after the component has been createdpublic int getLegendMargin()
public void setLegendPadding(int legendPadding)
throws IllegalStateException
legendPadding - legendPadding Default value is 5
IllegalStateException - this property cannot be changed after the component has been createdpublic int getLegendPadding()
public void setLegendSwatchSize(int legendSwatchSize)
throws IllegalStateException
legendSwatchSize - legendSwatchSize Default value is 16
IllegalStateException - this property cannot be changed after the component has been createdpublic int getLegendSwatchSize()
public void setLegendTextPadding(int legendTextPadding)
throws IllegalStateException
legendTextPadding - legendTextPadding Default value is 5
IllegalStateException - this property cannot be changed after the component has been createdpublic int getLegendTextPadding()
public void setLogBase(int logBase)
throws IllegalStateException
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 - logBase Default value is 10
IllegalStateException - this property cannot be changed after the component has been createdpublic 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 setLogScale(Boolean logScale)
throws IllegalStateException
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 - logScale Default value is false
IllegalStateException - this property cannot be changed after the component has been createdpublic 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 setMaxBarThickness(int maxBarThickness)
throws IllegalStateException
maxBarThickness - maxBarThickness Default value is 150
IllegalStateException - this property cannot be changed after the component has been createdpublic int getMaxBarThickness()
public void setMinBarThickness(int minBarThickness)
throws IllegalStateException
minBarThickness - minBarThickness Default value is 4
IllegalStateException - this property cannot be changed after the component has been createdpublic int getMinBarThickness()
public void setPieLabelAngleStart(int pieLabelAngleStart)
throws IllegalStateException
pieLabelAngleStart - pieLabelAngleStart Default value is 20
IllegalStateException - this property cannot be changed after the component has been createdpublic int getPieLabelAngleStart()
public void setPieLabelLineExtent(int pieLabelLineExtent)
throws IllegalStateException
pieLabelLineExtent - pieLabelLineExtent Default value is 7
IllegalStateException - this property cannot be changed after the component has been createdpublic int getPieLabelLineExtent()
public void setRadialLabelOffset(int radialLabelOffset)
throws IllegalStateException
radialLabelOffset - radialLabelOffset Default value is 5
IllegalStateException - this property cannot be changed after the component has been createdpublic int getRadialLabelOffset()
public void setShowChartRect(Boolean showChartRect)
throws IllegalStateException
showChartRect - showChartRect Default value is false
IllegalStateException - this property cannot be changed after the component has been createdpublic Boolean getShowChartRect()
public void setShowDataPoints(Boolean showDataPoints)
throws IllegalStateException
If shown, the FacetChart.pointClick and FacetChart.getPointHoverHTML APIs can be used to create
interactivity.
showDataPoints - showDataPoints Default value is false
IllegalStateException - this property cannot be changed after the component has been createdpublic Boolean getShowDataPoints()
If shown, the FacetChart.pointClick and FacetChart.getPointHoverHTML APIs can be used to create
interactivity.
public void setShowDoughnut(Boolean showDoughnut)
throws IllegalStateException
showDoughnut.
showDoughnut - showDoughnut Default value is null
IllegalStateException - this property cannot be changed after the component has been createdpublic Boolean getShowDoughnut()
showDoughnut.
public void setShowLegend(Boolean showLegend)
throws IllegalStateException
showLegend - showLegend Default value is null
IllegalStateException - this property cannot be changed after the component has been createdpublic Boolean getShowLegend()
public void setShowRadarGradationLabels(Boolean showRadarGradationLabels)
throws IllegalStateException
showRadarGradationLabels - showRadarGradationLabels Default value is true
IllegalStateException - this property cannot be changed after the component has been createdpublic Boolean getShowRadarGradationLabels()
public void setShowShadows(Boolean showShadows)
throws IllegalStateException
showShadows - showShadows Default value is false
IllegalStateException - this property cannot be changed after the component has been createdpublic Boolean getShowShadows()
public void setShowTitle(String showTitle)
showTitle - showTitle Default value is truepublic String getShowTitle()
public void setStacked(Boolean stacked)
stacked. Use null to apply a default value for the current chartType.
stacked - new value. Default value is nullpublic Boolean getStacked()
public void setStyleName(String styleName)
setStyleName in class CanvasstyleName - styleName Default value is "scChart"Appearance overview and related methods,
CSS styles Examplepublic String getStyleName()
getStyleName in class CanvasAppearance overview and related methods,
CSS styles Examplepublic void setTitle(String title)
setTitle in class Canvastitle - title Default value is nullpublic String getTitle()
getTitle in class Canvas
public void setUseAutoGradients(Boolean useAutoGradients)
throws IllegalStateException
dataColors but specify chart-specific gradients based on the primary data color per chart type.
useAutoGradients - useAutoGradients Default value is true
IllegalStateException - this property cannot be changed after the component has been createdpublic Boolean getUseAutoGradients()
dataColors but specify chart-specific gradients based on the primary data color per chart type.
public void setUseLogGradations(Boolean useLogGradations)
throws IllegalStateException
Default gradations can be overridden via logBase and
logGradations.
useLogGradations - useLogGradations Default value is false
IllegalStateException - this property cannot be changed after the component has been createdpublic Boolean getUseLogGradations()
Default gradations can be overridden via logBase and
logGradations.
public void setValueProperty(String valueProperty)
throws IllegalStateException
Not used if there is an inline facet, see data.
valueProperty - valueProperty Default value is "_value"
IllegalStateException - this property cannot be changed after the component has been createdpublic String getValueProperty()
Not used if there is an inline facet, see data.
public void setValueTitle(String valueTitle)
throws IllegalStateException
valueTitle - valueTitle Default value is null
IllegalStateException - this property cannot be changed after the component has been createdpublic String getValueTitle()
public String getDataColor(int index)
dataColors Array Override to provide a dynamic color generation scheme.
index - index of the visual element to be colored
public static void setDefaultProperties(FacetChart facetChartProperties)
Note: This method is intended for setting default attributes only and will effect 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.
facetChartProperties - properties that should be used as new defaults when instances of this class are createdpublic void setData(Record[] records)
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 whose value is a facetValueId from that facet.
For example, with
a facet with id "regions" and facetValues "west", "north" and "east", and
with valueProperty with it's default value
"_value", the
data property
could be:
isc.Chart.create({
facets:[{ id:"regions"
}],
data : [
{regions:"west", _value:4},
{regions:"north", _value:2},
{regions:"east", _value:5}
]
})
If there were a second facet with id "product" and
facetValues "cars" and "trucks", a Chart
with a complete set of values would be:
isc.Chart.create({
facets:[{ id:"regions" }, { id:"product" }],
data : [
{product:"cars", regions:"west", _value:4},
{product:"cars", regions:"north", _value:2},
{product:"cars", regions:"east", _value:5},
{product:"trucks", regions:"west", _value:1},
{product:"trucks", regions:"north", _value:9},
{product:"trucks", regions:"east", _value:3}
]
})
This 2 facet (or "2 dimensional") dataset, if rendered as a bar chart, would use stacked or
clustered bars and a legend.
data - data Default value is nullpublic void setData(RecordList records)
public Record[] getRecords()
public RecordList getDataAsRecordList()
public void setFacets(Facet... facets)
com.smartgwt.client.widgets.cube.CubeGrid#setFacets,CubetGrid facets except that:
facets - 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 setLogGradations(Float... logGradations)
throws IllegalStateException
useLogGradations is set, gradation lines
to show in between powers,
expressed as a series of integer or float values between 0 and logBase.
Some other common possibilities (for base 10):
[ 1, 2, 4, 8 ]
[ 5 ]
[ 2.5, 5, 7.5 ]
Or base 2:
[ 0.5, 1, 1.5 ]
[ 1 ]
logGradations - logGradations Default value is [ 1,2,4,6,8 ]
IllegalStateException - this property cannot be changed after the component has been createdpublic Float[] getLogGradations()
useLogGradations is set, gradation lines
to show in between powers,
expressed as a series of integer or float values between 0 and logBase.
Some other common possibilities (for base 10):
[ 1, 2, 4, 8 ]
[ 5 ]
[ 2.5, 5, 7.5 ]
Or base 2:
[ 0.5, 1, 1.5 ]
[ 1 ]
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||