Page 1 of 1
Unable to change fontsize in the depth axis
Posted: Wed Jul 12, 2006 5:15 pm
by 9641347
I am unable to change the fontsize in the depth axis of a Waterfall 3D series changing the property:
Steema.Teechart.DepthAxis.Labels.Font.Size
Is that a bug?
Thanks
Posted: Thu Jul 13, 2006 10:25 am
by narcis
Hi inma,
It works fine here using latest TeeChart for .NET v2 version and this code:
Code: Select all
tChart1.Axes.Depth.Visible = true;
tChart1.Axes.Depth.Labels.Font.Size = 12;
tChart1.Axes.DepthTop.Visible = true;
tChart1.Axes.DepthTop.Labels.Font.Size = 12;
Which TeeChart version are you using?
Posted: Thu Jul 13, 2006 11:27 am
by 9641347
Hi Narcis,
Your code works fine, but my problem comes up loading custom labels. I have the latest TeeChart for .NET v2 version:
The following code adds some labels to the depth axis and tries to change the font size, but doesn't work:
Code: Select all
double[] x = new double[] { 1, 2, 1, 2 };
double[] y = new double[] { 1, 1, 2, 2 };
double[] z = new double[] { 1, 1, 2, 2 };
double[] Zpoints = new double[] { 1, 2 };
string[] Zlabels = new string[] { "a", "b" };
Waterfall series = new Waterfall();
tChart1.Series.Add(series);
series.Add(x, y, z);
for (int i = 0; i < Zpoints.Length; i++)
tChart1.Axes.Depth.Labels.Items.Add(Zpoints[i], Zlabels[i]);
tChart1.Axes.Depth.Visible = true;
tChart1.Axes.Depth.Labels.Visible = true;
tChart1.Axes.Depth.Labels.Font.Size = 26;
Thanks for your help,
Posted: Thu Jul 13, 2006 1:26 pm
by narcis
Hi inma,
Ok, when using custom labels you need to add them as shown here:
Code: Select all
private void Form1_Load(object sender, EventArgs e)
{
double[] x = new double[] { 1, 2, 1, 2 };
double[] y = new double[] { 1, 1, 2, 2 };
double[] z = new double[] { 1, 1, 2, 2 };
double[] Zpoints = new double[] { 1, 2 };
string[] Zlabels = new string[] { "a", "b" };
Waterfall series = new Waterfall();
tChart1.Series.Add(series);
series.Add(x, y, z);
for (int i = 0; i < Zpoints.Length; i++)
tChart1.Axes.Depth.Labels.Items.Add(Zpoints[i], Zlabels[i]).Font.Size=26;
tChart1.Axes.Depth.Visible = true;
tChart1.Axes.Depth.Labels.Visible = true;
//tChart1.Axes.Depth.Labels.Font.Size = 26;
}
Posted: Fri Jul 14, 2006 9:03 am
by 9641347
Thanks a million.