Class ChartCursorSettings

java.lang.Object
io.jmix.charts.model.AbstractChartObject
io.jmix.charts.model.settings.ChartCursorSettings
All Implemented Interfaces:
Serializable

public class ChartCursorSettings extends AbstractChartObject
Defines set of properties for chart cursor. If there is no default value specified, default value of Cursor class will be used.
See documentation for properties of ChartCursorSettings JS object.
http://docs.amcharts.com/3/javascriptstockchart/ChartCursorSettings
See Also:
  • Constructor Details

    • ChartCursorSettings

      public ChartCursorSettings()
  • Method Details

    • getBalloonPointerOrientation

      public BalloonPointerOrientation getBalloonPointerOrientation()
      Returns:
      orientation of value balloon pointer
    • setBalloonPointerOrientation

      @StudioProperty(type=ENUMERATION, defaultValue="HORIZONTAL") public ChartCursorSettings setBalloonPointerOrientation(BalloonPointerOrientation balloonPointerOrientation)
      Sets orientation of value balloon pointer. If not set the default value is HORIZONTAL.
      Parameters:
      balloonPointerOrientation - orientation of value balloon pointer
      Returns:
      chart cursor settings
    • getBulletsEnabled

      public Boolean getBulletsEnabled()
      Returns:
      true if bulletsEnabled is enabled
    • setBulletsEnabled

      @StudioProperty public ChartCursorSettings setBulletsEnabled(Boolean bulletsEnabled)
      Specifies if bullet for each graph will follow the cursor.
      Parameters:
      bulletsEnabled - bulletsEnabled option
      Returns:
      chart cursor settings
    • getBulletSize

      public Integer getBulletSize()
      Returns:
      bullet size
    • setBulletSize

      @StudioProperty public ChartCursorSettings setBulletSize(Integer bulletSize)
      Sets size of bullets, following the cursor.
      Parameters:
      bulletSize - bullet size
      Returns:
      chart cursor settings
    • getCategoryBalloonAlpha

      public Double getCategoryBalloonAlpha()
      Returns:
      opacity of the category balloon
    • setCategoryBalloonAlpha

      @StudioProperty @Max(1L) @Min(0L) public @Max(1L) @Min(0L) ChartCursorSettings setCategoryBalloonAlpha(Double categoryBalloonAlpha)
      Sets opacity of the category balloon.
      Parameters:
      categoryBalloonAlpha - opacity of the category balloon
      Returns:
      chart cursor settings
    • getCategoryBalloonColor

      public Color getCategoryBalloonColor()
      Returns:
      color of the category balloon
    • setCategoryBalloonColor

      @StudioProperty(type=OPTIONS) public ChartCursorSettings setCategoryBalloonColor(Color categoryBalloonColor)
      Sets color of the category balloon.
      Parameters:
      categoryBalloonColor - color of the category balloon
      Returns:
      chart cursor settings
    • getCategoryBalloonDateFormats

      public List<DateFormat> getCategoryBalloonDateFormats()
      Returns:
      list of date formats
    • setCategoryBalloonDateFormats

      @StudioElementsGroup(caption="Category Ballon Date Formats", xmlElement="categoryBalloonDateFormats") public ChartCursorSettings setCategoryBalloonDateFormats(List<DateFormat> categoryBalloonDateFormats)
      Sets list of date formats. If not set the default value is
      
       [{period:"YYYY", format:"YYYY"},
        {period:"MM",   format:"MMM, YYYY"},
        {period:"WW",   format:"MMM DD, YYYY"},
        {period:"DD",   format:"MMM DD, YYYY"},
        {period:"hh",   format:"JJ:NN"},
        {period:"mm",   format:"JJ:NN"},
        {period:"ss",   format:"JJ:NN:SS"},
        {period:"fff",  format:"JJ:NN:SS"}]
       
      Parameters:
      categoryBalloonDateFormats - list of date formats
      Returns:
      chart cursor settings
    • addCategoryBalloonDateFormats

      public ChartCursorSettings addCategoryBalloonDateFormats(DateFormat... categoryBalloonDateFormats)
      Adds date formats.
      Parameters:
      categoryBalloonDateFormats - date formats
      Returns:
      chart cursor settings
    • getCategoryBalloonEnabled

      public Boolean getCategoryBalloonEnabled()
      Returns:
      true if categoryBalloonEnabled is enabled
    • setCategoryBalloonEnabled

      @StudioProperty public ChartCursorSettings setCategoryBalloonEnabled(Boolean categoryBalloonEnabled)
      Specifies whether category balloon is enabled.
      Parameters:
      categoryBalloonEnabled - categoryBalloonEnabled option
      Returns:
      chart cursor settings
    • getCategoryBalloonText

      public String getCategoryBalloonText()
      Returns:
      category balloon text
    • setCategoryBalloonText

      @StudioProperty(defaultValue="[[category]]") public ChartCursorSettings setCategoryBalloonText(String categoryBalloonText)
      Sets category balloon text. You can have [[category]] - [[toCategory]] tags in there and show category ranges this way. If not set the default value is "[[category]]".
      Parameters:
      categoryBalloonText - category balloon text
      Returns:
      chart cursor settings
    • getCursorAlpha

      public Double getCursorAlpha()
      Returns:
      opacity of the cursor line
    • setCursorAlpha

      @StudioProperty @Max(1L) @Min(0L) public @Max(1L) @Min(0L) ChartCursorSettings setCursorAlpha(Double cursorAlpha)
      Sets opacity of the cursor line.
      Parameters:
      cursorAlpha - opacity of the cursor line
      Returns:
      chart cursor settings
    • getCursorColor

      public Color getCursorColor()
      Returns:
      color of the cursor line
    • setCursorColor

      @StudioProperty(type=OPTIONS, defaultValue="#FFFFFF") public ChartCursorSettings setCursorColor(Color cursorColor)
      Sets color of the cursor line. If not set the default value is #FFFFFF.
      Parameters:
      cursorColor - color of the cursor line
      Returns:
      chart cursor settings
    • getCursorPosition

      public CursorPosition getCursorPosition()
      Returns:
      cursor position
    • setCursorPosition

      @StudioProperty(type=ENUMERATION) public ChartCursorSettings setCursorPosition(CursorPosition cursorPosition)
      Sets cursor position. Possible values: start, middle, mouse.
      Parameters:
      cursorPosition - cursor position
      Returns:
      chart cursor settings
    • getEnabled

      public Boolean getEnabled()
      Returns:
      true if this property is enabled
    • setEnabled

      @StudioProperty(defaultValue="true") public ChartCursorSettings setEnabled(Boolean enabled)
      Set enabled to false if you don't want chart cursor to appear in your charts. If not set the default value is true.
      Parameters:
      enabled - enabled option
      Returns:
      chart cursor settings
    • getFullWidth

      public Boolean getFullWidth()
      Returns:
      true if a fill width always equals to the width of one data item
    • setFullWidth

      @StudioProperty(defaultValue="false") public ChartCursorSettings setFullWidth(Boolean fullWidth)
      Set to true if you want instead of a cursor line user should see a fill which width will always be equal to the width of one data item. It is recommended setting cursorAlpha to 0.1 or some other small number if using this feature. If not set the default value is false.
      Parameters:
      fullWidth - fullWidth option
      Returns:
      chart cursor settings
    • getGraphBulletSize

      public Double getGraphBulletSize()
      Returns:
      size of a graph's bullet
    • setGraphBulletSize

      @StudioProperty(defaultValue="1.7") public ChartCursorSettings setGraphBulletSize(Double graphBulletSize)
      Sets size of a graph's bullet (if available) at the cursor position. If you don't want the bullet to change its size, set this property to 1. If not set the default value is 1.7
      Parameters:
      graphBulletSize - size of a graph's bullet
      Returns:
      chart cursor settings
    • getLeaveAfterTouch

      public Boolean getLeaveAfterTouch()
      Returns:
      true if cursor and balloons remain after the user touches the chart
    • setLeaveAfterTouch

      @StudioProperty(defaultValue="true") public ChartCursorSettings setLeaveAfterTouch(Boolean leaveAfterTouch)
      Set leaveAfterTouch to false if cursor and balloons shouldn't remain after the user touches the chart. If not set the default value is true.
      Parameters:
      leaveAfterTouch - leaveAfterTouch option
      Returns:
      chart cursor settings
    • getLeaveCursor

      public Boolean getLeaveCursor()
      Returns:
      true if the cursor remains in the last position
    • setLeaveCursor

      @StudioProperty(defaultValue="false") public ChartCursorSettings setLeaveCursor(Boolean leaveCursor)
      Set leaveCursor to true if cursor should be left at it's last position. Useful for touch devices - user might want to see the balloons after he moves finger away. If not set the default value is false.
      Parameters:
      leaveCursor - leaveCursor option
      Returns:
      chart cursor settings
    • getOnePanelOnly

      public Boolean getOnePanelOnly()
      Returns:
      true if stock chart displays value balloons on currently hovered panel only
    • setOnePanelOnly

      @StudioProperty(defaultValue="false") public ChartCursorSettings setOnePanelOnly(Boolean onePanelOnly)
      Set onePanelOnly to true if stock chart should display value balloons on currently hovered panel only. If not set the default value is false.
      Parameters:
      onePanelOnly - onePanelOnly option
      Returns:
      chart cursor settings
    • getPan

      public Boolean getPan()
      Returns:
      true if the user can pan the chart instead of zooming
    • setPan

      Set pan to true and the user will be able to pan the chart instead of zooming.
      Parameters:
      pan - pan option
      Returns:
      chart cursor settings
    • getValueBalloonsEnabled

      public Boolean getValueBalloonsEnabled()
      Returns:
      true if value balloons is enabled
    • setValueBalloonsEnabled

      @StudioProperty(defaultValue="false") public ChartCursorSettings setValueBalloonsEnabled(Boolean valueBalloonsEnabled)
      Set valueBalloonsEnabled to true if value balloons should be enabled. In case they are not enabled, the balloons might be displayed anyway, when the user rolls-over the column or bullet. If not set the default value is false.
      Parameters:
      valueBalloonsEnabled - valueBalloonsEnabled option
      Returns:
      chart cursor settings
    • getValueLineAlpha

      public Double getValueLineAlpha()
      Returns:
      opacity of value line
    • setValueLineAlpha

      @StudioProperty @Max(1L) @Min(0L) public @Max(1L) @Min(0L) ChartCursorSettings setValueLineAlpha(Double valueLineAlpha)
      Sets opacity of value line. Will use cursorAlpha value if not set.
      Parameters:
      valueLineAlpha - opacity of value line
      Returns:
      chart cursor settings
    • getValueLineBalloonEnabled

      public Boolean getValueLineBalloonEnabled()
      Returns:
      true if value balloon next to value axis labels is displayed
    • setValueLineBalloonEnabled

      @StudioProperty(defaultValue="false") public ChartCursorSettings setValueLineBalloonEnabled(Boolean valueLineBalloonEnabled)
      Set valueLineBalloonEnabled to true if value balloon next to value axis labels should be displayed. If you have more than one axis, set Cursor.valueLineAxis to indicate which axis should display the balloon. If not set the default value is false.
      Parameters:
      valueLineBalloonEnabled - valueLineBalloonEnabled option
      Returns:
      chart cursor settings
    • getValueLineEnabled

      public Boolean getValueLineEnabled()
      Returns:
      true if cursor of serial chart displays horizontal (or vertical if chart is rotated) line
    • setValueLineEnabled

      @StudioProperty(defaultValue="false") public ChartCursorSettings setValueLineEnabled(Boolean valueLineEnabled)
      Set valueLineEnabled to true if cursor of serial chart should display horizontal (or vertical if chart is rotated) line. This line might help users to compare distant values of a chart. You can also enable value balloon on this line by setting Cursor.valueLineAxis property. If not set the default value is false.
      Parameters:
      valueLineEnabled - valueLineEnabled option
      Returns:
      chart cursor settings
    • getZoomable

      public Boolean getZoomable()
      Returns:
      true if the user can zoom-in the chart
    • setZoomable

      @StudioProperty public ChartCursorSettings setZoomable(Boolean zoomable)
      Set zoomable to true if the user should zoom-in the chart. If pan is set to true, zoomable is switched to false automatically.
      Parameters:
      zoomable - zoomable option
      Returns:
      chart cursor settings
    • getColor

      public Color getColor()
      Returns:
      text color
    • setColor

      Sets text color.
      Parameters:
      color - text color
      Returns:
      chart cursor settings
    • getSelectWithoutZooming

      public Boolean getSelectWithoutZooming()
      Returns:
      true if cursor selects area but not zoom-in
    • setSelectWithoutZooming

      @StudioProperty(defaultValue="false") public void setSelectWithoutZooming(Boolean selectWithoutZooming)
      Set selectWithoutZooming to true if cursor should only mark selected area but not zoom-in after user releases mouse button. If not set the default value is false.
      Parameters:
      selectWithoutZooming - selectWithoutZooming option
    • getShowNextAvailable

      public Boolean getShowNextAvailable()
      Returns:
      true if graph displays balloon on next available data point while currently hovered item doesn't have value for this graph
    • setShowNextAvailable

      @StudioProperty(defaultValue="false") public void setShowNextAvailable(Boolean showNextAvailable)
      If true, the graph will display balloon on next available data point if currently hovered item doesn't have value for this graph. If not set the default value is false.
      Parameters:
      showNextAvailable - showNextAvailable option