Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

High-speed Charting Control

, 13 Jul 2010 CPOL
A flexible charting control to display 2D data
chartcrtl_src.zip
ChartCtrl_demo.zip
ChartDemo
ChartCtrl
.svn
all-wcprops
entries
format
prop-base
props
text-base
ChartAxis.cpp.svn-base
ChartAxis.h.svn-base
ChartAxisLabel.cpp.svn-base
ChartAxisLabel.h.svn-base
ChartBalloonLabel.h.svn-base
ChartBalloonLabel.inl.svn-base
ChartBarSerie.cpp.svn-base
ChartBarSerie.h.svn-base
ChartCandlestickSerie.cpp.svn-base
ChartCandlestickSerie.h.svn-base
ChartCrossHairCursor.cpp.svn-base
ChartCrossHairCursor.h.svn-base
ChartCtrl.cpp.svn-base
ChartCtrl.h.svn-base
ChartCursor.cpp.svn-base
ChartCursor.h.svn-base
ChartDateTimeAxis.cpp.svn-base
ChartDateTimeAxis.h.svn-base
ChartDragLineCursor.cpp.svn-base
ChartDragLineCursor.h.svn-base
ChartFont.cpp.svn-base
ChartFont.h.svn-base
ChartGanttSerie.cpp.svn-base
ChartGanttSerie.h.svn-base
ChartGradient.cpp.svn-base
ChartGradient.h.svn-base
ChartGrid.cpp.svn-base
ChartGrid.h.svn-base
ChartLabel.h.svn-base
ChartLabel.inl.svn-base
ChartLegend.cpp.svn-base
ChartLegend.h.svn-base
ChartLineSerie.cpp.svn-base
ChartLineSerie.h.svn-base
ChartLogarithmicAxis.cpp.svn-base
ChartLogarithmicAxis.h.svn-base
ChartMouseListener.h.svn-base
ChartPointsArray.h.svn-base
ChartPointsArray.inl.svn-base
ChartPointsSerie.cpp.svn-base
ChartPointsSerie.h.svn-base
ChartScrollBar.cpp.svn-base
ChartScrollBar.h.svn-base
ChartSerie.cpp.svn-base
ChartSerie.h.svn-base
ChartSerieBase.h.svn-base
ChartSerieBase.inl.svn-base
ChartSeriesMouseListener.h.svn-base
ChartStandardAxis.cpp.svn-base
ChartStandardAxis.h.svn-base
ChartString.h.svn-base
ChartSurfaceSerie.cpp.svn-base
ChartSurfaceSerie.h.svn-base
ChartTitle.cpp.svn-base
ChartTitle.h.svn-base
ChartXYSerie.cpp.svn-base
ChartXYSerie.h.svn-base
PointsOrdering.h.svn-base
tmp
prop-base
props
text-base
ChartBalloonLabel.inl
ChartCtrl_source.zip
ChartLabel.inl
ChartPointsArray.inl
ChartSerieBase.inl
ChartDemo.dsp
ChartDemo.dsw
ColourPicker
.svn
entries
format
prop-base
props
text-base
ColourPicker.cpp.svn-base
ColourPicker.h.svn-base
ColourPopup.cpp.svn-base
ColourPopup.h.svn-base
tmp
prop-base
props
text-base
Doc
html
class_c_chart_axis.png
class_c_chart_balloon_label.png
class_c_chart_bar_serie.png
class_c_chart_candlestick_serie.png
class_c_chart_cross_hair_cursor.png
class_c_chart_cursor.png
class_c_chart_date_time_axis.png
class_c_chart_drag_line_cursor.png
class_c_chart_gantt_serie.png
class_c_chart_label.png
class_c_chart_line_serie.png
class_c_chart_logarithmic_axis.png
class_c_chart_points_serie.png
class_c_chart_serie.png
class_c_chart_serie_base.png
class_c_chart_standard_axis.png
class_c_chart_surface_serie.png
class_c_chart_x_y_serie.png
doxygen.png
tab_b.gif
tab_l.gif
tab_r.gif
res
ChartDemo.ico
ChartCtrl_doxygen.zip
html
class_c_chart_axis.png
class_c_chart_balloon_label.png
class_c_chart_bar_serie.png
class_c_chart_candlestick_serie.png
class_c_chart_cross_hair_cursor.png
class_c_chart_cursor.png
class_c_chart_date_time_axis.png
class_c_chart_drag_line_cursor.png
class_c_chart_gantt_serie.png
class_c_chart_label.png
class_c_chart_line_serie.png
class_c_chart_logarithmic_axis.png
class_c_chart_points_serie.png
class_c_chart_serie.png
class_c_chart_serie_base.png
class_c_chart_standard_axis.png
class_c_chart_surface_serie.png
class_c_chart_x_y_serie.png
doxygen.png
tab_b.gif
tab_l.gif
tab_r.gif
ChartCtrl_source.zip
ChartLabel.inl
ChartPointsArray.inl
ChartSerieBase.inl
ChartBalloonLabel.inl
chartctrl_src.zip
chartctr_demo.zip
ChartDemo.clw
ChartDemo.dsp
ChartDemo.dsw
res
ChartDemo.ico
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"

/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS

/////////////////////////////////////////////////////////////////////////////
// French (France) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
#ifdef _WIN32
LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
#pragma code_page(1252)
#endif //_WIN32

#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//

1 TEXTINCLUDE DISCARDABLE 
BEGIN
    "resource.h\0"
END

2 TEXTINCLUDE DISCARDABLE 
BEGIN
    "#include ""afxres.h""\r\n"
    "\0"
END

3 TEXTINCLUDE DISCARDABLE 
BEGIN
    "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
    "#define _AFX_NO_OLE_RESOURCES\r\n"
    "#define _AFX_NO_TRACKER_RESOURCES\r\n"
    "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
    "\r\n"
    "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)\r\n"
    "#ifdef _WIN32\r\n"
    "LANGUAGE 12, 1\r\n"
    "#pragma code_page(1252)\r\n"
    "#endif //_WIN32\r\n"
    "#include ""res\\ChartDemo.rc2""  // non-Microsoft Visual C++ edited resources\r\n"
    "#include ""l.fra\\afxres.rc""          // Standard components\r\n"
    "#endif\r\n"
    "\0"
END

#endif    // APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
//
// Icon
//

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDR_MAINFRAME           ICON    DISCARDABLE     "res\\ChartDemo.ico"

/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//

IDD_ABOUTBOX DIALOG DISCARDABLE  0, 0, 235, 55
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "A propos de ChartDemo"
FONT 8, "MS Sans Serif"
BEGIN
    ICON            IDR_MAINFRAME,IDC_STATIC,11,17,20,20
    LTEXT           "ChartDemo version 1.0",IDC_STATIC,40,10,119,8,
                    SS_NOPREFIX
    LTEXT           "Copyright (C) 2006",IDC_STATIC,40,25,119,8
    DEFPUSHBUTTON   "OK",IDOK,178,7,50,14,WS_GROUP
END

IDD_CHARTDEMO_DIALOG DIALOGEX 0, 0, 412, 436
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "ChartDemo"
FONT 8, "MS Sans Serif"
BEGIN
    CONTROL         "",IDC_CHARTCTRL,"ChartCtrl",WS_TABSTOP,7,7,398,261
    GROUPBOX        "Series",IDC_SERIES_GROUP,7,281,101,148
    LISTBOX         IDC_SERIES_LIST,17,302,74,82,LBS_NOINTEGRALHEIGHT | 
                    WS_VSCROLL | WS_TABSTOP
    PUSHBUTTON      "Add",IDC_ADDSERIES,17,398,37,14
    PUSHBUTTON      "Delete",IDC_DELETESERIES,55,398,37,14
    GROUPBOX        "General",IDC_GENERAL_GROUP,115,281,101,148
    LTEXT           "Bkgnd color:",IDC_STATIC,123,305,41,8
    PUSHBUTTON      "",IDC_BKGND_COLBTN,173,303,30,12
    CONTROL         "Legend visible",IDC_LEGENDVIS_CHECK,"Button",
                    BS_AUTOCHECKBOX | WS_TABSTOP,123,328,61,10
    LTEXT           "Title:",IDC_STATIC,157,371,16,8
    EDITTEXT        IDC_TITLE_EDIT,124,383,83,39,ES_CENTER | ES_MULTILINE | 
                    ES_AUTOHSCROLL | ES_WANTRETURN
    GROUPBOX        "Axis",IDC_AXIS_GROUP,225,281,180,148
    CONTROL         "Left",IDC_LEFTAXIS_RADIO,"Button",BS_AUTORADIOBUTTON,
                    237,298,28,10
    CONTROL         "Bottom",IDC_BOTTOMAXIS_RADIO,"Button",
                    BS_AUTORADIOBUTTON,276,298,38,10
    CONTROL         "Right",IDC_RIGHTAXIS_RADIO,"Button",BS_AUTORADIOBUTTON,
                    325,298,33,10
    CONTROL         "Top",IDC_TOPAXIS_RADIO,"Button",BS_AUTORADIOBUTTON,369,
                    298,29,10
    CONTROL         "Visible",IDC_AXISVISIBLE_CHECK,"Button",BS_AUTOCHECKBOX | 
                    WS_TABSTOP,237,329,36,10
    CONTROL         "Logarithmic",IDC_AXISLOGARITHMIC_CHECK,"Button",
                    BS_AUTOCHECKBOX | WS_TABSTOP,295,329,52,10
    CONTROL         "Inverted",IDC_AXISINVERTED_CHECK,"Button",
                    BS_AUTOCHECKBOX | WS_TABSTOP,354,329,42,10
    CONTROL         "Automatic",IDC_AXISAUTOMATIC_CHECK,"Button",
                    BS_AUTOCHECKBOX | WS_TABSTOP,237,345,47,10
    CONTROL         "Grid",IDC_AXISGRIDVIS_CHECK,"Button",BS_AUTOCHECKBOX | 
                    WS_TABSTOP,295,345,29,10
    LTEXT           "Axis min value:",IDC_AXISMINVAL_STATIC,259,370,48,8
    EDITTEXT        IDC_AXISMINVAL_EDIT,323,368,40,14,ES_AUTOHSCROLL
    LTEXT           "Axis max value:",IDC_AXISMAXVAL_STATIC,259,389,50,8
    EDITTEXT        IDC_AXISMAXVAL_EDIT,323,386,40,14,ES_AUTOHSCROLL
    LTEXT           "Label:",IDC_STATIC,259,410,20,8
    EDITTEXT        IDC_AXISLABEL_EDIT,287,407,76,14,ES_AUTOHSCROLL
    CONTROL         "Pan",IDC_PAN_CHECK,"Button",BS_AUTOCHECKBOX | 
                    WS_TABSTOP,123,349,29,10
    CONTROL         "Zoom",IDC_ZOOM_CHECK,"Button",BS_AUTOCHECKBOX | 
                    WS_TABSTOP,166,349,34,10
END

IDD_SERIESPROP_DLG DIALOG DISCARDABLE  0, 0, 272, 269
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Series properties"
FONT 8, "MS Sans Serif"
BEGIN
    GROUPBOX        "Series properties",IDC_STATIC,7,7,258,82
    LTEXT           "Series type:",IDC_STATIC,15,25,38,8
    COMBOBOX        IDC_SERIESTYPE_COMBO,63,23,62,54,CBS_DROPDOWNLIST | 
                    WS_VSCROLL | WS_TABSTOP
    LTEXT           "Series name:",IDC_STATIC,141,25,42,8
    EDITTEXT        IDC_SERIESNAME_EDIT,189,22,63,14,ES_AUTOHSCROLL
    LTEXT           "Series colour:",IDC_STATIC,15,58,44,8
    PUSHBUTTON      "",IDC_SERIESCOLOUR_BTN,63,55,38,14
    LTEXT           "Associated vert axis:",IDC_STATIC,125,50,66,8
    COMBOBOX        IDC_VERTICALAXIS_COMBO,197,48,48,49,CBS_DROPDOWNLIST | 
                    WS_VSCROLL | WS_TABSTOP
    LTEXT           "Associated horiz axis:",IDC_STATIC,125,67,68,8
    COMBOBOX        IDC_HORIZONTALAXIS_COMBO,197,65,48,51,CBS_DROPDOWNLIST | 
                    WS_VSCROLL | WS_TABSTOP
    GROUPBOX        "Series Data",IDC_STATIC,7,102,258,139
    CONTROL         "Line",IDC_LINEDATA_RADIO,"Button",BS_AUTORADIOBUTTON,17,
                    119,29,10
    CONTROL         "Sine wave",IDC_SINEDATA_RADIO,"Button",
                    BS_AUTORADIOBUTTON,87,119,49,10
    CONTROL         "Random data",IDC_RANDOMDATA_RADIO,"Button",
                    BS_AUTORADIOBUTTON,177,119,59,10
    RTEXT           "Line Slope:",IDC_DATAPARAM1_TEXT,13,154,52,8
    EDITTEXT        IDC_DATAPARAM1_EDIT,71,151,40,14,ES_AUTOHSCROLL
    RTEXT           "Line Offset:",IDC_DATAPARAM2_TEXT,131,154,47,8
    EDITTEXT        IDC_DATAPARAM2_EDIT,183,151,40,14,ES_AUTOHSCROLL
    LTEXT           "Number of points:",IDC_STATIC,20,201,56,8
    EDITTEXT        IDC_POINTSNUMBER_EDIT,82,198,40,14,ES_AUTOHSCROLL | 
                    ES_NUMBER
    LTEXT           "Minimum X value:",IDC_STATIC,136,190,56,8
    EDITTEXT        IDC_MINXVALUE_EDIT,195,187,29,14,ES_AUTOHSCROLL
    LTEXT           "Maximum X value:",IDC_STATIC,136,211,58,8
    EDITTEXT        IDC_MAXXVALUE_EDIT,195,208,29,14,ES_AUTOHSCROLL
    DEFPUSHBUTTON   "OK",IDOK,7,248,50,14
    PUSHBUTTON      "Cancel",IDCANCEL,215,248,50,14
END


#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 1,0,0,1
 PRODUCTVERSION 1,0,0,1
 FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS 0x4L
 FILETYPE 0x1L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040C04B0"
        BEGIN
            VALUE "CompanyName", "\0"
            VALUE "FileDescription", "Application MFC ChartDemo\0"
            VALUE "FileVersion", "1, 0, 0, 1\0"
            VALUE "InternalName", "ChartDemo\0"
            VALUE "LegalCopyright", "Copyright (C) 2006\0"
            VALUE "LegalTrademarks", "\0"
            VALUE "OriginalFilename", "ChartDemo.EXE\0"
            VALUE "ProductName", "Application ChartDemo\0"
            VALUE "ProductVersion", "1, 0, 0, 1\0"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x40c, 1200
    END
END

#endif    // !_MAC


/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//

#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE 
BEGIN
    IDD_ABOUTBOX, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 228
        TOPMARGIN, 7
        BOTTOMMARGIN, 48
    END

    IDD_CHARTDEMO_DIALOG, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 405
        TOPMARGIN, 7
        BOTTOMMARGIN, 429
    END

    IDD_SERIESPROP_DLG, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 265
        TOPMARGIN, 7
        BOTTOMMARGIN, 262
    END
END
#endif    // APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
//
// Dialog Info
//

IDD_SERIESPROP_DLG DLGINIT
BEGIN
    IDC_SERIESTYPE_COMBO, 0x403, 5, 0
0x694c, 0x656e, "\000" 
    IDC_SERIESTYPE_COMBO, 0x403, 7, 0
0x6f50, 0x6e69, 0x7374, "\000" 
    IDC_VERTICALAXIS_COMBO, 0x403, 5, 0
0x654c, 0x7466, "\000" 
    IDC_VERTICALAXIS_COMBO, 0x403, 6, 0
0x6952, 0x6867, 0x0074, 
    IDC_HORIZONTALAXIS_COMBO, 0x403, 7, 0
0x6f42, 0x7474, 0x6d6f, "\000" 
    IDC_HORIZONTALAXIS_COMBO, 0x403, 4, 0
0x6f54, 0x0070, 
    0
END


/////////////////////////////////////////////////////////////////////////////
//
// String Table
//

STRINGTABLE DISCARDABLE 
BEGIN
    IDS_ABOUTBOX            "&A propos de ChartDemo..."
END

#endif    // French (France) resources
/////////////////////////////////////////////////////////////////////////////



#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
#ifdef _WIN32
LANGUAGE 12, 1
#pragma code_page(1252)
#endif //_WIN32
#include "res\ChartDemo.rc2"  // non-Microsoft Visual C++ edited resources
#include "l.fra\afxres.rc"          // Standard components
#endif

/////////////////////////////////////////////////////////////////////////////
#endif    // not APSTUDIO_INVOKED

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Cedric Moonen
Engineer
Belgium Belgium
I am a 29 years old guy and I live with my girlfriend in Hoegaarden, little city from Belgium well known for its white beer Smile | :) .
I studied as an industrial engineer in electronics but I oriented myself more towards software development when I started to work.
Currently I am working in a research centre in mechatronica. I mainly develop in C++ but I also do a bit of Java.
When I have so spare time, I like to read (mainly fantasy) and play electric guitar.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.141223.1 | Last Updated 13 Jul 2010
Article Copyright 2006 by Cedric Moonen
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid