<< Click to Display Table of Contents >> AddXLabel |
[ActiveX, .NET, Java, PHP, etc., method of the TVPEChartData object]
Adds a new X-Label to the chart. By default, the x-axis is automatically labeled. With ChartXLabelState() you can switch to user defined labels and then add X-Labels to the chart. (see also ChartXLabelStartValue)
method void TVPEChartData.AddXLabel(
string XLabel
)
string XLabel
string of label to add
Remarks:
You can control if, how and on what position y-labels are drawn with the following properties:
Example:
dim Data as TVPEChartData
Data = Doc.ChartDataCreate(2, 4)
Creates a ChartData object with two columns (for example Apples and Bananas), where each column can hold 4 numeric data values ( = rows).
Data.AddValue(0, 10)
Data.AddValue(0, 20)
Data.AddValue(0, 30)
Data.AddValue(0, 40)
Data.AddValue(1, 5)
Data.AddValue(1, 10)
Data.AddValue(1, 15)
Data.AddValue(1, 20)
Data.AddLegend("Apples")
Data.AddLegend("Bananas")
Now the internal data table of the Chart Data object will look like this:
|
Column 0 "Apples" |
Column 1 "Bananas" |
row 0 |
10 |
5 |
row 1 |
20 |
10 |
row 2 |
30 |
15 |
row 3 |
40 |
20 |
With the following code
Doc.ChartXLabelState = ChartLabelState.User
Data.AddXLabel("1. Quarter")
Data.AddXLabel("2. Quarter")
Data.AddXLabel("3. Quarter")
Data.AddXLabel("4. Quarter")
the internal data table of the Chart Data object will look like this:
Column 0 "Apples" |
Column 1 "Bananas" |
|
row 0 "1. Quarter" |
10 |
5 |
row 1 "2. Quarter" |
20 |
10 |
row 2 "3. Quarter" |
30 |
15 |
row 3 "4. Quarter" |
40 |
20 |