Dynamically generate chart with office star control

zhaozj2021-02-16  51

Dynamically generate chart with office star control

Http://www.standsoft.com (2003.12.8) Article Source: 智 岛 Software

The chart is the most intuitive way to analyze the data. The office star control can automatically generate various types of beautiful charts based on table data, such as column charts, pyramids, line charts, pie charts, and other charts, and various charts can be converted to each other. The generated chart interface method is as follows:

Bool Createchart (Double Dleft, Double Dtop, LPCTSTSTR STRNAME, LPCTSTSTSTSTSTSTSTSTSTSTSTSTSTSTERTETETED, LPCTSTSTSTSTRTITLE, SHORT NTYPE, LPCTSTSTSTSMPLETEXT)

Parameter Description:

DLEFT chart on the left position (unit: 0.1 mm) DTOP chart on the top of the page (unit: 0.1 mm) strname chart name Strvalue chart data string,

Example description:

Monday Tuesday Wednesday Thursday Friday Saturday Sunday 12345671117141516717

The data on the table is turned into a chart string: | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |

Just use the symbol "|" to connect the header characters and table row data.

NCOLNUM Data table column Number, NCOLNUM, for 7strtilte chart title NTYPE chart type, 0: three-dimensional column, 2: Cylindrical map, 5: Pyramid, 4: Cylindrical map, 5: Pyramid 6: Scatter Point Figure STRSAMLETEXT chart legend string, use "|" to connect the legend of each row. Such as: | 张 三 | 李 四 | The entire source code is as follows: Createchart (0, 0, "Week", "Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |, 7, "Example Chart", 0, "| Zhang San | Li 4 |")

转载请注明原文地址:https://www.9cbs.com/read-26985.html

New Post(0)