Creating a simple chart with ChartFX
Posted on 1997-11-26
This time I want to create a simple pie chart using Delphi 1.0's built-in ChartFX capabilities...but the documentation describing ChartFX is sketchy at best.
Nothing complicated. I just want to read a file of words and count how many words start with the letter 'a', how many start with the letter 'b' and so on. When my program is done reading the file, I want to display a 3-D pie chart of this data showing the percentages of each.
Is it possible also to set up a button that will delete this chart off my form after I'm done looking at it?
In the documentation, I saw this example on how to create a line chart, but it didn't really explain how to get your data into the chart:
hWnd := chart_Create(LINE | CT_3D,CS_ALL,NULL,10, 10, 200, 200,20, 2,
IDM_CHART,WS_OVERLAPPEDWINDOW | WS_VISIBLE);
P.S: Can you include in your answer all the necessary variable declarations I'll need to make too? Thanks.