2D Data Visualization Class

General.

CGraphView is a class that provides multiplot 2D data visualization. It is capable of
simultaneous drawing for up to 32 2D plots.
CGraphView class is derived from CView MFC class and could be used as base class for
different kinds of 2D data plot views. Features supported:
-Autoscale
-Zooming
-Fit width, height and page
-Mouse coordinates tracing
-Interactive add, remove and edit points
-Ability to add and display interactively up to 15000 points per second (depends on the
speed of the computer)

Class interface.

Class interface provides several groups of functions:

Graphs manipulation routines:

int AddGraph(COLORREF newColor = 0, char* title = "", BOOL bInvalidate =
TRUE);
Function adds new graph to the view. Returns graph index if successful or -1 if not. If bInvalidate
flag is set then view will be updated.

int AddPoint(int graphnum, double x, double y, BOOL bRedraw, BOOL bUpdatePView, int
index = -1);
Adds (if index == -1) or inserts new point to the graph. If bRedraw set - graph
will be invalidated. If bUpdatePView set - then Point View List will be updated.

Class creation.

There are several steps that you should do in order to use this class in your
application:
1. Include all graph files (except grres.rc) into your project.
2. Open grres.rc and copy following resources into your project resources:
IDD_CHANGE_TITLE dialog
IDD_GRAPH_AXISPROPS dialog
IDD_GRAPH_GENPAGE dialog
IDD_GRAPHS dialog
IDD_GRAPHS_PROPPAGE dialog
IDD_POINT_EDIT dialog
IDR_GRAPH_PROPS menu
IDR_PVIEW_RBMENU menu
IDR_PVIEW_RBMENU_EMPTY menu
4. Derive your view class from CGraphView - and off we go!

Downloads

Comments

Which Is The Best Herbal Product for Weak Structure and Lovemaking Dysfunction?

Posted by agueffifielm
on 06/21/2013 12:22am

Do You Know many Dangers related with Counterfeit Oral Drug for Erectile Dysfunction Treatment? Rarely, males do practical experience muscle aches, especially in the back, right after they take the capsule [url=http://rxhealth.pw ] mail viagra [/url] find far more How to Stop Erectile Dysfunction

Did you have following changes with the new version?

I used the new version of 2d Data visualisation class because it has better interface than the old ones.
But i like the right button menu at the pointview part of the old version. I don't know why the right button menu, such as edit, delete, insert before, insert after, reflsh, copy as...be deleted at the new version? Also i need save the modified datas in the pointview as a txt file.

Changes for large data sets

I noticed a problem when dealing with large data sets. The initialization of the List control takes
a HUGE amount of time. Therefore I've changed the List control into being owner drawn. Then only the
data currently visible in the list is retrieved, dynamically. Steps for this is given below:

1. Open the IDD_GRAPHS dialog in the resource editor. Under the "More styles" properties for the
list control, check the "Owner data" check box.

5. Remove the code in the CPointsView::ChangePoint(...) and CPointsView::DeletePoint(...)

void CPointsView::ChangePoint(SGraphChange* sgc)
{
/* This is not needed since data is owner drawn... 000211 Robert B
just invalidate...
*/
m_PointList.Invalidate();
}

void CPointsView::DeletePoint(SGraphChange* sgc)
{
/* This is not needed since data is owner drawn... 000211 Robert B
*/
// Just remove one from count
m_PointList.SetItemCountEx(m_PointList.GetItemCount() - 1);
}

That's it. Now, I'm not sure that all affected parts have been changed but this worked for me... ;-)

2D class in a dialog based application???

I'm working on an application and want to
incorporate the 2D Data Visualization class into it.
Graphing is not the sole purpose of the application, just a
feature - so I would like to be able popup up a dialog or a
framewnd with the graph in it (based on data that I will,
at graph creation time, pull from a database). My
application is dialog based b/c the doc-view architecture is
not necessary for it -- see the problem? I don't have a
view class to derive from CGraphView.

So I'm looking at manually creating a doc, a
view, and a CFrameWnd (these would serve as the dialog with
the graph in it), and then popping that up.

Have you ever used the graph in a dialog based
application? Is it possible? If so, how? Also, have you
ever manually created a doc, view, and frame wnd by hand?
If so, how do I go about it?

Top White Papers and Webcasts

When individual departments procure cloud service for their own use, they usually don't consider the hazardous organization-wide implications. Read this paper to learn best practices for setting up an internal, IT-based cloud brokerage function that service the entire organization. Find out how this approach enables you to retain top-down visibility and control of network security and manage the impact of cloud traffic on your WAN.

U.S. companies are desperately trying to recruit and hire skilled software engineers and developers, but there is simply not enough quality talent to go around. Tiempo Development is a nearshore software development company. Our headquarters are in AZ, but we are a pioneer and leader in outsourcing to Mexico, based on our three software development centers there. We have a proven process and we are experts at providing our customers with powerful solutions. We transform ideas into reality.