|
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
|
|
|
|
|
any Idea how to set Legend on the Bottom of the Graph correct
Here is my code
if (m_LegendAlignment == bottom)
{
legendRect.SetRect (ChartRect.left + 10, ChartRect.top + 10, ChartRect.left + 10 + nLegendWidth,ChartRect.top + 12 + nLegendHeight);
ChartRect.bottom += (nLegendWidth + 20);
}
but when the size of the Legend different I get missing Legend in the Graph
|
|
|
|
|
to place the legend under the graph, you need to add 10 to the ChartRect.bottom. You've been adding 10 to the ChartRect.top, which would place the legend in the middle of the graph.
clintMonari
|
|
|
|
|
I am having trouble with the pan mode. I am not using the right click pop-up menu for the commands, instead I have a toolbar with IDM_PAN IDM_ZOOM etc buttons. When I click the pan button, I am able to pan correctly. The problem is that after I get out of the pan mode by either a zoom or a reset command, the graph continues to pan with every mouse movement. Any help will be appreciated.
Thanks
|
|
|
|
|
Hi All,
Was the ACtiveX versio of this control ever distributed?
Dave
|
|
|
|
|
I use these to line in my program for using date and time in X axis
m_Graph.GetXAxis (m_nAxes).SetDateTime(TRUE);
m_Graph.GetXAxis (m_nAxes).SetDisplayFmt("%d.%m.%Y\r\n%H:%M:%S");
but it is not successfull becuase m_fStep is a very large number.
Could anybody help me?
|
|
|
|
|
Hi,
Firstly I want to thank Gunnar to share this control with all of us. My problem is: I've been trying to incorporate it to my MDI program and all is ok in DEBUG mode but not in RELEASE. I think the problem is when CMDIChildWindow tries to create the frame but I'm not sure.
Here is the declaration and creation of Template:
pDocTemplate = new CMultiDocTemplate(
IDR_DOCTYPE,
RUNTIME_CLASS(CTransCommand),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(CXGraphTestView));
AddDocTemplate(pDocTemplate);
//I store it in a var
CMultiDocTemplate m_plantillaXGrafico = pDocTemplate;
and here is the error, when I try to create a new child window (This piece of code is called when a button on bar of the main frame is pushed for example):
CChildFrame* miFrame = (CChildFrame*)m_plantillaXGrafico- >CreateNewFrame(miDoc,NULL);
With this expresion I obtained these error:
Debug Asertion Failed
afxwin1.inl
Line 22
After that, I can ignore the error and continue and I get another error in method
CXGraphTestView::OnInitialUpdate()
...........
if (!::IsWindow(m_Graph.m_hWnd))
{
m_Graph.Create("XGraph","", WS_CHILD | WS_VISIBLE, clRect, this,1001);
..............
in the last line (m_Graph.Create ....)
Does somebody know what is happening? Coould you help me?
Thanks a million.
Esteban.
|
|
|
|
|
Sorry, I was in a mistake. I repley myself, the problem was I was trying to link my program which was in RELEASE mode with the library in DEBUG mode.
I didn't realize that were two different *.dll modes: XGRAPH10.dll and XGRAPH10d.dll
the second one in DEBUG mode. Now all is ok and works.... I'm lying , I have a new problem when I try to draw series with a number of points over 10000 I get a memory error. It doesn't happen with a less number of points , could it be because it's trying to access to virtual memory and cannot reserve it? I just realize of this a few hours ago, so it's time to debug. If somebody know the answer please.....let me know it?
Thanks again.
Esteban.
|
|
|
|
|
Has anyone created a static library of these sources? I need to use a static library in my project instead of a DLL. Dll version causes a lot of link conflicts with my other static libraries.
Thanks
|
|
|
|
|
Hi,
thank you for your quick answer. You performed a real powerfull tool!
I would like to know if your library can plot scatter graphs but without line.
I success with option scatter and marker to display data points.
However, markers are displayed just for 1 data point out of 2. That's why to display all my data points, I thought write all data in double to display all points.
But there is perhaps a better solution you know.
Thanks.
ps: Is your available online source version the latest or a very old?
Seb
|
|
|
|
|
Hi,
In my source, I would like to choose the option "Scatter" of the ComboBox Type of the curve index in the XGraph properties.
However, I don't want to change it on the Properties windows but directly from my source code.
When I try to call the "SetType" method, I think I need to use "gtScatter" with the "EGraphType" type. The problem is that a declaration of a variable of "EGraphType" type is not available.
I thanks you in advance for any help you could give me.
Seb
|
|
|
|
|
m_Graph.GetCurve(nCurve).SetType (CXGraphDataSerie::gtScatter);
that's it.
|
|
|
|
|
The calculation for the nMarkerCount is potentially unsafe.
int nMarkerCount = m_nCount / (m_pGraph->m_clInnerRect.Width() / m_nMarkerSize / 4);
you could change to something like this
int nDenominator = (m_pGraph->m_clInnerRect.Width() / m_nMarkerSize / 4);
int nMarkerCount = m_nCount / ((nDenominator != 0) ? nDenominator:1);
Ant.
|
|
|
|