Page 1 of 2
Change the default image of imagepoint series
Posted: Thu Dec 18, 2008 7:03 am
by 13050730
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
Posted: Thu Dec 18, 2008 8:28 am
by narcis
Hi Ashutosh,
Yes, you can do as shown
here.
Change the default image of imagepoint series
Posted: Thu Dec 18, 2008 8:40 am
by 13050730
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
Posted: Thu Dec 18, 2008 9:00 am
by narcis
Hi Ashutosh,
In that case you can try using a System.Web.UI.WebControls.Image availble in Visual Studio's toolbox.
Posted: Thu Dec 18, 2008 10:25 am
by 13050730
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
Posted: Mon Dec 29, 2008 10:09 am
by Pep
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"));
Posted: Wed Jan 21, 2009 2:36 pm
by 13050730
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
Posted: Wed Jan 21, 2009 2:54 pm
by narcis
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))
Posted: Tue Jan 27, 2009 10:55 am
by narcis
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
Posted: Wed Jan 28, 2009 11:49 am
by 13050730
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
Posted: Thu Jan 29, 2009 6:40 am
by 13050730
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
Posted: Thu Jan 29, 2009 9:09 am
by narcis
Hi Ashutosh,
You can post your files at news://
www.steema.net/steema.public.attachments newsgroup or at our
upload page.
Thanks in advance.
Posted: Thu Jan 29, 2009 9:23 am
by 13050730
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
Posted: Thu Jan 29, 2009 9:55 am
by narcis
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
Posted: Mon Feb 02, 2009 4:47 am
by 13050730
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