Custom Axis Label and Title display issues
Posted: Wed Apr 17, 2019 5:33 pm
Hi
I am a relative beginner with Tee Chart and am programming in C# and using TeeChart Pro V 4.2019.3.15. for .NET. I am doing most of the chart manipulation programmatically, rather than using the VS designer.
My problem is with custom axes. I initially set-up a basic chart with 1 series using the left and bottom axis and it displayed fine. As I need to use stacked charts I then switched to using creating a couple of custom axis and transferred the initialization I had done for the left axis to these axis. I am 80% of the way there but the chart's stacked axes are not displayed as expected, see below.
As you can see the labels are displayed in the default grey and I cannot get the axis caption to display in any colour! I have been trying since the end of last week at tweaking various attributes but nothing I do seems to effect the label and caption display.
My code loops through each custom axis I have created (I've checked there are only two defined) performing the following:
Axis objAxis = m_objChart.Axes.Custom[nTraceCount];
... set axis start/end position, visibility on, activate a series and associate it with this axes (all of which appear to be working)...
objAxis.Grid.Visible = true;
objAxis.Horizontal = false;
objAxis.Ticks.Color = Color.Black;
objAxis.MinorTicks.Color = Color.Black;
objAxis.Labels.Color = Color.Black;
objAxis.Title.Visible = true;
objAxis.Title.Color = Color.Black;
objAxis.Title.Caption = "Test Title";
So my questions are:
1) Is there something I need to do, beyond the setup required for a Left Axis, to allow the custom axis label defaults to be changed?
2) Why are neither of the custom axis title captions displayed?
3) Why is the chart clipping on the left-hand side - I have set the chart margins to 3% on all sides and the top, bottom and right margins appear to be correct.
4) Why are the custom axis lines not drawing?
5) The first and last grid lines for the Bottom Axis (Time) appear to have been omitted. I did not notice this when using a single series left/bottom axis chart. Is this because I am now using custom axis, and how do I get them back?
6) Is there an example of the programmatic setup of a stacked chart using custom axes you could link me to?
Any guidance you can give me will be greatly appreciated.
Many thanks in advance
Rob
I am a relative beginner with Tee Chart and am programming in C# and using TeeChart Pro V 4.2019.3.15. for .NET. I am doing most of the chart manipulation programmatically, rather than using the VS designer.
My problem is with custom axes. I initially set-up a basic chart with 1 series using the left and bottom axis and it displayed fine. As I need to use stacked charts I then switched to using creating a couple of custom axis and transferred the initialization I had done for the left axis to these axis. I am 80% of the way there but the chart's stacked axes are not displayed as expected, see below.
As you can see the labels are displayed in the default grey and I cannot get the axis caption to display in any colour! I have been trying since the end of last week at tweaking various attributes but nothing I do seems to effect the label and caption display.
My code loops through each custom axis I have created (I've checked there are only two defined) performing the following:
Axis objAxis = m_objChart.Axes.Custom[nTraceCount];
... set axis start/end position, visibility on, activate a series and associate it with this axes (all of which appear to be working)...
objAxis.Grid.Visible = true;
objAxis.Horizontal = false;
objAxis.Ticks.Color = Color.Black;
objAxis.MinorTicks.Color = Color.Black;
objAxis.Labels.Color = Color.Black;
objAxis.Title.Visible = true;
objAxis.Title.Color = Color.Black;
objAxis.Title.Caption = "Test Title";
So my questions are:
1) Is there something I need to do, beyond the setup required for a Left Axis, to allow the custom axis label defaults to be changed?
2) Why are neither of the custom axis title captions displayed?
3) Why is the chart clipping on the left-hand side - I have set the chart margins to 3% on all sides and the top, bottom and right margins appear to be correct.
4) Why are the custom axis lines not drawing?
5) The first and last grid lines for the Bottom Axis (Time) appear to have been omitted. I did not notice this when using a single series left/bottom axis chart. Is this because I am now using custom axis, and how do I get them back?
6) Is there an example of the programmatic setup of a stacked chart using custom axes you could link me to?
Any guidance you can give me will be greatly appreciated.
Many thanks in advance
Rob