Search
Labels on Axes

I. Radar Charts

Radar charts support unlimited number of axes. You add as many Axis instances as you want to see on the radar:

JavaScript  Copy Code

for (var i = 0; i < 8; i++) {
        var axis = new Charting.Axis();
        axis.title = "Axis " + (i + 1).toString();
        radarChart.axes.add(axis);
    }


Labels on radar chart axes are set with the title property of the axes. If you don't want a label just leave an empty string.

The labels on the scale of the main radar axes depend on the intervals. You set them this way:

JavaScript  Copy Code

radarChart.defaultAxis.minValue = 0;
radarChart.defaultAxis.maxValue = 55;

In case you don't want labels on this default axis just hide them:


JavaScript  Copy Code

radarChart.showCoordinates = false;

II. Axes and Labels on Axes That Use The Cartesian Coordinate System

By default each axis shows its scale, which is set with the minValue, maxValue and interval properties.

JavaScript  Copy Code

lineChart.xAxis.minValue = 1;
lineChart.xAxis.maxValue = 10;
lineChart.xAxis.interval = 1;

If you don't want to show these labels you can set

JavaScript  Copy Code

lineChart.showXCoordinates = false;

or

JavaScript  Copy Code

lineChart.showYCoordinates  = false;

If you are using an AxisRenderer the property is:

JavaScript  Copy Code

axisRenderer.showCoordinates = false;

1. Custom Labels in BarCharts

Charts that use the Cartesian coordinate system can show custom labels on all of their axis.


JavaScript  Copy Code

barSeries.xAxisLabels = new Collections.List([
        "one", "two", "three", "four", "five", "six",
        "seven", "eight", "nine", "ten", "eleven", "twelve"
    ]);

 
2. Custom Labels on Axes

You can set the labels from any series as labels on the axis using the supportedLabels property.

Let's assume you have created a Series2D like that:

JavaScript  Copy Code

var labels = new Collections.List([
        "one", "two", "three", "four", "five", "six",
        "seven", "eight", "nine", "ten", "eleven", "twelve"
    ]);

 var series1 = new Charting.Series2D(new Collections.List([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]), new Collections.List([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), labels);
    series1.title = "Series 1";

In order to show the labels on the Y-axis you should set:

JavaScript  Copy Code

series1.supportedLabels = Charting.LabelKinds.YAxisLabel;

Of course, to disable the scale labels add:

JavaScript  Copy Code

lineChart.showYCoordinates  = false;

BarSeries classes support special xAxisLabels property to set the labels under the bars:

JavaScript  Copy Code

var labels = new Collections.List([
        "one", "two", "three", "four", "five", "six",
        "seven", "eight", "nine", "ten", "eleven", "twelve"
    ]);

barSeries.xAxisLabels = labels;