Axes Labels
Posted: Tue Jun 23, 2009 11:15 am
Hi,
I'm trying to make a bar chart with text labels on the left axis. But when i resize the window the label font size is not adjusted. Is there a solution for this problem?
Here is some sample code i'm using:
InitializeComponent();
chartController1.Chart = tChart1;
tChart1.Aspect.View3D = false;
this.tChart1.Chart.Legend.Visible = false;
this.tChart1.Chart.Axes.Bottom.Visible = false;
horizBar1 = new Steema.TeeChart.Styles.HorizBar(this.tChart1.Chart);
horizBar1.Marks.Style = Steema.TeeChart.Styles.MarksStyles.Percent;
tChart1.Axes.Left.Labels.Align = Steema.TeeChart.AxisLabelAlign.Opposite;
horizBar1.Add(150, "bar label 1",Color.Red);
horizBar1.Add(120, "bar label 2", Color.Black);
horizBar1.Add(100, "bar label 3", Color.Blue);
horizBar1.Marks.Visible = false;
this.tChart1.Chart.Axes.Left.Labels.AutoSize = true;
horizBar1.YValues.Order = Steema.TeeChart.Styles.ValueListOrder.Ascending;
this.tChart1.Walls.Visible = false;
this.tChart1.Chart.Series.Add(horizBar1);
When resizing the window the label text size is not changed. I would like to have the font size of the labels smaller when the window size gets smaller.
I also tried it with: (tChart1.Axes.Left.Labels.Items.Add(2, "bar label 1")).Font.Size = 16;
But then i need to recalculate the font size manually in the SizeChanged event?
I'm trying to make a bar chart with text labels on the left axis. But when i resize the window the label font size is not adjusted. Is there a solution for this problem?
Here is some sample code i'm using:
InitializeComponent();
chartController1.Chart = tChart1;
tChart1.Aspect.View3D = false;
this.tChart1.Chart.Legend.Visible = false;
this.tChart1.Chart.Axes.Bottom.Visible = false;
horizBar1 = new Steema.TeeChart.Styles.HorizBar(this.tChart1.Chart);
horizBar1.Marks.Style = Steema.TeeChart.Styles.MarksStyles.Percent;
tChart1.Axes.Left.Labels.Align = Steema.TeeChart.AxisLabelAlign.Opposite;
horizBar1.Add(150, "bar label 1",Color.Red);
horizBar1.Add(120, "bar label 2", Color.Black);
horizBar1.Add(100, "bar label 3", Color.Blue);
horizBar1.Marks.Visible = false;
this.tChart1.Chart.Axes.Left.Labels.AutoSize = true;
horizBar1.YValues.Order = Steema.TeeChart.Styles.ValueListOrder.Ascending;
this.tChart1.Walls.Visible = false;
this.tChart1.Chart.Series.Add(horizBar1);
When resizing the window the label text size is not changed. I would like to have the font size of the labels smaller when the window size gets smaller.
I also tried it with: (tChart1.Axes.Left.Labels.Items.Add(2, "bar label 1")).Font.Size = 16;
But then i need to recalculate the font size manually in the SizeChanged event?