Page 1 of 1

Histogram series like MACD

Posted: Mon Mar 16, 2009 6:16 pm
by 13048950
Hello,

I'm trying to use a Histogram series to create a display like the MACD Histogram where the bars are "anchored" to the zero line, and go up for positive and down for negative values.

Is there a way to do this with the Histogram series, or should I use Bars instead?

Thanks!

-pete-

Posted: Tue Mar 17, 2009 9:14 am
by 10050769
Hello Pete,
Is there a way to do this with the Histogram series, or should I use Bars instead?
Is not possible create an Histogram where the bars go up for positive and down for negative values, but you can produce same effect using Bars series, as you can see next code for example:

Code: Select all

        private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;
            Steema.TeeChart.Styles.Bar b = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
            b.Marks.Visible = false;
            b.Add(-5, -3);
            b.Add(-10, -9);
            b.Add(-13, -5);
            b.Add(-8, -10);
            b.Add(-7, -15);
            b.Add(-15, -8);
            b.Add( 5, 9);
            b.Add(4, 10);
            b.Add(8, 15);
            b.Add(12, 11);
            b.BarWidthPercent = 100;
        }
You set that if we use the SeriesBar, we must add property BarWidthPercent=100 for get same result that an Histogram.