TeeChart for ActiveX, COM and ASP
-
jti
- Newbie
- Posts: 17
- Joined: Fri Nov 15, 2002 12:00 am
-
Contact:
Post
by jti » Tue Jul 02, 2013 12:43 am
Is it possible to import a graphics file and display the file using TeeChart? By a graphics file I do
not mean a tee file. I am using MFC and MDI. I envision a template which opens files and displays the file in class derived from CView, with code something like this:
Code: Select all
CFileDialog dlg( OPEN, _T("emf wmf jpg png bmp gif"), _T("*.emf; *.wmf; *.jpg; *.png; *.bmp; *.gif"),
OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_ENABLESIZING | OFN_EXPLORER,
_T("Graphics Files|*.emf; *.wmf; *.jpg; *.png; *.bmp; *.gif|"));
if (dlg.DoModal() != IDOK || dlg.GetPathName().GetLength() == 0) // Ensure the length of the filename is valid.
{
return;
}
CString csFile = dlg.GetPathName();
m_Chart1.GetImport().LoadFromFile(csFile);
-
Yeray
- Site Admin
- Posts: 9613
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Tue Jul 02, 2013 12:57 pm
Hi,
And what would you expect TeeChart to draw when the image is loaded?
If you want to show the image in the background, you could load it in the panel or in the back wall. Something like this:
- flower.png (299.99 KiB) Viewed 8014 times
If you want to load the image in a series, you may want to do something like in the image below. We did this example with TeeChart Java for Android:
- bahfbfga.png (355.34 KiB) Viewed 8009 times
-
jti
- Newbie
- Posts: 17
- Joined: Fri Nov 15, 2002 12:00 am
-
Contact:
Post
by jti » Tue Jul 02, 2013 3:27 pm
Display the image and print the image. I will look into putting it on the back wall or panel.