Point Image
Point Image
I need to show a point with attached shape. kindly confirm how can i implement this using teechart.
- Attachments
-
- Point shape
- 1.png (350 Bytes) Viewed 14586 times
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Point Image
You can use the image itself in an ImagePoint series, or draw it directly onto the canvas, e.g.amol wrote:I need to show a point with attached shape. kindly confirm how can i implement this using teechart.
Code: Select all
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
ImagePoint point = new ImagePoint(tChart1.Chart);
point.PointImage = Image.FromFile(@"C:\tmp\1.png");
point.Pointer.HorizSize = 30;
point.Pointer.VertSize = 20;
point.FillSampleValues();
tChart1.AfterDraw += tChart1_AfterDraw;
}
void tChart1_AfterDraw(object sender, Graphics3D g)
{
g.Draw(Utils.FromLTRB(10, 10, 70, 50), Image.FromFile(@"C:\tmp\1.png"), true);
}
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Point Image
I am not able to give the title of ImagePoint, plz answer this.
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Point Image
I'm not sure what the problem is here. The following code works as expected, with the series title being correctly displayed in the legend:amol wrote:I am not able to give the title of ImagePoint, plz answer this.
Code: Select all
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
ImagePoint point = new ImagePoint(tChart1.Chart);
point.PointImage = Image.FromFile(@"D:\tmp\1.png");
point.Pointer.HorizSize = 30;
point.Pointer.VertSize = 20;
point.FillSampleValues();
point.Title = "My Point";
tChart1.Legend.LegendStyle = LegendStyles.Series;
}
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Point Image
Hi ,
I have taken Point not taken ImagePoint and coded then how can i achieve this using Point. plz suggest.
I have taken Point not taken ImagePoint and coded then how can i achieve this using Point. plz suggest.
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Point Image
I'm sorry, I'm afraid I don't understand your request. Could you please provide some code to show me what you need?amol wrote:Hi ,
I have taken Point not taken ImagePoint and coded then how can i achieve this using Point. plz suggest.
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Point Image
You have taken ImagePoint point = new ImagePoint(tChart1.Chart) in your example but i have taken Point ps=new Point(). i want to achieve same functionality using Point how can i achieve this?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Point Image
Hello amol,
ImagePoint is the specific series style, which is derived from Points series, to plot images as pointers. If you don't want to use ImagePoint series you can achieve almost the same creating your own custom series, deriving it from Points series and overriding its drawing methods as in the example I posted here: http://www.teechart.net/support/viewtopic.php?t=4309
ImagePoint is the specific series style, which is derived from Points series, to plot images as pointers. If you don't want to use ImagePoint series you can achieve almost the same creating your own custom series, deriving it from Points series and overriding its drawing methods as in the example I posted here: http://www.teechart.net/support/viewtopic.php?t=4309
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |