admin 管理员组

文章数量: 1086019


2024年4月18日发(作者:lynn英文怎么读)

c# ms chart

控件使用方法

第一个简单的chart:创建曲线图

();

Series series = new Series("Spline");

ype = ;

Width = 3;

Offset = 2;

// Populate new series with data

(67);

(57);

(83);

(23);

(70);

(60);

(90);

(20);

// Add series into the chart's series collection

(series);

同时显示2条曲线

// Populate series with random data

Random random = new Random();

for (int pointIndex = 0; pointIndex < 10;pointIndex++)

{

["Series1"].((45, 95));

["Series2"].((5, 75));

}

// Set series chart type

["Series1"].ChartType = ;

["Series2"].ChartType = ;

// Set point labels

["Series1"].IsValueShownAsLabel = true;

["Series2"].IsValueShownAsLabel = true;

// Enable X axis margin

reas["ChartArea1"].inVisible = true;

// Enable 3D, and show data point marker lines

reas["ChartArea1"].3D = true;

["Series1"]["ShowMarkerLines"] = "True";

["Series2"]["ShowMarkerLines"] = "True";

显示column类型图,柱状图

// Create new data series and set it's visual attributes

();

Series series = new Series("FlowRead");

ype = ;

Width = 3;

Offset = 2;

// Populate new series with data

(67);

(57);

(83);

(23);


本文标签: 显示 方法 曲线图 控件 创建