Class StockLegend

All Implemented Interfaces:
HasMargins<AbstractLegend>, Serializable

public class StockLegend extends AbstractLegend<StockLegend>
StockLegend is a legend of StockPanel.
See documentation for properties of StockLegend JS object.
http://docs.amcharts.com/3/javascriptstockchart/StockLegend
See Also:
  • Constructor Details

    • StockLegend

      public StockLegend()
  • Method Details

    • getPeriodValueTextComparing

      public String getPeriodValueTextComparing()
      Returns:
      period value text comparing
    • setPeriodValueTextComparing

      @StudioProperty public StockLegend setPeriodValueTextComparing(String periodValueTextComparing)
      Sets the text which will be displayed in the value portion of the legend when user is not hovering above any data point and the data sets are compared. 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. In case you want to display percent values, you should add "percent" string in front of a tag, for example: [[percents.value.close]] means that last percent value of a period will be displayed.
      Parameters:
      periodValueTextComparing - period value text comparing
      Returns:
      stock legend
    • getPeriodValueTextRegular

      public String getPeriodValueTextRegular()
      Returns:
      period value text regular
    • setPeriodValueTextRegular

      @StudioProperty public StockLegend setPeriodValueTextRegular(String periodValueTextRegular)
      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:
      periodValueTextRegular - period value text regular
      Returns:
      stock legend
    • getValueTextComparing

      public String getValueTextComparing()
      Returns:
      value text comparing
    • setValueTextComparing

      @StudioProperty(defaultValue="[[percents.value]]%") public StockLegend setValueTextComparing(String valueTextComparing)
      Sets the text which will be displayed in the value portion of the legend when graph is comparable and at least one data set is selected for comparing. You can use tags like [[value]], [[open]], [[high]], [[low]], [[close]], [[percents.value/open/close/low/high]], [[description]]. If not set the default value is "[[percents.value]]%".
      Parameters:
      valueTextComparing - value text comparing
      Returns:
      stock legend
    • getValueTextRegular

      public String getValueTextRegular()
      Returns:
      value text regular
    • setValueTextRegular

      @StudioProperty(defaultValue="[[value]]") public StockLegend setValueTextRegular(String valueTextRegular)
      Sets the text which will be displayed in the value portion of the legend. You can use tags like [[value]], [[open]], [[high]], [[low]], [[close]], [[percents]], [[description]]. If not set the default value is "[[value]]".
      Parameters:
      valueTextRegular - value text regular
      Returns:
      stock legend