Namespace EasyXLS.Charts

Class ExcelAxis

  • All Implemented Interfaces:
    IAlignDrawingObject, IEffectDrawingObject, IFontDrawingObject

    public class ExcelAxis
    extends AlignDrawingObject
    This class stores the chart axis information like extends label, fill settings, font settings, line settings, shadow settings, alignment settings, type of major and minor tick mark, tick mark label, number format, rotation of the axis, visibility.
    • Constructor Detail

      • ExcelAxis

        public ExcelAxis()
        Defines an instance of the excel axis.
    • Method Detail

      • setLabel

        public void setLabel​(System.String label)
        Deprecated.
        As of version 8.3, replaced by ExcelTitle.setText(System.String)
        Sets the chart axis title.
        Parameters:
        label - the chart axis title
        See Also:
        getLabel()
      • getLabel

        public System.String getLabel()
        Deprecated.
        As of version 8.3, replaced by getAxisTitle()
        Returns the chart axis title.
        Returns:
        the chart axis title
        See Also:
        setLabel(System.String)
      • setAxisTitle

        public void setAxisTitle​(ExcelTitle xlsTitle)
        Sets the chart axis title.
        Parameters:
        xlsTitle - the chart axis title
        See Also:
        getAxisTitle()
      • setVisible

        public void setVisible​(bool isVisible)
        Sets the visible setting of the chart axis.
        Parameters:
        isVisible - the visible setting of the chart axis
        See Also:
        IsVisible()
      • IsVisible

        public bool IsVisible()
        Returns the visible setting of the chart axis.
        Returns:
        the visible setting of the chart axis
        See Also:
        setVisible(bool)
      • getLineStyle

        public int getLineStyle()
        Deprecated.
        As of version 8.3, replaced by LineStyleFormat.getDashType()
        Returns the line style of the chart axis. Possible values are available in Chart class.
        Returns:
        the line style of the chart axis
        See Also:
        setLineStyle(int)
      • setLineStyle

        public void setLineStyle​(int lineStyle)
        Deprecated.
        As of version 8.3, replaced by LineStyleFormat.setDashType(System.String)
        Sets the line style of the chart axis. Possible values are available in Chart class.
        Parameters:
        lineStyle - the line style of the chart axis
        See Also:
        getLineStyle()
      • getLineWeight

        public int getLineWeight()
        Deprecated.
        As of version 8.3, replaced by LineStyleFormat.getWidth()
        Returns the line weight of the chart axis. Possible values are available in Chart class.
        Returns:
        the line weight of the chart axis
        See Also:
        setLineWeight(int)
      • setLineWeight

        public void setLineWeight​(int axisWeight)
        Deprecated.
        As of version 8.3, replaced by LineStyleFormat.setWidth(float)
        Sets the line weight of the chart axis. Possible values are available in Chart class.
        Parameters:
        axisWeight - the line weight of the chart axis
        See Also:
        getLineWeight()
      • getLineColor

        public System.Drawing.Color getLineColor()
        Deprecated.
        As of version 8.3, replaced by LineColorFormat.getLineColor()
        Returns the line color of the chart axis.
        Returns:
        the line color of the chart axis
        See Also:
        setLineColor(Color)
      • setLineColor

        public void setLineColor​(System.Drawing.Color lineColor)
        Deprecated.
        As of version 8.3, replaced by LineColorFormat.setLineColor(Color)
        Sets the line color of the chart axis.
        Parameters:
        lineColor - the line color of the chart axis
        See Also:
        getLineColor()
      • getMajorTickMarkType

        public int getMajorTickMarkType()
        Returns the type of the major tick mark. Possible values are available in Chart class.
        Returns:
        the line weight of the chart axis
        See Also:
        setMajorTickMarkType(int)
      • setMajorTickMarkType

        public void setMajorTickMarkType​(int majorTickMarkType)
        Sets the type of the major tick mark. Possible values are available in Chart class.
        Parameters:
        majorTickMarkType - the type of the major tick mark
        See Also:
        getMajorTickMarkType()
      • getMinorTickMarkType

        public int getMinorTickMarkType()
        Returns the type of the minor tick mark. Possible values are available in Chart class.
        Returns:
        the line weight of the chart axis
        See Also:
        setMinorTickMarkType(int)
      • setMinorTickMarkType

        public void setMinorTickMarkType​(int minorTickMarkType)
        Sets the type of the minor tick mark. Possible values are available in Chart class.
        Parameters:
        minorTickMarkType - the type of the minor tick mark
        See Also:
        getMinorTickMarkType()
      • getTickMarkLabel

        public int getTickMarkLabel()
        Returns the label of the tick mark. Possible values are available in Chart class.
        Returns:
        the line weight of the chart axis
        See Also:
        setTickMarkLabel(int)
      • setTickMarkLabel

        public void setTickMarkLabel​(int tickMarkLabel)
        Sets the label of the tick mark. Possible values are available in Chart class.
        Parameters:
        tickMarkLabel - the label of the tick mark
        See Also:
        getTickMarkLabel()
      • getForeground

        public System.Drawing.Color getForeground()
        Deprecated.
        As of version 8.3, replaced by FontFormat.getForeground()
        Returns the foreground color of the chart axis.
        Returns:
        the foreground color of the chart axis
        See Also:
        setForeground(Color)
      • setForeground

        public void setForeground​(System.Drawing.Color foreground)
        Deprecated.
        As of version 8.3, replaced by FontFormat.setForeground(Color)
        Sets the foreground color of the chart axis.
        Parameters:
        foreground - the foreground color of the chart axis
        See Also:
        getForeground()
      • IsStrikethrough

        public bool IsStrikethrough()
        Deprecated.
        As of version 8.3, replaced by FontFormat.IsStrikethrough()
        Returns the strikethrough setting of the chart axis font.
        Returns:
        the strikethrough setting of the chart axis font
        See Also:
        setStrikethrough(bool)
      • setStrikethrough

        public void setStrikethrough​(bool isStrikethrough)
        Deprecated.
        As of version 8.3, replaced by FontFormat.setStrikethrough(bool)
        Sets the strikethrough setting of the chart axis font.
        Parameters:
        isStrikethrough - the strikethrough setting of the chart axis font
        See Also:
        IsStrikethrough()
      • IsSuperscript

        public bool IsSuperscript()
        Deprecated.
        As of version 8.3, replaced by FontFormat.IsSuperscript()
        Returns the superscript setting of the chart axis font.
        Returns:
        the superscript setting of the chart axis font
        See Also:
        setSuperscript(bool)
      • setSuperscript

        public void setSuperscript​(bool isSuperscript)
        Deprecated.
        As of version 8.3, replaced by FontFormat.setSuperscript(bool)
        Sets the superscript setting of the chart axis font.
        Parameters:
        isSuperscript - the superscript setting of the chart axis font
        See Also:
        IsSuperscript()
      • IsSubscript

        public bool IsSubscript()
        Deprecated.
        As of version 8.3, replaced by FontFormat.IsSubscript()
        Returns the subscript setting of the chart axis font.
        Returns:
        the subscript setting of the chart axis font
        See Also:
        setSubscript(bool)
      • setSubscript

        public void setSubscript​(bool isSubscript)
        Deprecated.
        As of version 8.3, replaced by FontFormat.setSubscript(bool)
        Sets the subscript setting of the chart axis font.
        Parameters:
        isSubscript - the subscript setting of the chart axis font
        See Also:
        IsSubscript()
      • getFontSize

        public int getFontSize()
        Deprecated.
        As of version 8.3, replaced by FontFormat.getFontSize()
        Returns the size of the chart axis font.
        Returns:
        the size of the chart axis font
        See Also:
        setFontSize(int)
      • setFontSize

        public void setFontSize​(int fontSize)
        Deprecated.
        As of version 8.3, replaced by FontFormat.setFontSize(float)
        Sets the size of the chart axis font.
        Parameters:
        fontSize - the size of the chart axis font
        See Also:
        getFontSize()
      • setFont

        public void setFont​(System.String fontName)
        Deprecated.
        As of version 8.3, replaced by FontFormat.setFont(System.String)
        Sets the chart axis font name.
        Parameters:
        fontName - the chart axis font name
        See Also:
        getFont()
      • IsBold

        public bool IsBold()
        Deprecated.
        As of version 8.3, replaced by FontFormat.IsBold()
        Returns the bold setting of the chart axis font.
        Returns:
        the bold setting of the chart axis font
        See Also:
        setBold(bool)
      • setBold

        public void setBold​(bool isBold)
        Deprecated.
        As of version 8.3, replaced by FontFormat.setBold(bool)
        Sets the bold setting of the chart axis font.
        Parameters:
        isBold - the bold style of the chart axis font
        See Also:
        IsBold()
      • IsItalic

        public bool IsItalic()
        Deprecated.
        As of version 8.3, replaced by FontFormat.IsItalic()
        Returns the italic setting of the chart axis font.
        Returns:
        the italic setting of the chart axis font
        See Also:
        setItalic(bool)
      • setItalic

        public void setItalic​(bool isItalic)
        Deprecated.
        As of version 8.3, replaced by FontFormat.setItalic(bool)
        Sets the italic setting of the chart axis font.
        Parameters:
        isItalic - the italic style of the chart axis font
        See Also:
        IsItalic()
      • setFontSettings

        public void setFontSettings​(System.String fontName,
                                    int fontSize,
                                    bool isBold,
                                    bool isItalic,
                                    System.Drawing.Color foreground)
        Deprecated.
        Sets the font settings.
        Parameters:
        fontName - the name of the font
        fontSize - the size of the font
        isBold - the bold option of the font
        isItalic - the italic option of the font
        foreground - the foreground color
      • getNumberFormat

        public System.String getNumberFormat()
        Returns the chart axis number format. Possible values are available in Format class.
        Returns:
        the chart axis number format
        See Also:
        setNumberFormat(System.String)
      • setNumberFormat

        public void setNumberFormat​(System.String numberFormat)
        Sets the chart axis number format. Possible values are available in Format class.
        Parameters:
        numberFormat - the chart axis number format
        See Also:
        getNumberFormat()
      • setNumberFormatLinked

        public void setNumberFormatLinked​(bool isNumberFormatLinked)
        Sets if the number format of the chart axis is linked to the number format of the data source.
        Parameters:
        isNumberFormatLinked - true, if the number format of the labels is the same as the number format of the data source, false otherwise
        See Also:
        IsNumberFormatLinked()
      • IsNumberFormatLinked

        public bool IsNumberFormatLinked()
        Returns true, if the number format of the labels is the same as the number format of the data source, false otherwise.
        Returns:
        true, if the number format of the labels is the same as the number format of the data source, false otherwise
        See Also:
        setNumberFormatLinked(bool)
      • IsAutomaticMinimumValue

        public bool IsAutomaticMinimumValue()
        Returns the automatic option of the minimum value of the value Y axis scale. The property is applicable only to value Y axis.
        Returns:
        true if the minimum value of the value Y axis scale is set automatically, false otherwise
        See Also:
        setAutomaticMinimumValue(bool), setMinimumValue(double), getMinimumValue()
      • setAutomaticMinimumValue

        public void setAutomaticMinimumValue​(bool isAutomatic)
        Sets the automatic option of the minimum value of the value Y axis scale. The property is applicable only to value Y axis.
        Parameters:
        isAutomatic - the automatic option
        See Also:
        IsAutomaticMinimumValue(), setMinimumValue(double), getMinimumValue()
      • IsAutomaticMaximumValue

        public bool IsAutomaticMaximumValue()
        Returns the automatic option of the maximum value of the value Y axis scale. The property is applicable only to value Y axis.
        Returns:
        true if the maximum value of the value Y axis scale is set automatically, false otherwise
        See Also:
        setAutomaticMaximumValue(bool), setMaximumValue(double), getMaximumValue()
      • setAutomaticMaximumValue

        public void setAutomaticMaximumValue​(bool isAutomatic)
        Sets the automatic option of the maximum value of the value Y axis scale. The property is applicable only to value Y axis.
        Parameters:
        isAutomatic - the automatic option
        See Also:
        IsAutomaticMaximumValue(), setMaximumValue(double), getMaximumValue()
      • IsAutomaticMajorUnit

        public bool IsAutomaticMajorUnit()
        Returns the automatic option of the major unit of the value Y axis scale. The property is applicable only to value Y axis.
        Returns:
        true if the major unit of the value Y axis scale is set automatically, false otherwise
        See Also:
        setAutomaticMajorUnit(bool), setMajorUnit(double), getMajorUnit()
      • setAutomaticMajorUnit

        public void setAutomaticMajorUnit​(bool isAutomatic)
        Sets the automatic option of the major unit of the value Y axis scale. The property is applicable only to value Y axis.
        Parameters:
        isAutomatic - the automatic option
        See Also:
        IsAutomaticMajorUnit(), setMajorUnit(double), getMajorUnit()
      • IsAutomaticMinorUnit

        public bool IsAutomaticMinorUnit()
        Returns the automatic option of the minor unit of the value Y axis scale. The property is applicable only to value Y axis.
        Returns:
        true if the minor unit of the value Y axis scale is set automatically, false otherwise
        See Also:
        setAutomaticMinorUnit(bool), setMinorUnit(double), getMinorUnit()
      • setAutomaticMinorUnit

        public void setAutomaticMinorUnit​(bool isAutomatic)
        Sets the automatic option of the minor unit of the value Y axis scale. The property is applicable only to value Y axis.
        Parameters:
        isAutomatic - the automatic option
        See Also:
        IsAutomaticMajorUnit(), setMinorUnit(double), getMinorUnit()
      • IsAutomaticCategoryAxisCrossesValue

        public bool IsAutomaticCategoryAxisCrossesValue()
        Returns the automatic option of the crosses value of the category X axis. The property is applicable only to value Y axis.
        Returns:
        true if the crosses value of the category X axis is set automatically, false otherwise
        See Also:
        setAutomaticCategoryAxisCrossesValue(bool), setCrossValue(double), getCrossValue()
      • setAutomaticCategoryAxisCrossesValue

        public void setAutomaticCategoryAxisCrossesValue​(bool isAutomatic)
        Sets the automatic option of the crosses value of the category X axis. The property is applicable only to value Y axis.
        Parameters:
        isAutomatic - the automatic option
        See Also:
        IsAutomaticCategoryAxisCrossesValue(), setCrossValue(double), getCrossValue()
      • IsLogarithmicScale

        public bool IsLogarithmicScale()
        Returns true if the logarithmic scale is applied, false otherwise The property is applicable only to value Y axis.
        Returns:
        true if the logarithmic scale is applied, false otherwise
        See Also:
        setLogarithmicScale(bool)
      • setLogarithmicScale

        public void setLogarithmicScale​(bool isLogarithmicScale)
        Sets the logarithmic scale. The property is applicable only for value Y axis.
        Parameters:
        isLogarithmicScale - the logarithmic scale option
        See Also:
        IsLogarithmicScale()
      • IsReverseOrder

        public bool IsReverseOrder()
        Returns true if the values are in reverse order, false otherwise
        Returns:
        true if the values are in reverse order, false otherwise
        See Also:
        setReverseOrder(bool)
      • setReverseOrder

        public void setReverseOrder​(bool isReverseOrder)
        Sets the values in reverse order.
        Parameters:
        isReverseOrder - the reverse order option
        See Also:
        IsReverseOrder()
      • IsMaximumCross

        public bool IsMaximumCross()
        Returns true if the axis crosses at maximum value, false otherwise.
        Returns:
        true if the axis crosses at maximum value, false otherwise
        See Also:
        setMaximumCross(bool)
      • setMaximumCross

        public void setMaximumCross​(bool isMaximumCross)
        Sets the flag true if the axis crosses at maximum value, or false if it does not.
        Parameters:
        isMaximumCross - the maximum cross option
        See Also:
        IsMaximumCross()
      • getLabelFrequency

        public int getLabelFrequency()
        Returns the number of categories between tick-mark labels. The property is applicable only to category X axis.
        Returns:
        the number of categories between tick-mark labels
        See Also:
        setLabelFrequency(int)
      • setLabelFrequency

        public void setLabelFrequency​(int labelFrequency)
        Sets the number of categories between tick-mark labels. The property is applicable only for category X axis.
        Parameters:
        labelFrequency - the number of categories between tick-mark labels
        See Also:
        getLabelFrequency()
      • getTickMarksFrequency

        public int getTickMarksFrequency()
        Returns the number of categories between tick marks. The property is applicable only to category X axis.
        Returns:
        the number of categories between tick marks
        See Also:
        setTickMarksFrequency(int)
      • setTickMarksFrequency

        public void setTickMarksFrequency​(int tickMarksFrequency)
        Sets the number of categories between tick marks. The property is applicable only to category X axis.
        Parameters:
        tickMarksFrequency - the number of categories between tick marks
        See Also:
        getTickMarksFrequency()
      • IsCrossedBetweenCategories

        public bool IsCrossedBetweenCategories()
        Returns true if the value Y axis crosses between categories, false otherwise. The property is applicable only to category X axis.
        Returns:
        true if the value Y axis crosses between categories, false otherwise
        See Also:
        setCrossedBetweenCategories(bool)
      • setCrossedBetweenCategories

        public void setCrossedBetweenCategories​(bool between)
        Sets the flag true if the axis crosses between categories, or false if it does not. The property is applicable only to category X axis.
        Parameters:
        between - the between option
        See Also:
        IsCrossedBetweenCategories()
      • Clone

        public ExcelAxis Clone()
        Creates and returns a copy of this object.
        Returns:
        a clone of this instance.