Class AbstractGraph<T extends AbstractGraph>

java.lang.Object
io.jmix.charts.model.AbstractChartObject
io.jmix.charts.model.graph.AbstractGraph<T>
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Graph, StockGraph

public class AbstractGraph<T extends AbstractGraph> extends AbstractChartObject
Defines the visualization of the data in following types: line, column, step line, smoothed line, olhc and candlestick.
See documentation for properties of AmGraph JS Object.
http://docs.amcharts.com/3/javascriptcharts/AmGraph
See Also:
  • Constructor Details

    • AbstractGraph

      public AbstractGraph()
  • Method Details

    • getAnimationPlayed

      public Boolean getAnimationPlayed()
      Returns:
      true if animation played is enabled
    • setAnimationPlayed

      @StudioProperty(defaultValue="false") public T setAnimationPlayed(Boolean animationPlayed)
      If you set animationPlayed to true before chart is drawn, the animation of this graph won't be played. If not set the default value is false.
      Parameters:
      animationPlayed - animation played option
      Returns:
      graph
    • getTitle

      public String getTitle()
      Returns:
      graph title
    • setTitle

      @StudioProperty public T setTitle(String title)
      Sets graph title
      Parameters:
      title - graph title string
      Returns:
      graph
    • getType

      public GraphType getType()
      Returns:
      graph type
    • setType

      @StudioProperty(type=ENUMERATION, defaultValue="LINE") public T setType(GraphType type)
      Sets type of the graph. Possible values are: "line", "column", "step", "smoothedLine", "candlestick", "ohlc". XY and Radar charts can only display "line" type graphs. If not set the default value is LINE.
      Parameters:
      type - graph type
      Returns:
      graph
    • getValueField

      public String getValueField()
      Returns:
      value field
    • setValueField

      @StudioProperty(type=PROPERTY_PATH_REF) public T setValueField(String valueField)
      Sets name of the value field in your data provider.
      Parameters:
      valueField - value field string
      Returns:
      graph
    • getXField

      public String getXField()
      Returns:
      name of the X field
    • setXField

      @StudioProperty(type=PROPERTY_PATH_REF) public T setXField(String xField)
      Sets name of the X field in your data provider. XY chart only.
      Parameters:
      xField - X field string
      Returns:
      graph
    • getYField

      public String getYField()
      Returns:
      name of the Y field
    • setYField

      @StudioProperty(type=PROPERTY_PATH_REF) public T setYField(String yField)
      Sets name of the Y field in your data provider. XY chart only.
      Parameters:
      yField - name of the Y field
      Returns:
      graph
    • getAlphaField

      public String getAlphaField()
      Returns:
      alpha field
    • setAlphaField

      @StudioProperty(type=PROPERTY_PATH_REF) public T setAlphaField(String alphaField)
      Sets name of the alpha field from your data provider.
      Parameters:
      alphaField - alpha field string
      Returns:
      graph
    • getBalloonColor

      public Color getBalloonColor()
      Returns:
      value balloon color
    • setBalloonColor

      @StudioProperty(type=OPTIONS) public T setBalloonColor(Color balloonColor)
      Sets value balloon color. Will use graph or data item color if not set.
      Parameters:
      balloonColor - value balloon color
      Returns:
      graph
    • getBalloonText

      public String getBalloonText()
      Returns:
      balloon text
    • setBalloonText

      @StudioProperty(defaultValue="[[value]]") public T setBalloonText(String balloonText)
      Sets balloon text. You can use tags like [[value]], [[description]], [[percents]], [[open]], [[category]] or any other field name from your data provider. HTML tags can also be used. If not set the default value is "[[value]]".
      Parameters:
      balloonText - balloon text
      Returns:
      graph
    • getBehindColumns

      public Boolean getBehindColumns()
      Returns:
      true if the line graph is placed behind column graphs
    • setBehindColumns

      @StudioProperty(defaultValue="false") public T setBehindColumns(Boolean behindColumns)
      Set behindColumns to true if the line graph should be placed behind column graphs. If not set the default value is false;
      Parameters:
      behindColumns - behind columns option
      Returns:
      graph
    • getBullet

      public BulletType getBullet()
      Returns:
      bullet type
    • setBullet

      @StudioProperty(type=ENUMERATION, defaultValue="NONE") public T setBullet(BulletType bullet)
      Sets type of the bullets. If not set the default value is NONE.
      Parameters:
      bullet - bullet type
      Returns:
      graph
    • getBulletAlpha

      public Double getBulletAlpha()
      Returns:
      opacity of bullets
    • setBulletAlpha

      @StudioProperty(defaultValue="1") @Max(1L) @Min(0L) public T setBulletAlpha(Double bulletAlpha)
      Sets opacity of bullets. Value range is 0 - 1. If not set the default value is 1.
      Parameters:
      bulletAlpha - opacity of bullets
      Returns:
      graph
    • getBulletBorderAlpha

      public Double getBulletBorderAlpha()
      Returns:
      bullet border opacity
    • setBulletBorderAlpha

      @StudioProperty(defaultValue="0") @Max(1L) @Min(0L) public T setBulletBorderAlpha(Double bulletBorderAlpha)
      Sets bullet border opacity. If not set the default value is 0.
      Parameters:
      bulletBorderAlpha - bullet border opacity
      Returns:
      graph
    • getBulletBorderColor

      public Color getBulletBorderColor()
      Returns:
      bullet border color
    • setBulletBorderColor

      @StudioProperty(type=OPTIONS) public T setBulletBorderColor(Color bulletBorderColor)
      Sets bullet border color. Will use lineColor if not set.
      Parameters:
      bulletBorderColor - bullet border color
      Returns:
      graph
    • getBulletBorderThickness

      public Integer getBulletBorderThickness()
      Returns:
      bullet border thickness
    • setBulletBorderThickness

      @StudioProperty(defaultValue="2") public T setBulletBorderThickness(Integer bulletBorderThickness)
      Sets bullet border thickness. If not set the default value is 2.
      Parameters:
      bulletBorderThickness - bullet border thickness
      Returns:
      graph
    • getBulletColor

      public Color getBulletColor()
      Returns:
      bullet color
    • setBulletColor

      @StudioProperty(type=OPTIONS) public T setBulletColor(Color bulletColor)
      Sets bullet color. Will use lineColor if not set.
      Parameters:
      bulletColor - bullet color
      Returns:
      graph
    • getBulletField

      public String getBulletField()
      Returns:
      bullet field
    • setBulletField

      @StudioProperty(type=PROPERTY_PATH_REF) public T setBulletField(String bulletField)
      Sets name of the bullet field from your data provider.
      Parameters:
      bulletField - bullet field string
      Returns:
      graph
    • getBulletOffset

      public Integer getBulletOffset()
      Returns:
      distance from the actual data point to the bullet
    • setBulletOffset

      @StudioProperty(defaultValue="0") public T setBulletOffset(Integer bulletOffset)
      Sets bullet offset. Distance from the actual data point to the bullet. Can be used to place custom bullets above the columns. If not set the default value is 0.
      Parameters:
      bulletOffset - bullet offset
      Returns:
      graph
    • getBulletSize

      public Integer getBulletSize()
      Returns:
      bullet size
    • setBulletSize

      @StudioProperty(defaultValue="8") public T setBulletSize(Integer bulletSize)
      Sets bullet size. If not set the default value is 8.
      Parameters:
      bulletSize - bullet size
      Returns:
      graph
    • getBulletSizeField

      public String getBulletSizeField()
      Returns:
      bullet size field
    • setBulletSizeField

      @StudioProperty(type=PROPERTY_PATH_REF) public T setBulletSizeField(String bulletSizeField)
      Sets name of the bullet size field from your data provider.
      Parameters:
      bulletSizeField - bullet size field string
      Returns:
      graph
    • getCloseField

      public String getCloseField()
      Returns:
      close field
    • setCloseField

      @StudioProperty(type=PROPERTY_PATH_REF) public T setCloseField(String closeField)
      Sets name of the close field (used by candlesticks and ohlc) from your data provider.
      Parameters:
      closeField - close field string
      Returns:
      graph
    • getClustered

      public Boolean getClustered()
      Returns:
      true if clustered is enabled
    • setClustered

      @StudioProperty(defaultValue="true") public T setClustered(Boolean clustered)
      Set clustered to false if you want to place this graph's columns in front of other columns. If you set to true, the columns will be clustered next to each other. Note, clustering works only for graphs of type "column". If not set the default value is true.
      Parameters:
      clustered - clustered option
      Returns:
      graph
    • getColor

      public Color getColor()
      Returns:
      color of value labels
    • setColor

      @StudioProperty(type=OPTIONS) public T setColor(Color color)
      Sets color of value labels. Will use chart's color if not set.
      Parameters:
      color - color of value labels
      Returns:
      graph
    • getColorField

      public String getColorField()
      Returns:
      color field
    • setColorField

      @StudioProperty(type=PROPERTY_PATH_REF) public T setColorField(String colorField)
      Sets name of the color field in your data provider.
      Parameters:
      colorField - color field string
      Returns:
      graph
    • getColumnWidth

      public Double getColumnWidth()
      Returns:
      column relative width
    • setColumnWidth

      @StudioProperty @Max(1L) @Min(0L) public T setColumnWidth(Double columnWidth)
      Sets column width for each graph individually. Value range is 0 - 1 (we set relative width, not pixel width here).
      Parameters:
      columnWidth - column relative width
      Returns:
      graph
    • getConnect

      public Boolean getConnect()
      Returns:
      true if connect is enabled
    • setConnect

      @StudioProperty(defaultValue="true") public T setConnect(Boolean connect)
      Specifies whether to connect data points if data is missing. This feature does not work with XY chart. If not set the default value is true.
      Parameters:
      connect - connect option
      Returns:
      graph
    • getCornerRadiusTop

      public Integer getCornerRadiusTop()
      Returns:
      corner radius of column
    • setCornerRadiusTop

      @StudioProperty(defaultValue="0") public T setCornerRadiusTop(Integer cornerRadiusTop)
      Sets corner radius of column. It can be set both, in pixels or in percents. The chart's depth and angle styles must be set to 0. The default value is 0. Note, cornerRadiusTop will be applied for all corners of the column. If not set the default value is 0.
      Parameters:
      cornerRadiusTop - corner radius
      Returns:
      graph
    • getCursorBulletAlpha

      public Double getCursorBulletAlpha()
      Returns:
      opacity of each graphs bullet
    • setCursorBulletAlpha

      @StudioProperty(defaultValue="1") @Max(1L) @Min(0L) public T setCursorBulletAlpha(Double cursorBulletAlpha)
      Sets opacity of each graphs bullet. If bulletsEnabled of Cursor is true, a bullet on each graph follows the cursor. In case you want to disable these bullets for a certain graph, set opacity to 0. If not set the default value is 1.
      Parameters:
      cursorBulletAlpha - opacity of each graphs bullet
      Returns:
      graph
    • getCustomBullet

      public String getCustomBullet()
      Returns:
      path to image of custom bullet
    • setCustomBullet

      @StudioProperty public T setCustomBullet(String customBullet)
      Sets path to the image of custom bullet.
      Parameters:
      customBullet - path to image of custom bullet
      Returns:
      graph
    • getCustomBulletField

      public String getCustomBulletField()
      Returns:
      custom bullet field
    • setCustomBulletField

      @StudioProperty(type=PROPERTY_PATH_REF) public T setCustomBulletField(String customBulletField)
      Sets name of the custom bullet field in your data provider.
      Parameters:
      customBulletField - custom bullet field string
      Returns:
      graph
    • getCustomMarker

      public String getCustomMarker()
      Returns:
      path to the image for legend marker
    • setCustomMarker

      @StudioProperty public T setCustomMarker(String customMarker)
      Sets path to the image for legend marker.
      Parameters:
      customMarker - path to the image
      Returns:
      graph
    • getDashLength

      public Integer getDashLength()
      Returns:
      dash length
    • setDashLength

      @StudioProperty(defaultValue="0") public T setDashLength(Integer dashLength)
      Sets dash length. If you set it to a value greater than 0, the graph line (or columns border) will be dashed. If not set the default value is 0.
      Parameters:
      dashLength - dash length
      Returns:
      graph
    • getDashLengthField

      public String getDashLengthField()
      Returns:
      dash length field
    • setDashLengthField

      @StudioProperty(type=PROPERTY_PATH_REF) public T setDashLengthField(String dashLengthField)
      Sets name of the dash length field in your data provider. dashLengthField adds a possibility to change graphs line from solid to dashed on any data point. You can also make columns border dashed using this setting. Note, this won't work with smoothedLine graph.
      Parameters:
      dashLengthField - dash length field
      Returns:
      graph
    • getDescriptionField

      public String getDescriptionField()
      Returns:
      description field
    • setDescriptionField

      @StudioProperty(type=PROPERTY_PATH_REF) public T setDescriptionField(String descriptionField)
      Sets name of the description field in your dataProvider.
      Parameters:
      descriptionField - description field string
      Returns:
      graph
    • getErrorField

      public String getErrorField()
      Returns:
      error field
    • setErrorField

      @StudioProperty(type=PROPERTY_PATH_REF) public T setErrorField(String errorField)
      Sets name of error value field in your data provider.
      Parameters:
      errorField - error field string
      Returns:
      graph
    • getFillAlphas

      public Double getFillAlphas()
      Returns:
      opacity of fill
    • setFillAlphas

      @StudioProperty @Max(1L) @Min(0L) public T setFillAlphas(Double fillAlphas)
      Sets opacity of fill.
      Parameters:
      fillAlphas - opacity of fill
      Returns:
      graph
    • getFillColors

      public List<Color> getFillColors()
      Returns:
      list of fill colors
    • setFillColors

      public T setFillColors(List<Color> fillColors)
      Sets list of fill colors. Will use lineColor if not set. Set more than one color to generate the gradient.
      Parameters:
      fillColors - list of fill colors
      Returns:
      graph
    • getFillColorsField

      public String getFillColorsField()
      Returns:
      name of the fill colors field
    • setFillColorsField

      @StudioProperty(type=PROPERTY_PATH_REF) public T setFillColorsField(String fillColorsField)
      Sets name of the fill colors field in your data provider. fillColorsField adds a possibility to change line graphs fill color on any data point to create highlighted sections of the graph. Works only with SerialChartModelImpl.
      Parameters:
      fillColorsField - name of the fill colors field
      Returns:
      graph
    • getFontSize

      public Integer getFontSize()
      Returns:
      font size of value labels text
    • setFontSize

      @StudioProperty public T setFontSize(Integer fontSize)
      Sets size of value labels text. Will use chart's fontSize if not set.
      Parameters:
      fontSize - font size
      Returns:
      graph
    • getForceGap

      public Boolean getForceGap()
      Returns:
      true if forceGap is enabled
    • setForceGap

      @StudioProperty(defaultValue="false") public T setForceGap(Boolean forceGap)
      Set forceGap to true if you want the graph should always break the line if the distance in time between two adjacent data points is bigger than "gapPeriod * minPeriod", even if connect property is set to true. If not set the default value is false.
      Parameters:
      forceGap - force gap
      Returns:
      graph
    • getGradientOrientation

      public GradientOrientation getGradientOrientation()
      Returns:
      gradient orientation
    • setGradientOrientation

      @StudioProperty(type=ENUMERATION, defaultValue="VERTICAL") public T setGradientOrientation(GradientOrientation gradientOrientation)
      Sets orientation of the gradient fills (only for "column" graph type). Possible values are "vertical" and "horizontal". If not set the default value is VERTICAL.
      Parameters:
      gradientOrientation - gradient orientation
      Returns:
      graph
    • getHidden

      public Boolean getHidden()
      Returns:
      true if graph is hidden
    • setHidden

      @StudioProperty(defaultValue="false") public T setHidden(Boolean hidden)
      Set hidden to true if the graph should be hidden. If not set the default value is false.
      Parameters:
      hidden - hidden option
      Returns:
      graph
    • getHideBulletsCount

      public Integer getHideBulletsCount()
      Returns:
      hide bullets count
    • setHideBulletsCount

      @StudioProperty(defaultValue="0") public T setHideBulletsCount(Integer hideBulletsCount)
      Sets hide bullets count. If there are more data points than hideBulletsCount, the bullets will not be shown. 0 means the bullets will always be visible. If not set the default value is 0.
      Parameters:
      hideBulletsCount - hide bullets count
      Returns:
      graph
    • getHighField

      public String getHighField()
      Returns:
      high field
    • setHighField

      @StudioProperty(type=PROPERTY_PATH_REF) public T setHighField(String highField)
      Sets name of the high field (used by candlesticks and ohlc) in your data provider.
      Parameters:
      highField - high field string
      Returns:
      graph
    • getId

      public String getId()
      Returns:
      id of the graph
    • setId

      @StudioProperty public T setId(String id)
      Sets unique id of a graph. It is not required to set one, unless you want to use this graph for as your scrollbar's graph and need to indicate which graph should be used.
      Parameters:
      id - id of the graph
      Returns:
      graph
    • getIncludeInMinMax

      public Boolean getIncludeInMinMax()
      Returns:
      true if includeInMinMax is enabled
    • setIncludeInMinMax

      @StudioProperty(defaultValue="true") public T setIncludeInMinMax(Boolean includeInMinMax)
      Set includeInMinMax to true if this graph should be included when calculating minimum and maximum value of the axis. If not set the default value is true.
      Parameters:
      includeInMinMax - include in min max option
      Returns:
      graph
    • getLabelColorField

      public String getLabelColorField()
      Returns:
      label color field
    • setLabelColorField

      @StudioProperty(type=PROPERTY_PATH_REF) public T setLabelColorField(String labelColorField)
      Sets name of label color field in your data provider.
      Parameters:
      labelColorField - label color field string
      Returns:
      graph
    • getLabelPosition

      public ValueLabelPosition getLabelPosition()
      Returns:
      value label position
    • setLabelPosition

      @StudioProperty(type=ENUMERATION, defaultValue="TOP") public T setLabelPosition(ValueLabelPosition labelPosition)
      Sets the position of value label. Possible values are: "bottom", "top", "right", "left", "inside", "middle". Sometimes position is changed by the chart, depending on a graph type, rotation, etc. If not set the default value is TOP.
      Parameters:
      labelPosition - value label position
      Returns:
      graph
    • getLabelText

      public String getLabelText()
      Returns:
      value label text
    • setLabelText

      @StudioProperty public T setLabelText(String labelText)
      Sets value label text. You can use tags like [[value]], [[description]], [[percents]], [[open", [[category".
      Parameters:
      labelText - value label text
      Returns:
      graph
    • getLegendAlpha

      public Double getLegendAlpha()
      Returns:
      legend marker opacity
    • setLegendAlpha

      @StudioProperty(defaultValue="1") @Max(1L) @Min(0L) public T setLegendAlpha(Double legendAlpha)
      Sets legend marker opacity. Will use lineAlpha if not set. Value range is 0 - 1. If not set the default value is 1.
      Parameters:
      legendAlpha - legend marker opacity
      Returns:
      graph
    • getLegendColor

      public Color getLegendColor()
      Returns:
      legend marker color
    • setLegendColor

      @StudioProperty(type=OPTIONS) public T setLegendColor(Color legendColor)
      Sets legend marker color. Will use lineColor if not set.
      Parameters:
      legendColor - legend marker color
      Returns:
      graph
    • getLegendPeriodValueText

      public String getLegendPeriodValueText()
      Returns:
      legend period value text
    • setLegendPeriodValueText

      @StudioProperty public T setLegendPeriodValueText(String legendPeriodValueText)
      Sets the text which will be displayed in the value portion of the legend when user is not hovering above any data point. The tags should be made out of two parts - the name of a field (value / open / close / high / low) and the value of the period you want to be show - open / close / high / low / sum / average / count. For example: [[value.sum]] means that sum of all data points of value field in the selected period will be displayed.
      Parameters:
      legendPeriodValueText - legend period value text
      Returns:
      graph
    • getLegendValueText

      public String getLegendValueText()
      Returns:
      legend value text
    • setLegendValueText

      @StudioProperty public T setLegendValueText(String legendValueText)
      Sets legend value text. You can use tags like [[value]], [[description]], [[percents]], [[open]], [[category]] You can also use custom fields from your data provider. If not set, uses AbstractLegend.valueText.
      Parameters:
      legendValueText - legend value text
      Returns:
      graph
    • getLineAlpha

      public Double getLineAlpha()
      Returns:
      opacity of the line (or column border)
    • setLineAlpha

      @StudioProperty @Max(1L) @Min(0L) public T setLineAlpha(Double lineAlpha)
      Sets opacity of the line (or column border). Value range is 0 - 1.
      Parameters:
      lineAlpha - opacity of the line (or column border)
      Returns:
      graph
    • getLineColor

      public Color getLineColor()
      Returns:
      color of the line (or column border)
    • setLineColor

      @StudioProperty(type=OPTIONS) public T setLineColor(Color lineColor)
      Sets color of the line (or column border). If you do not set any, the color from CoordinateChartModelImpl.colors list will be used for each subsequent graph.
      Parameters:
      lineColor - color of the line (or column border)
      Returns:
      graph
    • getLineColorField

      public String getLineColorField()
      Returns:
      name of the line color field
    • setLineColorField

      @StudioProperty(type=PROPERTY_PATH_REF) public T setLineColorField(String lineColorField)
      Sets name of the line color field in your data provider. lineColorField adds a possibility to change graphs’ line color on any data point to create highlighted sections of the graph. Works only with SerialChartModelImpl.
      Parameters:
      lineColorField - name of the line color field
      Returns:
      graph
    • getLineThickness

      public Integer getLineThickness()
      Returns:
      thickness of the graph line (or column border)
    • setLineThickness

      @StudioProperty(defaultValue="1") public T setLineThickness(Integer lineThickness)
      Sets thickness of the graph line (or column border). If not set the default value is 1.
      Parameters:
      lineThickness - thickness of the graph line (or column border)
      Returns:
      graph
    • getLowField

      public String getLowField()
      Returns:
      low field
    • setLowField

      @StudioProperty(type=PROPERTY_PATH_REF) public T setLowField(String lowField)
      Sets name of the low field (used by candlesticks and ohlc) in your data provider.
      Parameters:
      lowField - low field string
      Returns:
      graph
    • getMarkerType

      public MarkerType getMarkerType()
      Returns:
      legend marker type
    • setMarkerType

      @StudioProperty(type=ENUMERATION) public T setMarkerType(MarkerType markerType)
      Sets legend marker type. You can set legend marker (key) type for individual graphs. Possible values are: square, circle, diamond, triangleUp, triangleDown, triangleLeft, triangleDown, bubble, line, none.
      Parameters:
      markerType - legend marker type
      Returns:
      graph
    • getMaxBulletSize

      public Integer getMaxBulletSize()
      Returns:
      maximum bullet size
    • setMaxBulletSize

      @StudioProperty(defaultValue="50") public T setMaxBulletSize(Integer maxBulletSize)
      Sets size of the bullet which value is the biggest (XY chart). If not set the default value is 50.
      Parameters:
      maxBulletSize - maximum bullet size
      Returns:
      graph
    • getMinBulletSize

      public Integer getMinBulletSize()
      Returns:
      minimum bullet size
    • setMinBulletSize

      @StudioProperty(defaultValue="4") public T setMinBulletSize(Integer minBulletSize)
      Sets minimum size of the bullet (XY chart). If not set the default value is 4.
      Parameters:
      minBulletSize - minimum bullet size
      Returns:
      graph
    • getNegativeBase

      public Double getNegativeBase()
      Returns:
      negative base
    • setNegativeBase

      @StudioProperty(defaultValue="0") public T setNegativeBase(Double negativeBase)
      Sets different base value at which colors should be changed to negative colors if you use different colors for your negative values. If not set the default value is 0.
      Parameters:
      negativeBase - negative base
      Returns:
      graph
    • getNegativeFillAlphas

      public Double getNegativeFillAlphas()
      Returns:
      opacity of negative part of the graph
    • setNegativeFillAlphas

      @StudioProperty @Max(1L) @Min(0L) public T setNegativeFillAlphas(Double negativeFillAlphas)
      Sets fill opacity of negative part of the graph. Will use fillAlphas if not set.
      Parameters:
      negativeFillAlphas - negative fill alphas
      Returns:
      graph
    • getNegativeFillColors

      public List<Color> getNegativeFillColors()
      Returns:
      negative fill colors
    • setNegativeFillColors

      public T setNegativeFillColors(List<Color> negativeFillColors)
      Sets fill color of negative part of the graph. Will use fillColors if not set.
      Parameters:
      negativeFillColors - negative fill colors
      Returns:
      graph
    • getNegativeLineAlpha

      public Double getNegativeLineAlpha()
      Returns:
      opacity of the negative portion of the line (or column border)
    • setNegativeLineAlpha

      @StudioProperty(defaultValue="1") @Max(1L) @Min(0L) public T setNegativeLineAlpha(Double negativeLineAlpha)
      Sets opacity of the negative portion of the line (or column border). Value range is 0 - 1. If not set the default value is 1.
      Parameters:
      negativeLineAlpha - opacity
      Returns:
      graph
    • getNegativeLineColor

      public Color getNegativeLineColor()
      Returns:
      color of the line (or column) when the values are negative
    • setNegativeLineColor

      @StudioProperty(type=OPTIONS) public T setNegativeLineColor(Color negativeLineColor)
      Sets color of the line (or column) when the values are negative. In case the graph type is candlestick or ohlc, negativeLineColor is used when close value is less then open value.
      Parameters:
      negativeLineColor - color
      Returns:
      graph
    • getNoStepRisers

      public Boolean getNoStepRisers()
      Returns:
      true if noStepRisers is enabled
    • setNoStepRisers

      @StudioProperty(defaultValue="false") public T setNoStepRisers(Boolean noStepRisers)
      Set noStepRisers to true if you want to have a step line graph without risers. If not set the default value is false.
      Parameters:
      noStepRisers - noStepRisers option
      Returns:
      graph
    • getOpenField

      public String getOpenField()
      Returns:
      open field
    • setOpenField

      @StudioProperty(type=PROPERTY_PATH_REF) public T setOpenField(String openField)
      Sets name of the open field (used by floating columns, candlesticks and ohlc) in your data provider.
      Parameters:
      openField - open field string
      Returns:
      graph
    • getPattern

      public Pattern getPattern()
      Returns:
      pattern
    • setPattern

      public T setPattern(Pattern pattern)
      Sets pattern to the graph. If you want to have individual patterns for each column, define patterns in data provider and set graph patternField property. Check amcharts/patterns folder for some patterns. You can create your own patterns and use them. 3D bar/pie charts won't work properly with patterns.
      Parameters:
      pattern - pattern
      Returns:
      graph
    • getPatternField

      public String getPatternField()
      Returns:
      pattern field
    • setPatternField

      @StudioProperty(type=PROPERTY_PATH_REF) public T setPatternField(String patternField)
      Sets field name in your data provider which holds pattern information. Check amcharts/patterns folder for some patterns. You can create your own patterns and use them. 3D bar/Pie charts won't work properly with patterns.
      Parameters:
      patternField - pattern field string
      Returns:
      graph
    • getPeriodSpan

      public Integer getPeriodSpan()
      Returns:
      period span
    • setPeriodSpan

      @StudioProperty(defaultValue="1") public T setPeriodSpan(Integer periodSpan)
      Sets how many periods one horizontal line should span. periodSpan can be used by step graphs. If not set the default value is 1.
      Parameters:
      periodSpan - period span
      Returns:
      graph
    • getPointPosition

      public PointPosition getPointPosition()
      Returns:
      point position
    • setPointPosition

      @StudioProperty(type=ENUMERATION, defaultValue="MIDDLE") public T setPointPosition(PointPosition pointPosition)
      Specifies where data points should be placed - on the beginning of the period (day, hour, etc) or in the middle (only when parseDates property of categoryAxis is set to true). This setting affects Serial chart only. Possible values are "start", "middle" and "end". If not set the default value is MIDDLE.
      Parameters:
      pointPosition - point position
      Returns:
      graph
    • getShowAllValueLabels

      public Boolean getShowAllValueLabels()
      Returns:
      true if showAllValueLabels is enabled
    • setShowAllValueLabels

      @StudioProperty(defaultValue="false") public T setShowAllValueLabels(Boolean showAllValueLabels)
      If graph's type is column and labelText is set, graph hides labels which do not fit into the column's space or go outside plot area. If you don't want these labels to be hidden, set this to true. If not set the default value is false.
      Parameters:
      showAllValueLabels - show all value labels option
      Returns:
      graph
    • getShowBalloon

      public Boolean getShowBalloon()
      Returns:
      true if showBalloon is enabled
    • setShowBalloon

      @StudioProperty(defaultValue="true") public T setShowBalloon(Boolean showBalloon)
      Set showBalloon to true if the value balloon of this graph should be shown when mouse is over data item or chart's indicator is over some series. If not set the default value is true.
      Parameters:
      showBalloon - show balloon option
      Returns:
      graph
    • getShowBalloonAt

      public ShowPositionOnCandle getShowBalloonAt()
      Returns:
      graphs value at which cursor is shown
    • setShowBalloonAt

      @StudioProperty(type=ENUMERATION, defaultValue="CLOSE") public T setShowBalloonAt(ShowPositionOnCandle showBalloonAt)
      Specifies graphs value at which cursor is shown. This is only important for candlestick and ohlc charts, also if column chart has "open" value. Possible values are: "open", "close", "high", "low". "top" and "bottom" values will glue the balloon to top/bottom of the plot area. If not set the default value is CLOSE.
      Parameters:
      showBalloonAt - graphs value at which cursor is shown
      Returns:
      graph
    • getShowHandOnHover

      public Boolean getShowHandOnHover()
      Returns:
      true if mouse pointer changes to hand when hovering the graph
    • setShowHandOnHover

      @StudioProperty(defaultValue="false") public T setShowHandOnHover(Boolean showHandOnHover)
      Set showHandOnHover to true if you want mouse pointer to change to hand when hovering the graph. If not set the default value is false.
      Parameters:
      showHandOnHover - showHandOnHover option
      Returns:
      graph
    • getStackable

      public Boolean getStackable()
      Returns:
      true if this graph included to stacking.
    • setStackable

      @StudioProperty(defaultValue="true") public T setStackable(Boolean stackable)
      Set stackable to false if you want exclude this graph from stacking. Note, the value axis of this graph should has stack types like "regular" or "100%". If not set the default value is true.
      Parameters:
      stackable - stackable option
      Returns:
      graph
    • getStepDirection

      public StepDirection getStepDirection()
      Returns:
      step direction
    • setStepDirection

      @StudioProperty(type=ENUMERATION, defaultValue="RIGHT") public T setStepDirection(StepDirection stepDirection)
      Specifies to which direction step should be drawn. Step graph only. If not set the default value is RIGHT.
      Parameters:
      stepDirection - step direction
      Returns:
      graph
    • getUrlField

      public String getUrlField()
      Returns:
      the URL field
    • setUrlField

      @StudioProperty(type=PROPERTY_PATH_REF) public T setUrlField(String urlField)
      Sets name of the URL field in your data provider.
      Parameters:
      urlField - the URL field string
      Returns:
      graph
    • getUrlTarget

      public String getUrlTarget()
      Returns:
      the URL target
    • setUrlTarget

      @StudioProperty(type=OPTIONS, options={"_blank","_parent","_self","_top"}) public T setUrlTarget(String urlTarget)
      Sets target to open URLs in, i.e. "_blank", "_top", etc.
      Parameters:
      urlTarget - the URL target
      Returns:
      graph
    • getUseNegativeColorIfDown

      public Boolean getUseNegativeColorIfDown()
      Returns:
      true if graphs uses negative colors for lines, bullets or columns if previous value is bigger than current value
    • setUseNegativeColorIfDown

      @StudioProperty(defaultValue="false") public T setUseNegativeColorIfDown(Boolean useNegativeColorIfDown)
      If negativeLineColor and/or negativeFillColors are set and useNegativeColorIfDown is set to true, the line, step and column graphs will use these colors for lines, bullets or columns if previous value is bigger than current value. In case you set openField for the graph, the graph will compare current value with openField value instead of comparing to previous value. If not set the default value is false.
      Parameters:
      useNegativeColorIfDown - useNegativeColorIfDown option
      Returns:
      graph
    • getVisibleInLegend

      public Boolean getVisibleInLegend()
      Returns:
      true if the graph should be shown in the legend
    • setVisibleInLegend

      @StudioProperty(defaultValue="true") public T setVisibleInLegend(Boolean visibleInLegend)
      Set visibleInLegend to false if the graph shouldn't be shown in the Legend. If not set the default value is true.
      Parameters:
      visibleInLegend - visible in legend option
      Returns:
      graph
    • getBulletAxis

      public String getBulletAxis()
      Returns:
      bullet axis
    • setBulletAxis

      @StudioProperty public T setBulletAxis(String bulletAxis)
      bulletAxis value is used when you are building error chart. Error chart is a regular serial or XY chart with bullet type set to "xError" or "yError". The graph should know which axis should be used to determine the size of this bullet - that's when bulletAxis should be set. Besides that, you should also set graph errorField. You can also use other bullet types with this feature too. For example, if you set bulletAxis for XY chart, the size of a bullet will change as you zoom the chart.
      Parameters:
      bulletAxis - bullet axis
      Returns:
      graph
    • getValueAxis

      public String getValueAxis()
      Returns:
      value axis id
    • setValueAxis

      @StudioProperty public T setValueAxis(String valueAxis)
      Specifies which value axis the graph will use. Will use the first value axis if not set. You can set value axis id.
      Parameters:
      valueAxis - value axis id
      Returns:
      graph
    • getXAxis

      public String getXAxis()
      Returns:
      horizontal value axis id
    • setXAxis

      @StudioProperty public T setXAxis(String xAxis)
      Sets a horizontal value axis to attach graph to. XY chart only.
      Parameters:
      xAxis - horizontal value axis id
      Returns:
      graph
    • getYAxis

      public String getYAxis()
      Returns:
      vertical value axis id
    • setYAxis

      @StudioProperty public T setYAxis(String yAxis)
      Sets a vertical value axis id to attach graph to. XY chart only.
      Parameters:
      yAxis - vertical value axis id
      Returns:
      graph
    • getBalloonFunction

      public JsFunction getBalloonFunction()
      Returns:
      JS function, the graph will call
    • setBalloonFunction

      public T setBalloonFunction(JsFunction balloonFunction)
      Sets JS function, the graph will call it and pass GraphDataItem and AmGraph objects to it. This function should return a string which will be displayed in a balloon.
      Parameters:
      balloonFunction - JS function
      Returns:
      graph
    • getFillToGraph

      public String getFillToGraph()
      Returns:
      fill to graph
    • setFillToGraph

      @StudioProperty public T setFillToGraph(String fillToGraph)
      You can set another graph here and if fillAlpha is greater than 0 , the area from this graph to fillToGraph will be filled (instead of filling the area to the X axis). This feature is not supported by smoothedLine graphs and Radar chart.
      Parameters:
      fillToGraph - fill to graph
      Returns:
      graph
    • getFillToAxis

      public String getFillToAxis()
      Returns:
      id of axis
    • setFillToAxis

      @StudioProperty public T setFillToAxis(String fillToAxis)
      XY chart only. If you set this property to id of your X or Y axis, and the fillAlphas is greater than 0, the area between graph and axis will be filled with color.
      Parameters:
      fillToAxis - id of axis
      Returns:
      graph
    • getFixedColumnWidth

      public Integer getFixedColumnWidth()
      Returns:
      column width, in pixels
    • setFixedColumnWidth

      @StudioProperty public T setFixedColumnWidth(Integer fixedColumnWidth)
      Sets column width, in pixels. If you set this property, columns will be of a fixed width and won't adjust to the available space.
      Parameters:
      fixedColumnWidth - column width
      Returns:
      graph
    • getGapField

      public String getGapField()
      Returns:
      gap field
    • setGapField

      @StudioProperty(type=PROPERTY_PATH_REF) public T setGapField(String gapField)
      Sets name of the gap field in your data provider. You can force graph to show gap at a desired data point using this feature. This feature does not work with XY chart.
      Parameters:
      gapField - gap field string
      Returns:
      graph
    • getGapPeriod

      public Double getGapPeriod()
      Returns:
      gap period
    • setGapPeriod

      @StudioProperty(defaultValue="1.1") public T setGapPeriod(Double gapPeriod)
      Specifies when graph should display gap - if the time difference between data points is bigger than duration of "minPeriod * gapPeriod", and connect property of a graph is set to false, graph will display gap. If not set the default value is 1.1.
      Parameters:
      gapPeriod - gap period
      Returns:
      graph
    • getLabelAnchor

      public String getLabelAnchor()
      Returns:
      label anchor
    • setLabelAnchor

      @StudioProperty(defaultValue="auto") public T setLabelAnchor(String labelAnchor)
      Sets data label text anchor. If not set the default value is "auto".
      Parameters:
      labelAnchor - label anchor string
      Returns:
      graph
    • getLabelFunction

      public JsFunction getLabelFunction()
      Returns:
      label function
    • setLabelFunction

      public T setLabelFunction(JsFunction labelFunction)
      Sets JS function to format labels of data items in any way you want. Graph will call this function and pass reference to GraphDataItem and formatted text as attributes. This function should return string which will be displayed as label.
      Parameters:
      labelFunction - label function
      Returns:
      graph
    • getLabelOffset

      public Integer getLabelOffset()
    • setLabelOffset

      @StudioProperty(defaultValue="0") public T setLabelOffset(Integer labelOffset)
      Sets offset of data label. If not set the default value is 0.
      Parameters:
      labelOffset - label offset
      Returns:
      graph
    • getMinDistance

      public Integer getMinDistance()
      Returns:
      minimum distance, in pixels
    • setMinDistance

      @StudioProperty(defaultValue="1") public T setMinDistance(Integer minDistance)
      Sets minimum distance. Based on this property the graph will omit some of the lines (if the distance between points is less that minDistance, in pixels). It is useful if you have really lots of data points. This will not affect the bullets or indicator in anyway, so the user will not see any difference (unless you set minValue to a bigger value, let say 5), but will increase performance as less lines will be drawn. By setting value to a bigger number you can also make your lines look less jagged. If not set the default value is 1.
      Parameters:
      minDistance - minimum distance, in pixels
      Returns:
      graph
    • getNewStack

      public Boolean getNewStack()
      Returns:
      true if newStack is enabled
    • setNewStack

      @StudioProperty(defaultValue="false") public T setNewStack(Boolean newStack)
      Set newStack to true if column chart should begin new stack. This allows having Clustered and Stacked column/bar chart. If not set the default value is false.
      Parameters:
      newStack - newStack option
      Returns:
      graph
    • getShowBulletsAt

      public ShowPositionOnCandle getShowBulletsAt()
      Returns:
      position on candle
    • setShowBulletsAt

      @StudioProperty(type=ENUMERATION, defaultValue="CLOSE") public T setShowBulletsAt(ShowPositionOnCandle showBulletsAt)
      Works with candlestick graph type, you can set it to open, close, high, low. If you set it to high, the events will be shown at the tip of the high line. If not set the default value is CLOSE.
      Parameters:
      showBulletsAt - position on candle
      Returns:
      graph
    • getShowOnAxis

      public Boolean getShowOnAxis()
      Returns:
      true if showOnAxis is enabled
    • setShowOnAxis

      @StudioProperty(defaultValue="false") public T setShowOnAxis(Boolean showOnAxis)
      If you set showOnAxis to true, the cylinder will be lowered down so that the center of it's bottom circle would be right on category axis. It can only be used together with topRadius (when columns look like cylinders). If not set the default value is false.
      Parameters:
      showOnAxis - showOnAxis option
      Returns:
      graph
    • getSwitchable

      public Boolean getSwitchable()
      Returns:
      true if the graph will be hidden by user clicks on legend entry
    • setSwitchable

      @StudioProperty(defaultValue="true") public T setSwitchable(Boolean switchable)
      If you set switchable to false, the graph will not be hidden when user clicks on legend entry. If not set the default value is true.
      Parameters:
      switchable - switchable option
      Returns:
      graph
    • getTopRadius

      public Integer getTopRadius()
      Returns:
      top radius
    • setTopRadius

      @StudioProperty public T setTopRadius(Integer topRadius)
      If you set this to 1, columns will become cylinders (must set depth3D and angle properties of a chart to greater than 0 values in order this to be visible). you can make columns look like cones (set topRadius to 0) or even like some glasses (set to bigger than 1). It is strongly recommend setting grid opacity to 0 in order this to look good.
      Parameters:
      topRadius - top radius
      Returns:
      graph
    • getDateFormat

      public DateFormat getDateFormat()
      Returns:
      date format for balloons
    • setDateFormat

      public T setDateFormat(DateFormat dateFormat)
      Sets date format. Used to format balloons if value axis is date-based. If not set the default value is "MMM DD, YYYY".
      Parameters:
      dateFormat - date format
      Returns:
      graph
    • getLabelRotation

      public Integer getLabelRotation()
      Returns:
      label rotation
    • setLabelRotation

      @StudioProperty(defaultValue="0") public T setLabelRotation(Integer labelRotation)
      Sets the rotation of a data label. If not set the default value is 0.
      Parameters:
      labelRotation - label rotation
      Returns:
      graph
    • getPrecision

      public Integer getPrecision()
      Returns:
      precision of values
    • setPrecision

      @StudioProperty public T setPrecision(Integer precision)
      Sets precision of values. Will use chart's precision if not set any.
      Parameters:
      precision - precision
      Returns:
      graph
    • getProCandlesticks

      public Boolean getProCandlesticks()
      Returns:
      true if proCandlesticks is enabled
    • setProCandlesticks

      @StudioProperty(defaultValue="false") public T setProCandlesticks(Boolean proCandlesticks)
      If proCandlesticks is set to true, candlesticks will be colored in a different manner - if current close is less than current open, the candlestick will be empty, otherwise - filled with color. If previous close is less than current close, the candlestick will use positive color, otherwise - negative color. If not set the default value is false.
      Parameters:
      proCandlesticks - proCandlesticks option
      Returns:
      graph
    • getUseLineColorForBulletBorder

      public Boolean getUseLineColorForBulletBorder()
      Returns:
      true if bullet border should take the same color as graph line
    • setUseLineColorForBulletBorder

      @StudioProperty(defaultValue="false") public T setUseLineColorForBulletBorder(Boolean useLineColorForBulletBorder)
      If set to true, the bullet border will take the same color as graph line. If not set the default value is false.
      Parameters:
      useLineColorForBulletBorder - useLineColorForBulletBorder option
      Returns:
      graph
    • getAccessibleLabel

      public String getAccessibleLabel()
      Returns:
      accessible label
    • setAccessibleLabel

      @StudioProperty(defaultValue="[[title]] [[category]] [[value]]") public T setAccessibleLabel(String accessibleLabel)
      Sets text which screen readers will read if user rolls-over the bullet/column or sets focus using tab key (this is possible only if tabIndex property of graph is set to some number). Text is added as aria-label. Note - not all screen readers and browsers support this. If not set the default value is "[[title]] [[category]] [[value]]".
      Parameters:
      accessibleLabel - accessible label string
      Returns:
      graph
    • getBalloon

      public Balloon getBalloon()
      Returns:
      balloon of the graph
    • setBalloon

      public T setBalloon(Balloon balloon)
      Sets the balloon to the graph. Allows customizing graphs balloons individually (only when Cursor is used).
      Parameters:
      balloon - balloon
      Returns:
      graph
    • getBulletHitAreaSize

      public Integer getBulletHitAreaSize()
      Returns:
      bullet hit area size
    • setBulletHitAreaSize

      @StudioProperty public T setBulletHitAreaSize(Integer bulletHitAreaSize)
      Sets bullet hit area size. Useful for touch devices - if you set it to 20 or so, the bullets of a graph will have invisible circle around the actual bullet (bullets should still be enabled), which will be easier to touch (bullets usually are smaller and hard to hit).
      Parameters:
      bulletHitAreaSize - bullet hit area size
      Returns:
      graph
    • getClassNameField

      public String getClassNameField()
      Returns:
      CSS class name field
    • setClassNameField

      @StudioProperty(type=PROPERTY_PATH_REF) public T setClassNameField(String classNameField)
      Sets CSS class name field. If classNameField is set and addClassNames is enabled, the chart will look for a CSS class name string in data using this setting and apply additional class names to elements of the particular data points, such as bullets.
      Parameters:
      classNameField - class name field string
      Returns:
      graph
    • getWiredFields

      public List<String> getWiredFields()
      Returns:
      fields of the DataItem that are bound to the graph
    • getLegendColorFunction

      public JsFunction getLegendColorFunction()
      Returns:
      JS function to handle legend marker color
    • setLegendColorFunction

      public T setLegendColorFunction(JsFunction legendColorFunction)
      Sets JS function to handle legend marker color. It is called and the following attributes are passed: dataItem, formattedText, periodValues, periodPercentValues. It should return hex color code which will be used for legend marker.
      Parameters:
      legendColorFunction - legend color function
      Returns:
      graph
    • getTabIndex

      public Integer getTabIndex()
      Returns:
      tab index
    • setTabIndex

      @StudioProperty public T setTabIndex(Integer tabIndex)
      In case you set it to some number, the chart will set focus on bullet/column (starting from first) when user clicks tab key. When a focus is set, screen readers like NVDA Screen reader will read label which is set using accessibleLabel property of graph. Note, not all browsers and readers support this.
      Parameters:
      tabIndex - tab index
      Returns:
      graph
    • getColumnIndexField

      public String getColumnIndexField()
      Returns:
      column index field
    • setColumnIndexField

      @StudioProperty public T setColumnIndexField(String columnIndexField)
      Specifies order of columns of each category (starting from 0).You can use this property with non-stacked column graphs. Important, this feature does not work in stacked columns scenarios as well as with graph toggling enabled in legend.
      Parameters:
      columnIndexField - column index field string
      Returns:
      graph