Page 1 of 1

Point & Figure - can't populate the series ..

Posted: Fri Aug 06, 2010 5:50 am
by 8751509
Greetings,

I am trying to implement a Point & Figure Chart but I can't populate the series correctly.
The following code snippet based on the example works fine. FillSampleValues(500) gives me absolutely no idea to what is happening.

Code: Select all

PointFigure1.FillSampleValues(500);
            
PointFigure1.CloseValues = PointFigure1.YValues;
PointFigure1.DateValues = PointFigure1.XValues;
PointFigure1.XValues.DataMember = "index";
PointFigure1.XValues.Order = ValueListOrder.Ascending;
PointFigure1.YValues.DataMember = "close";
When I try to put my own data into the point and figure series it plots 1 circle. My data is standard OHLC read from a database.
example:

Cheers Phil.

Code: Select all

for (int index = 0; index < dataList.Count; index++)
    {
       double open = Convert.ToDouble(dataList[index].Open);
       double high = Convert.ToDouble(dataList[index].High);
       double low = Convert.ToDouble(dataList[index].Low);
       double close = Convert.ToDouble(dataList[index].Close);
       DateTime idate = dataList[index].Date;

       // Labels for the X axis.
       labels.Add(idate.ToShortDateString());

        // Add the data to the Series.
        PointFigure1.Add(index, open, high, low, close);
 }

 PointFigure1.CloseValues = PointFigure1.YValues;    
 PointFigure1.DateValues = PointFigure1.XValues;
 PointFigure1.XValues.DataMember = "index";
 PointFigure1.XValues.Order = ValueListOrder.Ascending;
 PointFigure1.YValues.DataMember = "close";

How do I set up a point and figure chart using my data in place of PointFigure1.FillSampleValues(500);
What should the last 5 lines of the above example code snippet look like.
If the above does not make sense then can you provide an example of usign the Point and Figure series NOT using FillSampleValues(500); and being populated manually.(much like I'm attempting)

Cheers Phil.

Re: Point & Figure - can't populate the series ..

Posted: Tue Aug 10, 2010 1:43 pm
by yeray
Hi Phil,

Here it is an example of populating a PointFigure series manually:
http://www.teechart.net/support/viewtop ... ointfigure

Re: Point & Figure - can't populate the series ..

Posted: Wed Aug 11, 2010 7:20 am
by 8751509
Thanks Yeray I found the problem (it was actually a too large box size) having a good example allowed me to rule out possibilities ..

NOW down to business ... please refer to the below image.
PointFigure Bug.png
Incorrect drawing of a point and figure.
PointFigure Bug.png (12.15 KiB) Viewed 5198 times
This looks like a bug ... in 1) alignment of the boxes (circles and X's) and 2) there are 'gaps' in the stacking.
If this is not actually a bug can you please tell me what settings would effect the Point and figure chart this way.

And just in case here's what Point and Figures traditionally look like ...
PointFigure Example.png
PointFigure Example.png (5.04 KiB) Viewed 5194 times
Cheers Phil.

P.S. Can't send an example application as TChart dies when I try and use design view something about the licenses.licx file.

Re: Point & Figure - can't populate the series ..

Posted: Fri Aug 13, 2010 7:03 pm
by yeray
Hi Snarkle,

I'm trying to reproduce it with the following code but I can't. Could you please change it so we can reproduce it here?

Code: Select all

        private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;

            Steema.TeeChart.Styles.PointFigure series1 = new Steema.TeeChart.Styles.PointFigure(tChart1.Chart);

            series1.Add(9, 10, 3, 5);
            series1.Add(9, 8, 5, 6);
            series1.Add(6, 8, 4, 5);
        }

Re: Point & Figure - can't populate the series ..

Posted: Mon Aug 16, 2010 12:32 am
by 8751509
Hi Yeray,

Not enough data for a series P&F Try this ...

Code: Select all

            StockChart.Aspect.View3D = false;

            Steema.TeeChart.Styles.PointFigure series1 = new Steema.TeeChart.Styles.PointFigure(StockChart.Chart);

            //series1.Add(9, 10, 3, 5);
            //series1.Add(9, 8, 5, 6);
            //series1.Add(6, 8, 4, 5);

            series1.FillSampleValues(1000); 
            series1.BoxSize = 20;
You'll see the graph render something like this.
PaFProblems.png
PaFProblems.png (5.21 KiB) Viewed 5133 times

Re: Point & Figure - can't populate the series ..

Posted: Mon Aug 16, 2010 9:04 am
by yeray
Hi Phil,

Thanks for the sample. Now I've reproduced it and added to the defect list to be fixed in future releases (TF02015088).