com.supermap.mapping.imChart

Class ChartLegend

  • java.lang.Object
    • com.supermap.mapping.imChart.ChartLegend


  • public class ChartLegend
    extends java.lang.Object
    The ChartLegend Class.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int BOTTOM
      Center Bottom
      static int BOTTOMLEFT
      Bottom Left
      static int BOTTOMRIGHT
      Bottom Right
      static int LEFT
      Center Right
      static int RIGHT
      Center Left
      static int TOP
      Center Top
      static int TOPLEFT
      Top Left
      static int TOPRIGHT
      Top Right
    • Constructor Summary

      Constructors 
      Constructor and Description
      ChartLegend(android.content.Context context, ChartView chart)
      The constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void dispose()
      Disposes resources.
      boolean getVisible()
      Gets whether to display the legend.
      void setAlignment(int alignment)
      Sets the alignment of the legend relative to the chart.
      void setBackGroundColor(int color)
      Sets the legend background color.
      void setFontColor(int color)
      Sets the legend font color.
      void setFontSize(int size)
      Sets the legend font size.
      void setOrient(boolean bOrient)
      Sets whether or not to arrange the legend vertically.
      void setVisible(boolean bVisible)
      Sets whether to display the legend.
      void updata()
      Update the legend.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ChartLegend

        public ChartLegend(android.content.Context context,
                           ChartView chart)
        The constructor.
        Parameters:
        context - Application context.
        chart - The chart associated with the legend.
    • Method Detail

      • setVisible

        public void setVisible(boolean bVisible)
        Sets whether to display the legend.
        Parameters:
        bVisible - Whether to display a legend, true for a legend, and false for a hidden legend.
      • getVisible

        public boolean getVisible()
        Gets whether to display the legend.
        Returns:
        Whether to display a legend, true for a legend, and false for a hidden legend.
      • setOrient

        public void setOrient(boolean bOrient)
        Sets whether or not to arrange the legend vertically. If set to true, the legend is vertically aligned; if set to false, the legend is displayed horizontally. The legend is vertically arranged by default.
        Parameters:
        bOrient - Whether the vertical arrangement of the legend, true, that the vertical arrangement of the legend, false that the horizontal display legend.
      • setFontSize

        public void setFontSize(int size)
        Sets the legend font size.
        Parameters:
        size - The size font of legend.
      • setBackGroundColor

        public void setBackGroundColor(int color)
        Sets the legend background color.
        Parameters:
        color - The legend background color.
      • setFontColor

        public void setFontColor(int color)
        Sets the legend font color.
        Parameters:
        color - The legend font color.
      • setAlignment

        public void setAlignment(int alignment)
        Sets the alignment of the legend relative to the chart.

        0: bottom-left alignment; 1: bottom alignment; 2: bottom-right alignment; 3: left alignment; 4: right alignment; 5: upper left alignment; 6: upper alignment; 7: upper right alignment

        Parameters:
        alignment - Legend Alignment
      • updata

        public void updata()
        Update the legend.

        You need to update the properties after you change them.

      • dispose

        public void dispose()
        Disposes resources.