첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170

TestProject.zip
0.01MB

▶ MainForm.cs

using System.Drawing;
using System.Windows.Forms;

using Steema.TeeChart;
using Steema.TeeChart.Drawing;
using Steema.TeeChart.Styles;
using Steema.TeeChart.Tools;

namespace TestProject
{
    /// <summary>
    /// 메인 폼
    /// </summary>
    public partial class MainForm : Form
    {
        //////////////////////////////////////////////////////////////////////////////////////////////////// Constructor
        ////////////////////////////////////////////////////////////////////////////////////////// Public

        #region 생성자 - MainForm()

        /// <summary>
        /// 생성자
        /// </summary>
        public MainForm()
        {
            InitializeComponent();

            Text = "SubChartTool 클래스 : 하위 차트 사용하기";

            this.tChart.Panel.Pen = new ChartPen(Color.Black);

            Line line = new Line(this.tChart.Chart);

            line.FillSampleValues();


            SubChartTool subChartTool = new SubChartTool(this.tChart.Chart);

            TChart chart1 = subChartTool.Charts.AddChart("Chart1");

            chart1.Panel.Color = Color.Transparent;

            chart1.Series.Add(new Bar());

            chart1[0].Marks.Visible = false;
            chart1[0].Color         = Color.FromArgb(100, Color.Blue);


            TChart chart2 = subChartTool.Charts.AddChart("Chart2");

            chart2.Left        = 220;
            chart2.Panel.Color = Color.Transparent;

            chart2.Series.Add(new Area());

            chart2[0].Color = Color.FromArgb(100, Color.Yellow);


            for(int i = 0; i < subChartTool.Charts.Count; i++)
            {
                TChart chart = subChartTool.Charts[i].Chart;

                for(int j = 0; j < line.Count; j++)
                {
                    chart[0].Add(line.XValues[j], line.YValues[j]);
                }
            }
        }

        #endregion
    }
}
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요