Change the default image of imagepoint series

TeeChart for ActiveX, COM and ASP
Ashutosh
Newbie
Newbie
Posts: 49
Joined: Tue Nov 04, 2008 12:00 am

Change the default image of imagepoint series

Post by Ashutosh » Thu Dec 18, 2008 7:03 am

Hi, I am using 'TeeChart Pro Activex Control v8' I ahve put a imagepoint series on a chart, but the image which comes by default does not match the requirement. Could you please help me how to change this image with a new one.
Thanks and regards

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Dec 18, 2008 8:28 am

Hi Ashutosh,

Yes, you can do as shown here.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Ashutosh
Newbie
Newbie
Posts: 49
Joined: Tue Nov 04, 2008 12:00 am

Change the default image of imagepoint series

Post by Ashutosh » Thu Dec 18, 2008 8:40 am

Hi Narcis,
Thanks for the response.
Since i am working on a web application ImageList control is not available here to point a particular index to get an image. Please note that I am using VS2005 and C#. Please suggest the needful.
Regards
Ashutosh

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Dec 18, 2008 9:00 am

Hi Ashutosh,

In that case you can try using a System.Web.UI.WebControls.Image availble in Visual Studio's toolbox.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Ashutosh
Newbie
Newbie
Posts: 49
Joined: Tue Nov 04, 2008 12:00 am

Post by Ashutosh » Thu Dec 18, 2008 10:25 am

Hi Narcis,
Still in dialema how to assign image to the series where the method 'AssignImage' accepts only integer value in.
TChart1.Series(2).asImagePoint.ImagePoint.AssignImage().
Not sure how to assign a image value to it. If you see its definition : void AssignImage(int ImageHandle); It asks for an integer value as parameter. below is the code where i am trying to assign the image value and getting the following error:
TChart1.AddSeries(TeeChart.ESeriesClass.scLine);
TChart1.AddSeries(TeeChart.ESeriesClass.scLine);
TChart1.AddSeries(TeeChart.ESeriesClass.scImagePoint);
TChart1.Series(2).asImagePoint.ImagePoint.AssignImage(Img1);//Image control with the new image
Error:
Argument '1': cannot convert from 'System.Web.UI.WebControls.Image' to 'int'
Please help.

Regards
Ashutosh

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Dec 29, 2008 10:09 am

Hi Ashutosh,

I'm afraid this is not going to be possible to do by using the AssignImage method, as we're not able to get the handle (as integer) of the image.
So , the only way around would be to save the image as a file and then load it into the Series pointer :
axTChart1.Series(0).asImagePoint.ImagePoint.LoadImage(pictureBox1.Image.Save("c:\\temp\\image.bmp"));

Ashutosh
Newbie
Newbie
Posts: 49
Joined: Tue Nov 04, 2008 12:00 am

Post by Ashutosh » Wed Jan 21, 2009 2:36 pm

Hi Narcis,
Still struggling to change the imagepoint's default image. I have few other issues also on which I need your help:
1)How could I get the x,y coordinates of a series on mouse move on the chart.
2)I need the X axis value of the chart in datetime format as is being dispalyed on the axis label.
Since i am using the activex control so all the codes should be javascript/vbscript only.
Any refrence or sample code compatible for actives control would work.
Regards
Ashutosh

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Jan 21, 2009 2:54 pm

Hi Ashutosh,
1)How could I get the x,y coordinates of a series on mouse move on the chart.
You should use TeeChart's OnMouseMove event and use given X and Y arguments for calling series' Clicked method as shown here. Then you could retrieve series values like this:

Code: Select all

XVal = TChart1.Series(i).XValues.Value(TChart1.Series(i).Clicked(X, Y))
YVal = TChart1.Series(i).YValues.Value(TChart1.Series(i).Clicked(X, Y))
Alternatively you could do something as in the interpolating example I implemented here.
2)I need the X axis value of the chart in datetime format as is being dispalyed on the axis label.


In that case you should do something like this:

Code: Select all

    XDate = CDate(TChart1.Axis.Bottom.CalcPosPoint(X))
    YDate = CDate(TChart1.Axis.Left.CalcPosPoint(Y))
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Jan 27, 2009 10:55 am

Hi Ashutosh,

As this thread was already off the original topic I have splitted it into a new one for being easier to follow and keep thread consistency:

http://www.teechart.net/support/viewtopic.php?t=9121
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Ashutosh
Newbie
Newbie
Posts: 49
Joined: Tue Nov 04, 2008 12:00 am

Post by Ashutosh » Wed Jan 28, 2009 11:49 am

Pep wrote:Hi Ashutosh,

I'm afraid this is not going to be possible to do by using the AssignImage method, as we're not able to get the handle (as integer) of the image.
So , the only way around would be to save the image as a file and then load it into the Series pointer :
axTChart1.Series(0).asImagePoint.ImagePoint.LoadImage(pictureBox1.Image.Save("c:\\temp\\image.bmp"));
Hi Narcis,
The image file I already have as a file. I wish to use this image as the image point on the image point series as i have posted earlier.

Please help me with the code compatible with web application and activex control v8.
Thanks and regards
Ashutosh

Ashutosh
Newbie
Newbie
Posts: 49
Joined: Tue Nov 04, 2008 12:00 am

Post by Ashutosh » Thu Jan 29, 2009 6:40 am

Hi Narcis,
Adding more to my last post regarding the imagepoint series i wish to share an image of teechart activex control in actionhaving two types of images on it for your reference but not sure how to upload the same.
Could you please let me know any space where i could upload it.

Regards
Ashutosh

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jan 29, 2009 9:09 am

Hi Ashutosh,

You can post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Ashutosh
Newbie
Newbie
Posts: 49
Joined: Tue Nov 04, 2008 12:00 am

Post by Ashutosh » Thu Jan 29, 2009 9:23 am

Hi Narcis,
I have uploaded an image on the given location. Please have a look on it and suggest how the same can be achieved.

Please note that there are two different kinds of images visible on the chart with Teechart Activex control.

Thanks and regards
Ashutosh

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jan 29, 2009 9:55 am

Hi Ashutosh,

Thanks for the image. In that case you only need to use default pointer styles:

Code: Select all

    TChart1.AddSeries scPoint
    TChart1.Series(0).asPoint.Pointer.Style = psDiamond
    TChart1.Series(0).FillSampleValues 10
    
    TChart1.AddSeries scPoint
    TChart1.Series(1).asPoint.Pointer.Style = psDiagCross
    TChart1.Series(1).FillSampleValues 10
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Ashutosh
Newbie
Newbie
Posts: 49
Joined: Tue Nov 04, 2008 12:00 am

Post by Ashutosh » Mon Feb 02, 2009 4:47 am

Hi Narcis, Pep

This is to say you all thank you very much for your support and suggestions. This has been really a great pleasure to work with such support which you provide.

Thanks and regards
Ashutosh Prasad

Post Reply