Plotting Bitmaps on a Chart.

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

Plotting Bitmaps on a Chart.

Post by Snarkle » Fri Aug 13, 2010 5:07 am

Greetings,

I would like to plot many bitmaps on the Chart to annotate points of interest (I have icon markers for all sorts of interesting things on a Stock)... looking something like the following image .
Bitmap Question.png
Bitmap Question.png (16.41 KiB) Viewed 3659 times
I kind of asked this before and was directed here http://www.teechart.net/support/viewtopic.php?t=4309
But I cannot make heads nor tails out of that snippet .... how do you actually plot the images where you want them.
It made sense up until the point where FillSampleValues() was called. Kind of ...

i.e. how do you set an images x , y values so it appears in the correct place on the chart.

I'm guessing I dont plot them individually but they are part of a series ... if this is the case do they have to be all the same for that series ?? (I hope not)
Cheers Phil.
--------------------
Cheers Phil.

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

Re: Plotting Bitmaps on a Chart.

Post by Yeray » Fri Aug 13, 2010 3:49 pm

Hi Phil,

I'm not sure to understand what is your exact problem. If you know the X and Y values where you have to draw your images, you can use Add method of the ImagePoint series:

Code: Select all

            Steema.TeeChart.Styles.ImagePoint PntGreen = new Steema.TeeChart.Styles.ImagePoint(tChart1.Chart);
            Steema.TeeChart.Styles.ImagePoint PntPurple = new Steema.TeeChart.Styles.ImagePoint(tChart1.Chart);
            Steema.TeeChart.Styles.ImagePoint PntRed = new Steema.TeeChart.Styles.ImagePoint(tChart1.Chart);
            PntGreen.PointImage = Image.FromFile(@"C:\tmp\16_button_green.bmp");
            PntPurple.PointImage = Image.FromFile(@"C:\tmp\16_button_purple.bmp");
            PntRed.PointImage = Image.FromFile(@"C:\tmp\16_button_red.bmp");

            PntGreen.Add(5, 10);
            PntGreen.Add(10, 10);
            PntGreen.Add(15, 10);

            PntPurple.Add(3, 5);
            PntPurple.Add(5, 7);

            PntRed.Add(7, 5);
            PntRed.Add(12, 2);
Chart1.png
Chart1.png (32.28 KiB) Viewed 3650 times
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: Plotting Bitmaps on a Chart.

Post by Snarkle » Mon Aug 16, 2010 1:40 am

Thanks again Yeray,

I think I had a mental block with that one ... I dont understand my own question now ... ;-)
--------------------
Cheers Phil.

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

Re: Plotting Bitmaps on a Chart.

Post by Yeray » Mon Aug 16, 2010 8:47 am

Hi Snarkle,

:lol:
I'm glad to unblock it!
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