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 Summary
Modifier and TypeFieldDescriptionprotected boolean
protected boolean
protected boolean
protected boolean
protected boolean
static final int
static final int
static final int
protected int
protected int
protected boolean
static final int
protected double
protected double
protected boolean
static final int
static final int
static final int
static final int
protected int
protected double
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected Integer
protected Date
protected TimePeriod
protected Integer
protected Date
protected Integer
protected String
protected boolean
protected boolean
protected boolean
protected boolean
-
Constructor Summary
ConstructorDescriptionDefault constructorCopy constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add change listenerboolean
Check if labels should be placed inside chart.boolean
static ChartConfiguration
createFromXml
(String xml) Create chart settings object from XML documentCreate XML from configuration.void
Fire change notificationint
int
int
double
double
int
int
double
double
int
double
double
double
Get currently set rotation angleGet start time for time period.long
Get time range covered by graph in millisecondsGet end time for time period.getTitle()
boolean
isArea()
boolean
boolean
boolean
boolean
boolean
boolean
Check if grid is visible.boolean
boolean
boolean
Check if "modify Y base" flag is setboolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
Check if zoom is enabled on chart.void
Remove change listenervoid
setArea
(boolean area) void
setAutoRefresh
(boolean autoRefresh) void
setAutoScale
(boolean autoScale) void
setDoughnutRendering
(boolean doughnutRendering) void
setElementBordersVisible
(boolean elementBordersVisible) void
setExpectedTextWidth
(int expectedTextWidth) void
setExtendedLegend
(boolean extendedLegend) void
setFontName
(String fontName) void
setFontSize
(int fontSize) void
setGaugeColorMode
(int gaugeColorMode) void
setGridVisible
(boolean visible) Set grid visibility flag.void
setLabelsInside
(boolean labelsInside) Set if labels should be placed inside chart.void
setLabelsVisible
(boolean visible) void
setLeftRedZone
(double leftRedZone) void
setLeftYellowZone
(double leftYellowZone) void
setLegendPosition
(int legendPosition) void
setLegendVisible
(boolean visible) void
setLineWidth
(int lineWidth) void
setLogScale
(boolean logScale) void
setMaxYScaleValue
(double maxYScaleValue) void
setMinYScaleValue
(double minYScaleValue) void
setModifyYBase
(boolean modifyYBase) Set modify Y basevoid
setRefreshRate
(int refreshRate) void
setRightRedZone
(double rightRedZone) void
setRightYellowZone
(double rightYellowZone) void
setRotation
(double angle) Set rotation angle for chart types where it applicable (like pie chart)void
setShowHostNames
(boolean showHostNames) void
setShowTotal
(boolean showTotal) void
setStacked
(boolean stacked) void
setTimeFrom
(Date timeFrom) Set start time for time period.void
setTimePeriod
(TimePeriod timePeriod) Set time period for chart.void
Set end time for time period.void
void
setTitleVisible
(boolean visible) void
setTranslucent
(boolean translucent) void
setTransposed
(boolean transposed) void
setUseMultipliers
(boolean useMultipliers) void
setZoomEnabled
(boolean enabled) Enable/disable zoom on chart.
-
Field Details
-
MAX_GRAPH_ITEM_COUNT
public static final int MAX_GRAPH_ITEM_COUNT- See Also:
-
POSITION_LEFT
public static final int POSITION_LEFT- See Also:
-
POSITION_RIGHT
public static final int POSITION_RIGHT- See Also:
-
POSITION_TOP
public static final int POSITION_TOP- See Also:
-
POSITION_BOTTOM
public static final int POSITION_BOTTOM- See Also:
-
GAUGE_COLOR_MODE_ZONE
public static final int GAUGE_COLOR_MODE_ZONE- See Also:
-
GAUGE_COLOR_MODE_CUSTOM
public static final int GAUGE_COLOR_MODE_CUSTOM- See Also:
-
GAUGE_COLOR_MODE_THRESHOLD
public static final int GAUGE_COLOR_MODE_THRESHOLD- See Also:
-
title
-
legendPosition
protected int legendPosition -
showLegend
protected boolean showLegend -
extendedLegend
protected boolean extendedLegend -
showTitle
protected boolean showTitle -
showGrid
protected boolean showGrid -
showLabels
protected boolean showLabels -
showHostNames
protected boolean showHostNames -
autoRefresh
protected boolean autoRefresh -
logScale
protected boolean logScale -
stacked
protected boolean stacked -
transposed
protected boolean transposed -
translucent
protected boolean translucent -
doughnutRendering
protected boolean doughnutRendering -
showTotal
protected boolean showTotal -
area
protected boolean area -
lineWidth
protected int lineWidth -
autoScale
protected boolean autoScale -
minYScaleValue
protected double minYScaleValue -
maxYScaleValue
protected double maxYScaleValue -
refreshRate
protected int refreshRate -
timePeriod
-
timeUnit
-
timeRange
-
timeFrameType
-
timeFrom
-
timeTo
-
modifyYBase
protected boolean modifyYBase -
useMultipliers
protected boolean useMultipliers -
rotation
protected double rotation -
zoomEnabled
protected boolean zoomEnabled
-
-
Constructor Details
-
ChartConfiguration
public ChartConfiguration()Default constructor -
ChartConfiguration
Copy constructor- Parameters:
src
- source object
-
-
Method Details
-
createFromXml
Create chart settings object from XML document- Parameters:
xml
- XML document- Returns:
- deserialized object
- Throws:
Exception
- if the object cannot be fully deserialized
-
createXml
Create XML from configuration.- Returns:
- XML document
- Throws:
Exception
- if the schema for the object is not valid
-
getTimeRangeMillis
public 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
-
getLegendPosition
public int getLegendPosition()- Returns:
- the legendPosition
-
setLegendPosition
public void setLegendPosition(int legendPosition) - Parameters:
legendPosition
- the legendPosition to set
-
isLegendVisible
public boolean isLegendVisible()- Returns:
- the showLegend
-
setLegendVisible
public void setLegendVisible(boolean visible) - Parameters:
visible
- true to set legend visible
-
areLabelsVisible
public boolean areLabelsVisible()- Returns:
- true if labels are visible
-
setLabelsVisible
public void setLabelsVisible(boolean visible) - Parameters:
visible
- true to set labels visible
-
getRefreshRate
public int getRefreshRate()- Returns:
- the refreshRate
-
setRefreshRate
public void setRefreshRate(int refreshRate) - Parameters:
refreshRate
- the refreshRate to set
-
isTitleVisible
public boolean isTitleVisible()- Returns:
- true if title is visible
-
setTitleVisible
public void setTitleVisible(boolean visible) - Parameters:
visible
- true to set title visible
-
isShowHostNames
public boolean isShowHostNames()- Returns:
- the showHostNames
-
setShowHostNames
public void setShowHostNames(boolean showHostNames) - Parameters:
showHostNames
- the showHostNames to set
-
isAutoRefresh
public boolean isAutoRefresh()- Returns:
- the autoRefresh
-
setAutoRefresh
public void setAutoRefresh(boolean autoRefresh) - Parameters:
autoRefresh
- the autoRefresh to set
-
isLogScale
public boolean isLogScale()- Returns:
- the logScale
-
setLogScale
public void setLogScale(boolean logScale) - Parameters:
logScale
- the logScale to set
-
isGridVisible
public boolean isGridVisible()Check if grid is visible.- Returns:
- true if grid is visible
-
setGridVisible
public void setGridVisible(boolean visible) Set grid visibility flag.- Parameters:
visible
- true if grid should be visible
-
isStacked
public boolean isStacked()- Returns:
- the stacked
-
setStacked
public void setStacked(boolean stacked) - Parameters:
stacked
- the stacked to set
-
isTransposed
public boolean isTransposed()- Returns:
- the transposed
-
setTransposed
public void setTransposed(boolean transposed) - Parameters:
transposed
- the transposed to set
-
isTranslucent
public boolean isTranslucent()- Returns:
- the translucent
-
setTranslucent
public void setTranslucent(boolean translucent) - Parameters:
translucent
- the translucent to set
-
isDoughnutRendering
public boolean isDoughnutRendering()- Returns:
- the doughnutRendering
-
setDoughnutRendering
public void setDoughnutRendering(boolean doughnutRendering) - Parameters:
doughnutRendering
- the doughnutRendering to set
-
isShowTotal
public boolean isShowTotal()- Returns:
- the showTotal
-
setShowTotal
public void setShowTotal(boolean showTotal) - Parameters:
showTotal
- the showTotal to set
-
isExtendedLegend
public boolean isExtendedLegend()- Returns:
- the extendedLegend
-
setExtendedLegend
public void setExtendedLegend(boolean extendedLegend) - Parameters:
extendedLegend
- the extendedLegend to set
-
getLineWidth
public int getLineWidth()- Returns:
- the lineWidth
-
setLineWidth
public void setLineWidth(int lineWidth) - Parameters:
lineWidth
- the lineWidth to set
-
isAutoScale
public boolean isAutoScale()- Returns:
- true if auto scale is set
-
setAutoScale
public void setAutoScale(boolean autoScale) - Parameters:
autoScale
- Set auto scale
-
isArea
public boolean isArea()- Returns:
- the area
-
setArea
public void setArea(boolean area) - Parameters:
area
- the area to set
-
getMinYScaleValue
public double getMinYScaleValue()- Returns:
- Minimal Y scale
-
setMinYScaleValue
public void setMinYScaleValue(double minYScaleValue) - Parameters:
minYScaleValue
- The scale value to set
-
getMaxYScaleValue
public double getMaxYScaleValue()- Returns:
- Max Y scale
-
setMaxYScaleValue
public void setMaxYScaleValue(double maxYScaleValue) - Parameters:
maxYScaleValue
- max Y scale
-
getTimePeriod
- Returns:
- The time period
-
setTimePeriod
Set time period for chart.- Parameters:
timePeriod
- new time period
-
getTimeFrom
Get start time for time period.- Returns:
- start time for time period
-
setTimeFrom
Set start time for time period.- Parameters:
timeFrom
- new start time for time period
-
getTimeTo
Get end time for time period.- Returns:
- end time for time period
-
setTimeTo
Set end time for time period.- Parameters:
timeTo
- new end time for time period
-
addChangeListener
Add change listener- Parameters:
listener
- change listener
-
removeChangeListener
Remove change listener- Parameters:
listener
- change listener to remove
-
fireChangeNotification
public void fireChangeNotification()Fire change notification -
setModifyYBase
public void setModifyYBase(boolean modifyYBase) Set modify Y base- Parameters:
modifyYBase
- if true, use min DCI value as Y base
-
isModifyYBase
public boolean isModifyYBase()Check if "modify Y base" flag is set- Returns:
- true if "modify Y base" flag is set
-
isUseMultipliers
public boolean isUseMultipliers()- Returns:
- the useMultipliers
-
setUseMultipliers
public void setUseMultipliers(boolean useMultipliers) - Parameters:
useMultipliers
- the useMultipliers to set
-
isZoomEnabled
public boolean isZoomEnabled()Check if zoom is enabled on chart.- Returns:
- true if zoom is enabled
-
setZoomEnabled
public void setZoomEnabled(boolean enabled) Enable/disable zoom on chart.- Parameters:
enabled
- true to enable zoom
-
setRotation
public void setRotation(double angle) Set rotation angle for chart types where it applicable (like pie chart)- Parameters:
angle
- rotation angle
-
getRotation
public double getRotation()Get currently set rotation angle- Returns:
- currently set rotation angle
-
areLabelsInside
public boolean areLabelsInside()Check if labels should be placed inside chart.- Returns:
- true if labels should be placed inside chart
-
setLabelsInside
public void setLabelsInside(boolean labelsInside) Set if labels should be placed inside chart.- Parameters:
labelsInside
- true to put labels inside chart
-
getLeftYellowZone
public double getLeftYellowZone()- Returns:
- the leftYellowZone
-
setLeftYellowZone
public void setLeftYellowZone(double leftYellowZone) - Parameters:
leftYellowZone
- the leftYellowZone to set
-
getLeftRedZone
public double getLeftRedZone()- Returns:
- the leftRedZone
-
setLeftRedZone
public void setLeftRedZone(double leftRedZone) - Parameters:
leftRedZone
- the leftRedZone to set
-
getRightYellowZone
public double getRightYellowZone()- Returns:
- the rightYellowZone
-
setRightYellowZone
public void setRightYellowZone(double rightYellowZone) - Parameters:
rightYellowZone
- the rightYellowZone to set
-
getRightRedZone
public double getRightRedZone()- Returns:
- the rightRedZone
-
setRightRedZone
public void setRightRedZone(double rightRedZone) - Parameters:
rightRedZone
- the rightRedZone to set
-
isElementBordersVisible
public boolean isElementBordersVisible()- Returns:
- the elementBordersVisible
-
setElementBordersVisible
public void setElementBordersVisible(boolean elementBordersVisible) - Parameters:
elementBordersVisible
- the elementBordersVisible to set
-
getGaugeColorMode
public int getGaugeColorMode()- Returns:
- the gaugeColorMode
-
setGaugeColorMode
public void setGaugeColorMode(int gaugeColorMode) - Parameters:
gaugeColorMode
- the gaugeColorMode to set
-
getFontName
- Returns:
- the fontName
-
setFontName
- Parameters:
fontName
- the fontName to set
-
getFontSize
public int getFontSize()- Returns:
- the fontSize
-
setFontSize
public void setFontSize(int fontSize) - Parameters:
fontSize
- the fontSize to set
-
getExpectedTextWidth
public int getExpectedTextWidth()- Returns:
- the expectedTextWidth
-
setExpectedTextWidth
public void setExpectedTextWidth(int expectedTextWidth) - Parameters:
expectedTextWidth
- the expectedTextWidth to set
-