Chart and Pie for data with hole

May 4, 2002

1 min read

VC6

Win2K

VS6

C++

Windows

Visual-Studio

MFC

Dev

Advanced

Author picture

by Tingshao Zhu

Contributor

85k Views

4.25/ 5

Sample Image - chartnpie.jpg

Introduction

In my work, I always want to display several data series with hole together. Massimo Colurcio has developed a control to display data with hole, but it is not an easy way to use, especially when the data is very sparse, so I decide to develop my own control based on his work. And at the same time, I also want to show these data series in Pie.

How to use?

  1. Add the files in the source package to your project.
  2. Do initialization, see CChartView::OnInitialUpdate().
  3. Call Add of CDataChart to add datasets to the control.
    void Add( int nDatasetID, int nIndex, double nData );
  4. SetStyle(STYLE_LINE) for line chart.
  5. SetStyle(STYLE_PIE) for pie showing.

and that's all.

License

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