Problem in axis title
Posted: Mon Jul 28, 2008 9:02 am
Hi,
I am mapping tchart.Axes.Left axis and adding custom labels to it.
Problem:
1) The formatting which is applying on custom label, same are also get
applied on axis title. Title should be of differently formatted.
2) Title almost coming nearby or on the axis. It should be away from axis
labels.
Here is code:
Axis ZAxis = tchart.Axes.Left;
ZAxis.Title.Text = "Test";
ZAxis.Title.Font.Name = "Arial";
ZAxis.Title.Font.Size = 20;
ZAxis.Title.Font.Color = Color.Blue;
ZAxis.Title.TextAlign = StringAlignment.Center;
ZAxis.SetMinMax(0,100);
ZAxis.Labels.Items.Clear();
double start = 0.0;
double end = 100.0;
double majorGridPoint = 10.0;
int labelItemNo = 0;
while (start <= end)
{
ZAxis.Labels.Items.Add(start);
ZAxis.Labels.Items[labelItemNo].Font.Name = "ArialBlack";
ZAxis.Labels.Items[labelItemNo].Font.Size = 10;
ZAxis.Labels.Items[labelItemNo].Font.Color = Color.Green;
ZAxis.Labels.Items[labelItemNo].Font.Bold = true;
start = start + majorGridPoint;
labelItemNo++;
}
Note: Same code is working for tchart.Axes.Bottom and tchart.Axes.Depth
Thanks,
-Raed
I am mapping tchart.Axes.Left axis and adding custom labels to it.
Problem:
1) The formatting which is applying on custom label, same are also get
applied on axis title. Title should be of differently formatted.
2) Title almost coming nearby or on the axis. It should be away from axis
labels.
Here is code:
Axis ZAxis = tchart.Axes.Left;
ZAxis.Title.Text = "Test";
ZAxis.Title.Font.Name = "Arial";
ZAxis.Title.Font.Size = 20;
ZAxis.Title.Font.Color = Color.Blue;
ZAxis.Title.TextAlign = StringAlignment.Center;
ZAxis.SetMinMax(0,100);
ZAxis.Labels.Items.Clear();
double start = 0.0;
double end = 100.0;
double majorGridPoint = 10.0;
int labelItemNo = 0;
while (start <= end)
{
ZAxis.Labels.Items.Add(start);
ZAxis.Labels.Items[labelItemNo].Font.Name = "ArialBlack";
ZAxis.Labels.Items[labelItemNo].Font.Size = 10;
ZAxis.Labels.Items[labelItemNo].Font.Color = Color.Green;
ZAxis.Labels.Items[labelItemNo].Font.Bold = true;
start = start + majorGridPoint;
labelItemNo++;
}
Note: Same code is working for tchart.Axes.Bottom and tchart.Axes.Depth
Thanks,
-Raed