Common/ChartHelper.cs
(开头部分) 21KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using dotnetCHARTING;
using System.Drawing;
namespace Maticsoft.Common
{
public delegate string SetXColumnHandler(string ora_Str);
public class ChartHelper
{
public event SetXColumnHandler OnSetXColumn;
public string SetXColumn(string ora_str)
{
if (OnSetXColumn != null)
{
return OnSetXColumn(ora_str);
}
return ora_str;
}
public void Create(Chart chart, string title, DataTable table, string xColumn, string yColumn, string style, bool user3D)
{
chart.Palette = new Color[] { Color.FromArgb(49, 255, 49), Color.FromArgb(255, 255, 0), Color.FromArgb(255, 99, 49), Color.FromArgb(0, 156, 255),
Color.FromArgb(255, 125, 49), Color.FromArgb(125, 255, 49), Color.FromArgb(0, 255, 49) };
chart.Use3D = user3D;
SeriesCollection mySC = getRandomData(table, xColumn, yColumn);
if (string.IsNullOrEmpty(style) || style == "线形")
{
chart.Type = ChartType.Combo;
mySC = getRandomData2(table, xColumn, yColumn);
}
else if (style == "柱形")
{
chart.Type = ChartType.Combo;
}
else if (style == "金字塔")
{
chart.Type = ChartType.MultipleGrouped;
chart.DefaultSeries.Type = SeriesTypeMultiple.Pyramid;
}
else if (style == "圆锥")
{
chart.Type = ChartType.MultipleGrouped;
chart.DefaultSeries.Type = SeriesTypeMultiple.Cone;
}
chart.Title = title;
if (string.IsNullOrEmpty(style) || style == "线形")
{
chart.DefaultSeries.Type = SeriesType.Line;
}
chart.DefaultElement.ShowValue = true;
chart.PieLabelMode = PieLabelMode.Outside;
chart.ShadingEffectMode = ShadingEffectMode.Three;
chart.NoDataLabel.Text = "没有数据显示";
chart.SeriesCollection.Add(mySC);
}
后面还有 467 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
