Page 1 of 1

CustomAxis Both Side

Posted: Wed Feb 01, 2006 12:42 pm
by 9638762
how could i add CustomAxis(Vertical) that will be drawn both left and right side ...Here is my code:

Code: Select all

  Axis axis = new Axis(false, false, TChart1.Chart);
  axis.MinimumOffset = 5;
  axis.MaximumOffset = 10;
  axis.Grid.Visible = false;
  axis.Automatic = true;
  axis.Labels.Color = Color.Red;
  axis.Labels.Brush.Color = Color.Red;
  axis.Labels.CustomSize = 40;
  TChart1.Axes.Custom.Add(axis);
  Candle c = new Candle(TChart1.Chart);
  c.DataSource = .............;
  TChart1.Series.Add(c);
  c.CustomVertAxis = axis;

Posted: Wed Feb 01, 2006 1:41 pm
by narcis
Hi glikoz,

I'm afraid this not possible. To achieve that you could create a duplicate series being overlapped by your original series and set its CustomVertAxis being at the opposite side that the one of your original series.

Serious problem continues ...

Posted: Thu May 03, 2007 8:14 am
by 9638762
Custom axes that can be drawn both side is "must" for technical analysis application..
you wont give support about this subject so we try to create forced ways ..

We try to make "Ghost Axis" who responsible for the other side..
We extend Axis class and add this method

Code: Select all

 public void DoGetAxisDrawLabel_Public(object sender, ref int x, ref int y, ref int z, ref string text, ref bool drawlabel)
        {
            DoGetAxisDrawLabel(sender,ref x,ref y,ref z,ref text,ref drawlabel);

        }
After do that we add this method also

Code: Select all

 protected override void DoGetAxisDrawLabel(object sender, ref int x, ref int y, ref int z, ref string text, ref bool drawlabel)
        {
            if (childAxis!=null && childAxis.isGhost)
            {
                int a=x-950;
                int b=y;
                    childAxis.DoGetAxisDrawLabel_Public(childAxis,ref  a,ref  b,ref  z,ref  text,ref  drawlabel);
            }
As you guess , real axis (that has series) has relationship with "ghost axis" by childAxis property ..
But these codes couldnt resolve problem we couldnt show labels on ghost axis..

We avoid to make "ghost series" because its maintanence cost is more than this solution ..But it seems this solution is not work ..Do you have any other idea or whats the wrong with these codes ..

And i say again and again if you produce "technical analysis application"
you need Multiple,Both Side Drawable Custom Axes !

Posted: Thu May 03, 2007 11:04 am
by narcis
Hi glikoz,

Steema cannot commit to supporting changes to the sourcecode version but if you are able to reproduce any issue in the binary version or make any suggestion for change to it we will be happy to respond or act upon the suggestion.

I'll also add your feature request to our wish-list to be considered for inclusion in future releases.

BTW: In case you don't need more than 2 vertical axes you can use left and right axes to achieve what you request. For example:

Code: Select all

		line1.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Both;