Click here for larger image
Environment: VC 6, SP 4, Windows 2000
In my work, I always want to display several data series with holes together. Massimo Colurcio has developed a control to display data with a hole, but it is not easy to use, especially when the data is very sparse, so I decided to develop my own control based on his work. At the same time, I also want to show this data series in a pie chart fashion.
How to Use the Application
Follow these steps to set up and use the Chart and Pie project:
- Add the files in the source package to your project.
- Do initilization. See CChartView::OnInitialUpdate().
- Call Add of CDataChart to add datasets to the control.
Use the following code as shown below:
void Add(int nDatasetID, int nIndex, double nData); SetStyle(STYLE_LINE)to display a line chart, or
SetStyle(STYLE_PIE)to display a pie chart.
And that's all.
DownloadsDownload demo project - 62 Kb
Download source - 17 Kb