【发布时间】:2015-04-16 13:38:32
【问题描述】:
我正在尝试使用 zed 图创建折线图。我只是想问一下,我怎样才能创建一个 XAxis 类型为 text 而 YAxis 类型为 doubles 的折线图。
首先我真的在搜索这个主题,但我没有得到任何结果。因为其他折线图总是关于 XAxis 上的日期和时间。我不需要 XAxis 上的日期和时间。我将使用 XAxis 的标签来命名 YAxis 上的点。
string[] labels = { "P(A)", "P(A)+P(T)", "P(A)+P(T)+P(G)", "P(A)+P(T)+P(G)+P(C)" };
double[] y = { PA(), PA() + PT(), PA() + PT() + PG(), PA() + PT() + PG() + PC() };
LineItem myLine = myPane.AddCurve("dizi 1", null, y, Color.Red);
myLine.Line.Fill = new Fill(Color.Red, Color.White, Color.Red);
myPane.XAxis.Scale.TextLabels = labels;
myPane.XAxis.Type = AxisType.Text;
myPane.Chart.Fill = new Fill(Color.White, Color.FromArgb(255, 255, 166), 90F);
myPane.Fill = new Fill(Color.FromArgb(250, 250, 255));
zedGraphControl1.AxisChange();
****代码在上面。有什么问题吗?****
【问题讨论】:
标签: c# charts linechart zedgraph linegraph