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

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Snarkle
Newbie
Newbie
Posts: 91
Joined: Wed Jun 30, 2010 12:00 am

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

Post by Snarkle » Fri Aug 06, 2010 5:50 am

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.
--------------------
Cheers Phil.

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

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

Post by Yeray » Tue Aug 10, 2010 1:43 pm

Hi Phil,

Here it is an example of populating a PointFigure series manually:
http://www.teechart.net/support/viewtop ... ointfigure
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Snarkle
Newbie
Newbie
Posts: 91
Joined: Wed Jun 30, 2010 12:00 am

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

Post by Snarkle » Wed Aug 11, 2010 7:20 am

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 5194 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 5190 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.
--------------------
Cheers Phil.

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

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

Post by Yeray » Fri Aug 13, 2010 7:03 pm

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);
        }
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Snarkle
Newbie
Newbie
Posts: 91
Joined: Wed Jun 30, 2010 12:00 am

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

Post by Snarkle » Mon Aug 16, 2010 12:32 am

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 5129 times
--------------------
Cheers Phil.

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

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

Post by Yeray » Mon Aug 16, 2010 9:04 am

Hi Phil,

Thanks for the sample. Now I've reproduced it and added to the defect list to be fixed in future releases (TF02015088).
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply