EasyXLS

Value Y axis

Concept

The Y axis is usually the vertical axis and displays the values of the chart.

EasyXLS™ library allows setting the chart values, axis options and formatting the axis.

The axis formatting is formed by number format, font settings, fill settings, line style settings, line color settings, shadow settings, 3D-format and alignment settings.

Concept in action

The below example shows how to format the value axis for an Excel file.

Source code sample

C#.NET
VB.NET
C++.NET
J#.NET
Java
PHP
ASP
C++
VB6
VBS
Coldfusion

The screen shot provides an example of a cylinder chart. The Y axis is formatted: line-color (steel blue), line-style (medium gray), line-width and foreground (blue).

Excel chart value axis

Y axis values

The values for Y axis can be set through series values using ExcelChart.easy_addSeries method. Also, as showed in the above tutorial, the series can be automatically built from the data source when the chart sheet is added to the workbook.

Value Y axis title

The axis can have an assigned title that explains the meaning of the axis using ExcelAxis.setAxisTitle method. The title includes the name of the axis and formatting options.

Value Y axis options

EasyXLS library allows you to set different axis options like:

   - Interval between tick marks
   - Interval between labels
   - Categories in reverse order
   - Major tick mark type
   - Minor tick mark type
   - Axis labels settings
   - Vertical axis crosses settings
   - Position axis settings

The goal can be achieved using various methods from ExcelAxis class.

Axis number format

EasyXLS allows you to set the number format of the axis labels by means of ExcelAxis.setNumberFormat method. The number format can also be linked to the number format of the data source.

Axis font settings

EasyXLS allows you to set the font appearance of the axis through the usage of FontDrawingObject.getFontFormat method that is available in ExcelAxis class because of the class inheritance.
The supported font settings are:
   - Font name
   - Font style (bold, italic, regular)
   - Font size
   - Font color
   - Font underline style
   - Font effect (strikethrough, superscript, subscript, offset, small caps)

Axis fill formatting

EasyXLS allows you to set the background appearance of the chart axis through the usage of FillDrawingObject.getFillFormat method that is available in ExcelAxis class because of the class inheritance.

The supported fill options are:
   - No fill
   - Solid fill (axis color, axis transparency)
   - Gradient fill
   - Picture and texture fill
   - Automatic

Axis line color formatting

EasyXLS allows you to set the line color appearance of the chart axis through the usage of LineDrawingObject.getLineColorFormat method that is available in ExcelAxis class because of the class inheritance.

The supported line color options are:
   - No line
   - Solid line (axis line color)
   - Gradient line
   - Automatic

Axis line style formatting

EasyXLS allows you to set the line style of the chart axis through the usage of LineDrawingObject.getLineStyleFormat method that is available in ExcelAxis class because of the class inheritance.

The supported border style options are:
   - Line width
   - Compound type
   - Dash type
   - Cap type
   - Join type
   - Arrow settings

Axis shadow formatting

EasyXLS allows you to set the shadow appearance of the chart axis through the usage of LineDrawingObject.getShadowFormat method that is available in ExcelAxis class because of the class inheritance.

The supported shadow options are:
   - Preset shadows
   - Shadow color
   - Transparency, size, blur, angle and distance

Axis 3D formatting

EasyXLS allows you to set the 3D appearance of the chart axis through the usage of EffectDrawingObject.get3DFormat method that is available in ExcelAxis class because of the class inheritance.

The supported 3D options are:

   - Surface settings (material and lighting)

Axis alignment formatting

EasyXLS allows you to set the alignment of the chart axis through the usage of AlignDrawingObject.getAlignmentFormat method that is available in ExcelAxis class because of the class inheritance.

The supported alignment options are:
   - Horizontal alignment
   - Text direction
   - Rotation of the text

 

Available for: Professional, Excel Writer, Excel Reader
Go to top

EasyXLS Excel libraries:

.NET
.NET Excel Library
full .NET version to import, export or convert Excel files
.NET Excel Writer
.NET version to create and export Excel files
.NET Excel Reader
.NET version to read and import Excel files
-
Java
Java Excel Library
full Java version to import, export or convert Excel files
Java Excel Writer
Java version to create and export Excel files
Java Excel Reader
Java version to read and import Excel files
Download EasyXLS™ Excel Library for .NET and Java

File formats:

MS Excel 97 - 2003
MS Excel 2007 - 2010
MS Excel 2013
MS Excel 2016
MS Excel 2019
XLSX XLSM XLSB XLS
XML HTML CSV TXT