Class ChartConfiguration

java.lang.Object
org.netxms.client.datacollection.ChartConfiguration
Direct Known Subclasses:
GraphDefinition

public class ChartConfiguration extends Object
Base class for all chart widget configs
  • 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

      protected String 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

      protected TimePeriod timePeriod
    • timeUnit

      protected Integer timeUnit
    • timeRange

      protected Integer timeRange
    • timeFrameType

      protected Integer timeFrameType
    • timeFrom

      protected Date timeFrom
    • timeTo

      protected Date 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

      public ChartConfiguration(ChartConfiguration src)
      Copy constructor
      Parameters:
      src - source object
  • Method Details

    • createFromXml

      public static ChartConfiguration createFromXml(String xml) throws Exception
      Create chart settings object from XML document
      Parameters:
      xml - XML document
      Returns:
      deserialized object
      Throws:
      Exception - if the object cannot be fully deserialized
    • createXml

      public String createXml() throws Exception
      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

      public String getTitle()
      Returns:
      the title
    • setTitle

      public void setTitle(String title)
      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

      public TimePeriod getTimePeriod()
      Returns:
      The time period
    • setTimePeriod

      public void setTimePeriod(TimePeriod timePeriod)
      Set time period for chart.
      Parameters:
      timePeriod - new time period
    • getTimeFrom

      public Date getTimeFrom()
      Get start time for time period.
      Returns:
      start time for time period
    • setTimeFrom

      public void setTimeFrom(Date timeFrom)
      Set start time for time period.
      Parameters:
      timeFrom - new start time for time period
    • getTimeTo

      public Date getTimeTo()
      Get end time for time period.
      Returns:
      end time for time period
    • setTimeTo

      public void setTimeTo(Date timeTo)
      Set end time for time period.
      Parameters:
      timeTo - new end time for time period
    • addChangeListener

      public void addChangeListener(ChartConfigurationChangeListener listener)
      Add change listener
      Parameters:
      listener - change listener
    • removeChangeListener

      public void removeChangeListener(ChartConfigurationChangeListener listener)
      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

      public String getFontName()
      Returns:
      the fontName
    • setFontName

      public void setFontName(String fontName)
      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