|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.extjs.gxt.ui.client.data.BaseModelData
com.extjs.gxt.ui.client.data.BaseModel
com.extjs.gxt.charts.client.model.ChartModel
public class ChartModel
This is the OFC chart model.
Use this model to configure chart title, axes, legends, labels, and draw-able elements in your chart. You add an chart type to the chart model, for example...ChartModel cm = new ChartModel("Sales by Region"); PieChart pie = new PieChart(); pie.addValues(10, 30, 40, 20); cm.addChartConfig(pie);
Chart.setChartModel(ChartModel)
,
Serialized FormField Summary |
---|
Fields inherited from class com.extjs.gxt.ui.client.data.BaseModel |
---|
changeEventSupport |
Fields inherited from class com.extjs.gxt.ui.client.data.BaseModelData |
---|
allowNestedValues, map |
Fields inherited from interface com.extjs.gxt.ui.client.data.ChangeEventSource |
---|
Add, Remove, Update |
Constructor Summary | |
---|---|
ChartModel()
Creates a new chart model instance. |
|
ChartModel(java.lang.String titleText)
Creates a new chart model instance with the given title. |
|
ChartModel(java.lang.String titleText,
java.lang.String style)
Creates a new chart model instance with the given title and style. |
Method Summary | |
---|---|
void |
addChartConfig(ChartConfig... config)
Adds a chart config to the list of configs. |
void |
addChartConfig(java.util.Collection<ChartConfig> collection)
Adds a collection of chart configs. |
java.lang.String |
getBackgroundColour()
Returns the current background colour |
java.util.List<ChartConfig> |
getChartConfigs()
Returns the chart configs. |
Legend |
getLegend()
Returns the chart legend. |
java.lang.Integer |
getNumDecimals()
Returns the number of decimals. |
RadarAxis |
getRadarAxis()
Returns the current radar axis. |
ScaleProvider |
getScaleProvider()
Returns the scale provider. |
ScaleProvider |
getScaleProviderRightAxis()
Returns the scale provider of the right axis. |
Text |
getTitle()
Returns the current title. |
ToolTip |
getTooltipStyle()
Returns the tooltip style. |
XAxis |
getXAxis()
Returns the x-axis. |
Text |
getXLegend()
Get the current x-legend Text |
YAxis |
getYAxis()
Returns the current y-axis (left side). |
YAxis |
getYAxisRight()
Return the current y-axis (right side). |
Text |
getYLegend()
Returns the y-legend. |
Text |
getYRightLegend()
Returns the right y-legend. |
java.lang.Boolean |
isDecimalSeparatorComma()
Returns true if a decimal separator comma is enabled. |
boolean |
isEnableEvents()
Returns true if click events are enabled. |
java.lang.Boolean |
isFixedNumDecimalsForced()
Returns true if fixed number of decimals is enabled. |
java.lang.Boolean |
isThousandSeparatorDisabled()
Returns true if the thousands separator is enabled. |
boolean |
removeChartConfig(ChartConfig chartConfig)
Removes a chart config from the list of configs. |
void |
setBackgroundColour(java.lang.String backgroudColor)
Sets the chart background colour in HTML hex format (#ffffff). |
void |
setChartConfigs(java.util.Collection<ChartConfig> collection)
Clears and then sets the list of chart configs. |
void |
setDecimalSeparatorComma(boolean useComma)
True to use a decimal separator comma. |
void |
setEnableEvents(boolean enableEvents)
True to globally enable click events (defaults to false). |
void |
setFixedNumDecimalsForced(boolean fixed)
True to force fixed number of decimals. |
void |
setLegend(Legend legend)
Sets the chart legend |
void |
setNumDecimals(java.lang.Integer numDecimals)
Sets the number of decimals. |
void |
setRadarAxis(RadarAxis radarAxis)
Sets the radar axis. |
void |
setScaleProvider(ScaleProvider scaleProvider)
Optionally, sets the scale provider used to manage the min, max, and interval of the y-axis. |
void |
setScaleProviderRightAxis(ScaleProvider scaleProviderRightAxis)
Optionally, sets the scale provider used to manage the min, max, and interval of the right y-axis. |
void |
setThousandSeparatorDisabled(boolean disabled)
Sets whether the thousand separator is disabled. |
void |
setTitle(Text title)
Sets the title. |
void |
setTooltipStyle(ToolTip tooltip)
Sets the tooltip style. |
void |
setXAxis(XAxis xAxis)
Sets the x-axis. |
void |
setXLegend(Text xLegend)
Sets the x-legend. |
void |
setYAxis(YAxis yAxis)
Sets the left y-axis. |
void |
setYAxisLabelStyle(java.lang.Integer size,
java.lang.String colour)
Sets the y-axis label style. |
void |
setYAxisRight(YAxis yAxis)
Sets the right y-axis. |
void |
setYAxisRightLabelStyle(java.lang.Integer size,
java.lang.String colour)
Sets the right y-axis label style. |
void |
setYLegend(Text yLegend)
Sets the y-legend. |
void |
setYRightLegend(Text yLegend)
Sets the right y-legend. |
void |
updateYScale()
|
Methods inherited from class com.extjs.gxt.ui.client.data.BaseModel |
---|
addChangeListener, addChangeListener, fireEvent, fireEvent, isSilent, notify, notifyPropertyChanged, remove, removeChangeListener, removeChangeListeners, set, setSilent |
Methods inherited from class com.extjs.gxt.ui.client.data.BaseModelData |
---|
get, get, getProperties, getPropertyNames, isAllowNestedValues, setAllowNestedValues, setProperties |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.extjs.gxt.ui.client.data.ModelData |
---|
get, getProperties, getPropertyNames |
Constructor Detail |
---|
public ChartModel()
public ChartModel(java.lang.String titleText)
titleText
- the chart titlepublic ChartModel(java.lang.String titleText, java.lang.String style)
titleText
- the chart titlestyle
- the chart style (ex. 'font-size: 14px; text-align: center')Method Detail |
---|
public void addChartConfig(ChartConfig... config)
config
- the chart configspublic void addChartConfig(java.util.Collection<ChartConfig> collection)
collection
- the collection of chart configspublic java.lang.String getBackgroundColour()
public java.util.List<ChartConfig> getChartConfigs()
public Legend getLegend()
public java.lang.Integer getNumDecimals()
public RadarAxis getRadarAxis()
public ScaleProvider getScaleProvider()
public ScaleProvider getScaleProviderRightAxis()
public Text getTitle()
public ToolTip getTooltipStyle()
public XAxis getXAxis()
public Text getXLegend()
public YAxis getYAxis()
public YAxis getYAxisRight()
public Text getYLegend()
public Text getYRightLegend()
public java.lang.Boolean isDecimalSeparatorComma()
public boolean isEnableEvents()
public java.lang.Boolean isFixedNumDecimalsForced()
public java.lang.Boolean isThousandSeparatorDisabled()
public boolean removeChartConfig(ChartConfig chartConfig)
chartConfig
- the chart config
public void setBackgroundColour(java.lang.String backgroudColor)
backgroudColor
- the background colorpublic void setChartConfigs(java.util.Collection<ChartConfig> collection)
collection
- the chart configspublic void setDecimalSeparatorComma(boolean useComma)
useComma
- true to enable the separator commapublic void setEnableEvents(boolean enableEvents)
ChartConfig.setEnableEvents(boolean)
can be used to enable click
events at the individual chart level.
enableEvents
- true to enable click eventpublic void setFixedNumDecimalsForced(boolean fixed)
fixed
- true to force fixed number of decimalspublic void setLegend(Legend legend)
legend
- the legendpublic void setNumDecimals(java.lang.Integer numDecimals)
numDecimals
- the number of decimalspublic void setRadarAxis(RadarAxis radarAxis)
radarAxis
- the radar axispublic void setScaleProvider(ScaleProvider scaleProvider)
scaleProvider
- the scale providerpublic void setScaleProviderRightAxis(ScaleProvider scaleProviderRightAxis)
scaleProviderRightAxis
- the scale providerpublic void setThousandSeparatorDisabled(boolean disabled)
disabled
- true for disabledpublic void setTitle(Text title)
title
- titlepublic void setTooltipStyle(ToolTip tooltip)
tooltip
- the new tooltippublic void setXAxis(XAxis xAxis)
xAxis
- the x-axispublic void setXLegend(Text xLegend)
xLegend
- the x-legendpublic void setYAxis(YAxis yAxis)
yAxis
- the y-axispublic void setYAxisLabelStyle(java.lang.Integer size, java.lang.String colour)
size
- the sizecolour
- the label colourpublic void setYAxisRight(YAxis yAxis)
yAxis
- the right y-axispublic void setYAxisRightLabelStyle(java.lang.Integer size, java.lang.String colour)
size
- the sizecolour
- the label colourpublic void setYLegend(Text yLegend)
yLegend
- the y-legendpublic void setYRightLegend(Text yLegend)
yLegend
- the right yLegendpublic void updateYScale()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |