TeeChart
[TeeChart] Single Series 인 경우 Legend 에 Value 값이 보일때 처리하기
kjun.kr
2022. 10. 6. 19:06
728x90
TeeChart 에서 Single Series 인 경우 기본으로는 Legend에 아래처럼 값이 표시됩니다.
이를 실제 Series 의 Legend 로 보이게 하는 방법은 TChart 의 Legend.LegendStyle 를 Series 로 설정하면 됩니다.
using Steema.TeeChart.Styles;
namespace Win.TeeChartTest
{
public partial class TeeChartForm : Form
{
public TeeChartForm()
{
InitializeComponent();
this.tChart.Axes.Bottom.Labels.DateTimeFormat = "MM-dd";
this.tChart.Legend.LegendStyle = Steema.TeeChart.LegendStyles.Series;
// Set SampleData
for (int i = 0; i < 1; i++)
{
Points points = new Points(this.tChart.Chart);
points.XValues.DateTime = true;
points.Legend.Text = "test";
points.FillSampleValues(20);
}
}
}
}
결과
[Source]
https://github.com/kei-soft/Win.TeeChartTest
GitHub - kei-soft/Win.TeeChartTest: WinForm TeeChartTest
WinForm TeeChartTest. Contribute to kei-soft/Win.TeeChartTest development by creating an account on GitHub.
github.com
728x90