|
Yes I know. I have used the same trick my-self. However I do not feel that this is the correct way to do it. I am still looking into the issue, although it is not a top priority
|
|
|
|
|
Solution for corret re-paint:
- in method CXGraph::OnPaint call second (modified) constructor of class CMemDC,
- create constructor CMemDC(CDC* pDC, CRect wndRect) : CDC()
>> 2nd parameter wndRect contain size of client window
In example used constructor call method GetClipBox, which always set RECT components
to 0. So in the end CopatibleBitmap will be size of 0,0.
Izidor
|
|
|
|
|
I understand that you are providing the solution, however I am not sure I can follow your instructions. Would you be so kind to give the modified code for the OnPaint ?
Hope that you will find the time to help once more
Warm regards
Pothitos M. Baikas
|
|
|
|
|
I think this is what he means:
XGRAPH.cpp around line 664:
CXGraph::OnPaint
{
...
if (m_bDoubleBuffer)
{
>>> // MMM
CRect empty, client;
GetClientRect( client );
empty.SetRectEmpty();
pmdc = new CMemDC(pdc, empty, client);
instead of:
//pmdc = new CMemDC(pdc);
|
|
|
|
|
Hi,
Two document with a separate Graph view but when one view changed, the other document view are affected too.
Each document I created a new object of m_Graph using new TDataPoint, but some how they still shared the memory.
Is there a solution to this?
|
|
|
|
|
There is a bug in control.
It seems it goes in infinite loop when small numbers are used for 1 ais and large numbers for another.
Has anybody already found a solution?
Alex
|
|
|
|
|
Need to show very small numbers.
However in the bug fixes (17 Apr 2002 1.02) is mentioned that "Values greater/less 10E6/10E-6 are now automatically shown in exponential format", There is a problem with showing them.
INITIALLY numbers on the axes are NOT shown in exponential form, so you can see 0. insteed of 1.e-5.
If I change anything (it can be than set back) on the Axis tab of chart dialog just to enable Apply button and Apply “changes”, numbers appears properly.
It looks like that some members are not initiated properly. Failed to find which function should be called to fix the problem.
Any help is appreciated. Thank you in advance,
AlexM
|
|
|
|
|
I manage to use it without much problem. I had one quetion about printing. just wondering why one of my PC can print color while another is Black and white?. Both are network into same printer. Is there anything I missed out?
|
|
|
|
|
Hi there,
I try to use SetData on an X-Axis with an time format.
Exampe: Starting time is 12:30, Ending time 13:00. No date is needed. I will have about 180 datapoints which I have to plot.
I looked through the example. I dont get it.
Can someone please help me.
Thanks. Rudolf.
|
|
|
|
|
Why the warning like this happened??..
-----------------------------------------------------------------------------------------------------------
Automatically linking with XGraph10d.dll
c:\program files\microsoft visual studio\vc98\include\vector(420) : warning C4786: 'std::reverse_iterator<std::vector<unsigned char,std::allocator<unsigned="" int=""> >::const_iterator,unsigned char,std::vector<unsigned char,std::allocator<unsigned="" int=""> >
::reference const ,std::vector<unsigned char,std::allocator<unsigned="" int=""> >::reference const *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\utility(138) : warning C4786: 'reverse_iterator<std::vector<unsigned char,std::allocator<unsigned="" int=""> >::const_iterator,unsigned char,std::vector<unsigned char,std::allocator<unsigned="" int=""> >::re
ference const ,std::vector<unsigned char,std::allocator<unsigned="" int=""> >::reference const *,i' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\utility(138) : while compiling class-template member function '__thiscall std::reverse_iterator<class std::vector<unsigned="" char,class="" std::allocator<unsigned="" int=""> >::const_iterator,unsign
ed char,class std::vector<unsigned char,class="" std::allocator<unsigned="" int=""> >::reference const ,class std::vector<unsigned char,class="" std::allocator<unsigned="" int=""> >::reference const *,int>::std::reverse_iterator<class std::vector<unsigned="" char,class=""
std::allocator<unsigned="" int=""> >::const_iterator,unsigned char,class std::vector<unsigned char,class="" std::allocator<unsigned="" int=""> >::reference const ,class std::vector<unsigned char,class="" std::allocator<unsigned="" int=""> >::reference const *,int>(class st
d::vector<unsigned char,class="" std::allocator<unsigned="" int=""> >::const_iterator)'
c:\program files\microsoft visual studio\vc98\include\utility(138) : warning C4786: 'std::reverse_iterator<std::vector<unsigned char,std::allocator<unsigned="" int=""> >::const_iterator,unsigned char,std::vector<unsigned char,std::allocator<unsigned="" int="">
>::reference const ,std::vector<unsigned char,std::allocator<unsigned="" int=""> >::reference const *,int>' : identifier was truncated to '255' characters in the debug information
c:\program files\microsoft visual studio\vc98\include\utility(138) : while compiling class-template member function '__thiscall std::reverse_iterator<std::vector<unsigned char,std::allocator<unsigned="" int=""> >::const_iterator,unsigned char,std:
:vector<unsigned char,std::allocator<unsigned="" int=""> >::reference const ,std::vector<unsigned char,std::allocator<unsigned="" int=""> >::reference const *,int>::std::reverse_iterator<std::vector<unsigned char,std::allocator<unsigned="" int=""> >::const_iterator,u
nsigned char,std::vector<unsigned char,std::allocator<unsigned="" int=""> >::reference const ,std::vector<unsigned char,std::allocator<unsigned="" int=""> >::reference const *,int>(std::vector<unsigned char,std::allocator<unsigned="" int=""> >::const_iterator)'
|
|
|
|
|
This message occurs 'cos of STL usage and the compiler can't handle long identifiers correctly. This is not a problem. Use #pragma warning (disable : 4786) to get rid of it.
|
|
|
|
|
Can someone please explain how FitTimeScale method (GraphAxis) works?
I am trying to find out by looking at the source code, but it seems I am missing something. The most troubling part is the "double *fStepWidth" and the "int nBestCount".
Any ideas shall be appreciated
|
|
|
|
|
Just a "getting started" question. I have a C++ dialog already in which I want to use the graph control. What steps do I need to take to make this happen?
cjm
|
|
|
|
|
Hi there,
I have two things to ask. First, I've found a bug in the demo application which is reproducable in my own implementation. Launch the xgraphdemo application. Right click on the chart to bring up the pop-up menu, and select pan. Move the chart any way to like, and, right click on the chart again. Instand crash (for me).
Second, how is this control licensed? I'm contemplating using it in an application and would like to know the conditions under which I may do so.
|
|
|
|
|
hi,
is it possible to rescale only the y axis for a new cureve? this way the x axis reamins the same, and is useful for viewing eg, f(x) and df(x)/dx , as the values of x are on a vertical line
|
|
|
|
|
Hi!
When I give a graph a new value, so give him a new dataseries with one more value, the XGraph autoscales it. It does so even when the user has turned autoscaling off before.
How can I set autoscaling off even when new values, and with that the whole dataseries, has to be redrawn?
Thanks!
Marc
|
|
|
|
|
Hi there,
I have a problem with the control. When I add labels to the plot and have one label selected before I redraw the plot (calling ResetAll and adding new data series) the program crashed with an Unhandled Exception: Access Violation.
The Release version crashes by saying that Instruction at "XXX" tried to access memory at "XXXX", and that the memory couldn't be read.
When it crashes it is in the CRectTracker::HitTestHandles method.
I have found out that all I have to do before redrawing is make sure that no label is selected. Does anybody know how to do that, to unselect all labels?
Also I would like to know if there is a way to call the properties box by a method instead of just by doubleclicking on the chart or axis or curve.
|
|
|
|
|
Hi!
I'm using this exellent tool in a dialog-based project.
In an OnButton-function I open a new dialog and draw the chart that is requested.
An OnCancel-function in the opened dialog closes this dialog including the chart.
So I'm back in my original calling function of my main dialog.
Now, when this calling function finishes, the application crashes.
This only happens when I use the release-build. in debug mode, everything works fine.
I think I do not clean up the chart in a valid way, but I do not know how to do it better.
Any hint what to do?
Thanks!
Marc
|
|
|
|
|
Try to call the ResetAll() in the OnCancel method.
|
|
|
|
|
I'm doing this already.
The thing I'm confused about is mainly, that the crash only happens in the release version. The debug version shows nothing unexpected.
Thanks anyway!
Marc
|
|
|
|
|
Hi,
I do not have an answer to your question yet, I was was just wondering how you went about integrating the chart in a dialog.
Thx!
/Tommy
|
|
|
|
|
Hi there,
I have used this wonderful DLL in a program. In order to activate the cursor funtion I call the Cursor() function from a button. But the first time I call the Cursor method in runtime the graph moves along with the cursor, only if I press the right mouse button once it stops moving. Does anybody know about this problem and have a solution?
|
|
|
|
|
how to add bar graph / cnadlesticks ?
|
|
|
|
|
|
I have problems with when I use the cursor on a graph.
First, on some points, there are recognized when the cursor is not really on the point.
Then, there are some points which are not recognized by the cursor. I thought it was a problem of scale but even when I use the zoom, these points are not recognized. However, when I select the point ( not in cursor mode, it's recognized(a hand appears)).
Thanks you to anyone who will able to solve my problem.
Seb
|
|
|
|
|