Package org.netxms.client.datacollection
Class ChartConfiguration
java.lang.Object
org.netxms.client.datacollection.ChartConfiguration
- Direct Known Subclasses:
- GraphDefinition
Base class for all chart widget configs
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanstatic final intstatic final intstatic final intprotected intprotected intprotected booleanstatic final intprotected doubleprotected doubleprotected booleanstatic final intstatic final intstatic final intstatic final intprotected intprotected doubleprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected Integerprotected Dateprotected TimePeriodprotected Integerprotected Dateprotected Integerprotected Stringprotected booleanprotected booleanprotected booleanprotected boolean
- 
Constructor SummaryConstructorsConstructorDescriptionDefault constructorCopy constructor
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdd change listenerbooleanCheck if labels should be placed inside chart.booleanstatic ChartConfigurationcreateFromXml(String xml) Create chart settings object from XML documentCreate XML from configuration.voidFire change notificationintintintdoubledoubleintintdoubledoubleintdoubledoubledoubleGet currently set rotation angleGet start time for time period.longGet time range covered by graph in millisecondsGet end time for time period.getTitle()Get Y axis label.booleanisArea()booleanbooleanbooleanbooleanbooleanbooleanCheck if grid is visible.booleanbooleanbooleanCheck if "modify Y base" flag is setbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanCheck if zoom is enabled on chart.voidRemove change listenervoidsetArea(boolean area) voidsetAutoRefresh(boolean autoRefresh) voidsetAutoScale(boolean autoScale) voidsetDoughnutRendering(boolean doughnutRendering) voidsetElementBordersVisible(boolean elementBordersVisible) voidsetExpectedTextWidth(int expectedTextWidth) voidsetExtendedLegend(boolean extendedLegend) voidsetFontName(String fontName) voidsetFontSize(int fontSize) voidsetGaugeColorMode(int gaugeColorMode) voidsetGridVisible(boolean visible) Set grid visibility flag.voidsetLabelsInside(boolean labelsInside) Set if labels should be placed inside chart.voidsetLabelsVisible(boolean visible) voidsetLeftRedZone(double leftRedZone) voidsetLeftYellowZone(double leftYellowZone) voidsetLegendPosition(int legendPosition) voidsetLegendVisible(boolean visible) voidsetLineWidth(int lineWidth) voidsetLogScale(boolean logScale) voidsetMaxYScaleValue(double maxYScaleValue) voidsetMinYScaleValue(double minYScaleValue) voidsetModifyYBase(boolean modifyYBase) Set modify Y basevoidsetRefreshRate(int refreshRate) voidsetRightRedZone(double rightRedZone) voidsetRightYellowZone(double rightYellowZone) voidsetRotation(double angle) Set rotation angle for chart types where it applicable (like pie chart)voidsetShowHostNames(boolean showHostNames) voidsetShowTotal(boolean showTotal) voidsetStacked(boolean stacked) voidsetTimeFrom(Date timeFrom) Set start time for time period.voidsetTimePeriod(TimePeriod timePeriod) Set time period for chart.voidSet end time for time period.voidvoidsetTitleVisible(boolean visible) voidsetTranslucent(boolean translucent) voidsetTransposed(boolean transposed) voidsetUseMultipliers(boolean useMultipliers) voidsetYAxisLabel(String yAxisLabel) Set Y axis label (empty string or null to hide).voidsetZoomEnabled(boolean enabled) Enable/disable zoom on chart.
- 
Field Details- 
MAX_GRAPH_ITEM_COUNTpublic static final int MAX_GRAPH_ITEM_COUNT- See Also:
 
- 
POSITION_LEFTpublic static final int POSITION_LEFT- See Also:
 
- 
POSITION_RIGHTpublic static final int POSITION_RIGHT- See Also:
 
- 
POSITION_TOPpublic static final int POSITION_TOP- See Also:
 
- 
POSITION_BOTTOMpublic static final int POSITION_BOTTOM- See Also:
 
- 
GAUGE_COLOR_MODE_ZONEpublic static final int GAUGE_COLOR_MODE_ZONE- See Also:
 
- 
GAUGE_COLOR_MODE_CUSTOMpublic static final int GAUGE_COLOR_MODE_CUSTOM- See Also:
 
- 
GAUGE_COLOR_MODE_THRESHOLDpublic static final int GAUGE_COLOR_MODE_THRESHOLD- See Also:
 
- 
title
- 
legendPositionprotected int legendPosition
- 
showLegendprotected boolean showLegend
- 
extendedLegendprotected boolean extendedLegend
- 
showTitleprotected boolean showTitle
- 
showGridprotected boolean showGrid
- 
showLabelsprotected boolean showLabels
- 
showHostNamesprotected boolean showHostNames
- 
autoRefreshprotected boolean autoRefresh
- 
logScaleprotected boolean logScale
- 
stackedprotected boolean stacked
- 
transposedprotected boolean transposed
- 
translucentprotected boolean translucent
- 
doughnutRenderingprotected boolean doughnutRendering
- 
showTotalprotected boolean showTotal
- 
areaprotected boolean area
- 
lineWidthprotected int lineWidth
- 
autoScaleprotected boolean autoScale
- 
minYScaleValueprotected double minYScaleValue
- 
maxYScaleValueprotected double maxYScaleValue
- 
refreshRateprotected int refreshRate
- 
timePeriod
- 
timeUnit
- 
timeRange
- 
timeFrameType
- 
timeFrom
- 
timeTo
- 
modifyYBaseprotected boolean modifyYBase
- 
useMultipliersprotected boolean useMultipliers
- 
rotationprotected double rotation
- 
zoomEnabledprotected boolean zoomEnabled
 
- 
- 
Constructor Details- 
ChartConfigurationpublic ChartConfiguration()Default constructor
- 
ChartConfigurationCopy constructor- Parameters:
- src- source object
 
 
- 
- 
Method Details- 
createFromXmlCreate chart settings object from XML document- Parameters:
- xml- XML document
- Returns:
- deserialized object
- Throws:
- Exception- if the object cannot be fully deserialized
 
- 
createXmlCreate XML from configuration.- Returns:
- XML document
- Throws:
- Exception- if the schema for the object is not valid
 
- 
getTimeRangeMillispublic long getTimeRangeMillis()Get time range covered by graph in milliseconds- Returns:
- The time range
 
- 
getTitle- Returns:
- the title
 
- 
setTitle- Parameters:
- title- the title to set
 
- 
getYAxisLabelGet Y axis label.- Returns:
- Y axis label
 
- 
setYAxisLabelSet Y axis label (empty string or null to hide).- Parameters:
- yAxisLabel- new Y axis label
 
- 
getLegendPositionpublic int getLegendPosition()- Returns:
- the legendPosition
 
- 
setLegendPositionpublic void setLegendPosition(int legendPosition) - Parameters:
- legendPosition- the legendPosition to set
 
- 
isLegendVisiblepublic boolean isLegendVisible()- Returns:
- the showLegend
 
- 
setLegendVisiblepublic void setLegendVisible(boolean visible) - Parameters:
- visible- true to set legend visible
 
- 
areLabelsVisiblepublic boolean areLabelsVisible()- Returns:
- true if labels are visible
 
- 
setLabelsVisiblepublic void setLabelsVisible(boolean visible) - Parameters:
- visible- true to set labels visible
 
- 
getRefreshRatepublic int getRefreshRate()- Returns:
- the refreshRate
 
- 
setRefreshRatepublic void setRefreshRate(int refreshRate) - Parameters:
- refreshRate- the refreshRate to set
 
- 
isTitleVisiblepublic boolean isTitleVisible()- Returns:
- true if title is visible
 
- 
setTitleVisiblepublic void setTitleVisible(boolean visible) - Parameters:
- visible- true to set title visible
 
- 
isShowHostNamespublic boolean isShowHostNames()- Returns:
- the showHostNames
 
- 
setShowHostNamespublic void setShowHostNames(boolean showHostNames) - Parameters:
- showHostNames- the showHostNames to set
 
- 
isAutoRefreshpublic boolean isAutoRefresh()- Returns:
- the autoRefresh
 
- 
setAutoRefreshpublic void setAutoRefresh(boolean autoRefresh) - Parameters:
- autoRefresh- the autoRefresh to set
 
- 
isLogScalepublic boolean isLogScale()- Returns:
- the logScale
 
- 
setLogScalepublic void setLogScale(boolean logScale) - Parameters:
- logScale- the logScale to set
 
- 
isGridVisiblepublic boolean isGridVisible()Check if grid is visible.- Returns:
- true if grid is visible
 
- 
setGridVisiblepublic void setGridVisible(boolean visible) Set grid visibility flag.- Parameters:
- visible- true if grid should be visible
 
- 
isStackedpublic boolean isStacked()- Returns:
- the stacked
 
- 
setStackedpublic void setStacked(boolean stacked) - Parameters:
- stacked- the stacked to set
 
- 
isTransposedpublic boolean isTransposed()- Returns:
- the transposed
 
- 
setTransposedpublic void setTransposed(boolean transposed) - Parameters:
- transposed- the transposed to set
 
- 
isTranslucentpublic boolean isTranslucent()- Returns:
- the translucent
 
- 
setTranslucentpublic void setTranslucent(boolean translucent) - Parameters:
- translucent- the translucent to set
 
- 
isDoughnutRenderingpublic boolean isDoughnutRendering()- Returns:
- the doughnutRendering
 
- 
setDoughnutRenderingpublic void setDoughnutRendering(boolean doughnutRendering) - Parameters:
- doughnutRendering- the doughnutRendering to set
 
- 
isShowTotalpublic boolean isShowTotal()- Returns:
- the showTotal
 
- 
setShowTotalpublic void setShowTotal(boolean showTotal) - Parameters:
- showTotal- the showTotal to set
 
- 
isExtendedLegendpublic boolean isExtendedLegend()- Returns:
- the extendedLegend
 
- 
setExtendedLegendpublic void setExtendedLegend(boolean extendedLegend) - Parameters:
- extendedLegend- the extendedLegend to set
 
- 
getLineWidthpublic int getLineWidth()- Returns:
- the lineWidth
 
- 
setLineWidthpublic void setLineWidth(int lineWidth) - Parameters:
- lineWidth- the lineWidth to set
 
- 
isAutoScalepublic boolean isAutoScale()- Returns:
- true if auto scale is set
 
- 
setAutoScalepublic void setAutoScale(boolean autoScale) - Parameters:
- autoScale- Set auto scale
 
- 
isAreapublic boolean isArea()- Returns:
- the area
 
- 
setAreapublic void setArea(boolean area) - Parameters:
- area- the area to set
 
- 
getMinYScaleValuepublic double getMinYScaleValue()- Returns:
- Minimal Y scale
 
- 
setMinYScaleValuepublic void setMinYScaleValue(double minYScaleValue) - Parameters:
- minYScaleValue- The scale value to set
 
- 
getMaxYScaleValuepublic double getMaxYScaleValue()- Returns:
- Max Y scale
 
- 
setMaxYScaleValuepublic void setMaxYScaleValue(double maxYScaleValue) - Parameters:
- maxYScaleValue- max Y scale
 
- 
getTimePeriod- Returns:
- The time period
 
- 
setTimePeriodSet time period for chart.- Parameters:
- timePeriod- new time period
 
- 
getTimeFromGet start time for time period.- Returns:
- start time for time period
 
- 
setTimeFromSet start time for time period.- Parameters:
- timeFrom- new start time for time period
 
- 
getTimeToGet end time for time period.- Returns:
- end time for time period
 
- 
setTimeToSet end time for time period.- Parameters:
- timeTo- new end time for time period
 
- 
addChangeListenerAdd change listener- Parameters:
- listener- change listener
 
- 
removeChangeListenerRemove change listener- Parameters:
- listener- change listener to remove
 
- 
fireChangeNotificationpublic void fireChangeNotification()Fire change notification
- 
setModifyYBasepublic void setModifyYBase(boolean modifyYBase) Set modify Y base- Parameters:
- modifyYBase- if true, use min DCI value as Y base
 
- 
isModifyYBasepublic boolean isModifyYBase()Check if "modify Y base" flag is set- Returns:
- true if "modify Y base" flag is set
 
- 
isUseMultiplierspublic boolean isUseMultipliers()- Returns:
- the useMultipliers
 
- 
setUseMultiplierspublic void setUseMultipliers(boolean useMultipliers) - Parameters:
- useMultipliers- the useMultipliers to set
 
- 
isZoomEnabledpublic boolean isZoomEnabled()Check if zoom is enabled on chart.- Returns:
- true if zoom is enabled
 
- 
setZoomEnabledpublic void setZoomEnabled(boolean enabled) Enable/disable zoom on chart.- Parameters:
- enabled- true to enable zoom
 
- 
setRotationpublic void setRotation(double angle) Set rotation angle for chart types where it applicable (like pie chart)- Parameters:
- angle- rotation angle
 
- 
getRotationpublic double getRotation()Get currently set rotation angle- Returns:
- currently set rotation angle
 
- 
areLabelsInsidepublic boolean areLabelsInside()Check if labels should be placed inside chart.- Returns:
- true if labels should be placed inside chart
 
- 
setLabelsInsidepublic void setLabelsInside(boolean labelsInside) Set if labels should be placed inside chart.- Parameters:
- labelsInside- true to put labels inside chart
 
- 
getLeftYellowZonepublic double getLeftYellowZone()- Returns:
- the leftYellowZone
 
- 
setLeftYellowZonepublic void setLeftYellowZone(double leftYellowZone) - Parameters:
- leftYellowZone- the leftYellowZone to set
 
- 
getLeftRedZonepublic double getLeftRedZone()- Returns:
- the leftRedZone
 
- 
setLeftRedZonepublic void setLeftRedZone(double leftRedZone) - Parameters:
- leftRedZone- the leftRedZone to set
 
- 
getRightYellowZonepublic double getRightYellowZone()- Returns:
- the rightYellowZone
 
- 
setRightYellowZonepublic void setRightYellowZone(double rightYellowZone) - Parameters:
- rightYellowZone- the rightYellowZone to set
 
- 
getRightRedZonepublic double getRightRedZone()- Returns:
- the rightRedZone
 
- 
setRightRedZonepublic void setRightRedZone(double rightRedZone) - Parameters:
- rightRedZone- the rightRedZone to set
 
- 
isElementBordersVisiblepublic boolean isElementBordersVisible()- Returns:
- the elementBordersVisible
 
- 
setElementBordersVisiblepublic void setElementBordersVisible(boolean elementBordersVisible) - Parameters:
- elementBordersVisible- the elementBordersVisible to set
 
- 
getGaugeColorModepublic int getGaugeColorMode()- Returns:
- the gaugeColorMode
 
- 
setGaugeColorModepublic void setGaugeColorMode(int gaugeColorMode) - Parameters:
- gaugeColorMode- the gaugeColorMode to set
 
- 
getFontName- Returns:
- the fontName
 
- 
setFontName- Parameters:
- fontName- the fontName to set
 
- 
getFontSizepublic int getFontSize()- Returns:
- the fontSize
 
- 
setFontSizepublic void setFontSize(int fontSize) - Parameters:
- fontSize- the fontSize to set
 
- 
getExpectedTextWidthpublic int getExpectedTextWidth()- Returns:
- the expectedTextWidth
 
- 
setExpectedTextWidthpublic void setExpectedTextWidth(int expectedTextWidth) - Parameters:
- expectedTextWidth- the expectedTextWidth to set
 
 
-