2024年3月21日发(作者:)
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);


发布评论