Class GraphItem

java.lang.Object
org.netxms.client.datacollection.GraphItem

public class GraphItem extends Object
This class represents single graph item (DCI)
  • Constructor Details

    • GraphItem

      public GraphItem()
      Create graph item object with default values
    • GraphItem

      public GraphItem(long nodeId, long dciId, String name, String description, String displayFormat, int lineChartType, int color)
      Constructor for ITEM type
      Parameters:
      nodeId - The node ID
      dciId - The dci ID
      name - The name
      description - The description
      displayFormat - The display format
      lineChartType - item line chart type (line or area)
      color - item color (-1 to use palette default)
    • GraphItem

      public GraphItem(String name, String description, String displayFormat)
      Constructor for ad-hoc ITEM type (without related server-side DCI)
      Parameters:
      name - The name
      description - The description
      displayFormat - The display format
    • GraphItem

      public GraphItem(DciValue dciValue, String displayFormat)
      Constructor for ITEM type from existing DCI value
      Parameters:
      dciValue - DCI value
      displayFormat - The display format
    • GraphItem

      public GraphItem(DciValue dciValue, String displayFormat, int lineChartType, int color)
      Constructor for ITEM type from existing DCI value and applied styling
      Parameters:
      dciValue - DCI value
      displayFormat - The display format
      lineChartType - item line chart type (line or area)
      color - item color (-1 to use palette default)
    • GraphItem

      public GraphItem(ChartDciConfig dciConfig)
      Constructor for ITEM type from chart DCI configuration
      Parameters:
      dciConfig - DCI configuration
    • GraphItem

      public GraphItem(long nodeId, long dciId, String name, String description, String instance, String dataColumn, String displayFormat)
      Constructor for TABLE type
      Parameters:
      nodeId - The node ID
      dciId - The dci ID
      name - The name
      description - The description
      instance - The instance
      dataColumn - The data column
      displayFormat - The display format
  • Method Details

    • getNodeId

      public long getNodeId()
      Returns:
      the nodeId
    • setNodeId

      public void setNodeId(long nodeId)
      Parameters:
      nodeId - the nodeId to set
    • getDciId

      public long getDciId()
      Returns:
      the dciId
    • setDciId

      public void setDciId(long dciId)
      Parameters:
      dciId - the dciId to set
    • getName

      public String getName()
      Returns:
      the name
    • setName

      public void setName(String name)
      Parameters:
      name - the name to set
    • getDescription

      public String getDescription()
      Returns:
      the description
    • setDescription

      public void setDescription(String description)
      Parameters:
      description - the description to set
    • getType

      public int getType()
      Returns:
      the type
    • setType

      public void setType(int type)
      Parameters:
      type - the type to set
    • getDataColumn

      public String getDataColumn()
      Returns:
      the dataColumn
    • setDataColumn

      public void setDataColumn(String dataColumn)
      Parameters:
      dataColumn - the dataColumn to set
    • getInstance

      public String getInstance()
      Returns:
      the instance
    • setInstance

      public void setInstance(String instance)
      Parameters:
      instance - the instance to set
    • getDisplayFormat

      public String getDisplayFormat()
      Returns:
      the displayFormat
    • setDisplayFormat

      public void setDisplayFormat(String displayFormat)
      Parameters:
      displayFormat - the displayFormat to set
    • getLineChartType

      public int getLineChartType()
      Returns:
      the displayType
    • setLineChartType

      public void setLineChartType(int lineChartType)
      Parameters:
      lineChartType - new line chart type
    • isArea

      public boolean isArea(boolean defaultIsArea)
      Check if display type set to "area".
      Parameters:
      defaultIsArea - true if chart's default line chart type is AREA
      Returns:
      true if display type set to "area".
    • getColor

      public int getColor()
      Returns:
      the color
    • setColor

      public void setColor(int color)
      Parameters:
      color - the color to set
    • getLineWidth

      public int getLineWidth()
      Returns:
      the lineWidth
    • setLineWidth

      public void setLineWidth(int lineWidth)
      Parameters:
      lineWidth - the lineWidth to set
    • isShowThresholds

      public boolean isShowThresholds()
      Returns:
      the showThresholds
    • setShowThresholds

      public void setShowThresholds(boolean showThresholds)
      Parameters:
      showThresholds - the showThresholds to set
    • isInverted

      public boolean isInverted()
      Returns:
      the inverted
    • setInverted

      public void setInverted(boolean inverted)
      Parameters:
      inverted - the inverted to set
    • getMeasurementUnit

      public MeasurementUnit getMeasurementUnit()
      Get configured measurement unit.
      Returns:
      measurement unit or null
    • setMeasurementUnit

      public void setMeasurementUnit(MeasurementUnit measurementUnit)
      Set measurement unit to use.
      Parameters:
      measurementUnit - new measurement unit
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also: