我怎样一个传奇添加到ASP.NET 3.5图表控件? [英] How do I add a legend to an ASP.NET 3.5 chart control?

查看:85
本文介绍了我怎样一个传奇添加到ASP.NET 3.5图表控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法,以一个传奇添加到其创建的图表?我创建了一个折线图,默认情况下它创造了不同的颜色不同的Ÿ - 轴数据。我想一个侧面的传说与线条颜色变的数据。显示器

Is there a way to add a legend to the chart it creates? I have created a line chart and by default it has created different colors for the different y - axis data. I would like a legend on the side the displays what data goes with which line color.

感谢你。

推荐答案

您图表控件,只需添加以下行创建一个使用数据系列名称的传说:

Your chart control can create a legend using the data series names simply by adding the following line:

chart.Legends.Add(new Legend("Default") { Docking = Docking.Right});

这篇关于我怎样一个传奇添加到ASP.NET 3.5图表控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆