Update (2004-December-21):

In SmartGraph, there was a problem in labeling X and Y axes, now it has been solved.

Selection problem in demo project solved.

Name of output file changed to SmartGraph rather than Graph.

Introduction

In my recent projects, I needed to show some data in a 2D graph. This graph must have capability of zoom in, zoom out, and colorization. At first, I wrote some code directly in my VC project and the result was satisfactory, but I had to do it for any new project and it was time consuming. So, I thought of doing it as an ATL component so that it does all the things I need. This SmartGraph is what I want.

SmartGraph is written in VC++ .NET 2003 using ATL and has several good methods, events and properties that makes it something easy to use.

This SmartGraph is an ActiveX, so it can be used in any visual language that supports ActiveX, such as Visual C++, Visual Basic, C#, Delphi, ... It can resample its data more quickly by using SetData(.,.,.,true). It also can be viewed as Regular graph, Dot graph, or Bar graph by using SetPlotType(.).

How to use SmartGraph?

To use SmartGraph, you must do these steps:

Register SmartGraph using this command at command prompt: "regsvr32 <PATH>\Graph.dll", or only compile "Graph.sln".

Note: if you don’t have VC++ .NET, you can’t register Graph.dll unless you copy "msvcr71.dll" to your Windows directory. (This file is attached to this article.)

In your project, press right-click on your ToolBox and then "Add/Remove Item", then select "SmartGraph" from "COM Components" tab, now it must appear in your toolbox.

Now, only click on it and drag it to your dialog, now create a variable and use it:

Comments and Discussions

I have trouble with registering SmartGraph.dll in windows 10. I have registered it in Windows 8 and it works perfectly. However, I wasn't able to register it in windows 10. I was wondering if you could help me to figure it out. Really appreciate your time and help.

My problem has been solved. I got the error "DllRegisterServer failed with error code 0x80070005>. I think it had nothing to do with windows 10. I needed to run Command Prompt as administrator. Below link would help: