How to draw the bubble chart on TeeChart?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Chris.CHWU
Newbie
Newbie
Posts: 57
Joined: Wed Jan 30, 2008 12:00 am

How to draw the bubble chart on TeeChart?

Post by Chris.CHWU » Tue Jul 14, 2009 11:34 pm

Hi,

Could someone show me how to draw the following chart on TeeChart componment(V3.5).

Data:
X=1 , Y=1 , Radius=5
X=0.7 , Y=1 , Radius=1
X=0.9 , Y=1 , Radius=1
X=1.1 , Y=1 , Radius=1
X=1.3 , Y=1 , Radius=1
...
NewBubbleChart.jpg
NewBubbleChart.jpg (50.96 KiB) Viewed 6291 times

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: How to draw the bubble chart on TeeChart?

Post by Yeray » Wed Jul 15, 2009 10:30 am

Hi Chris,

You could do something as following:

Code: Select all

        public Form1()
        {
            InitializeComponent();
            InitializeChart();
        }

        private void InitializeChart()
        {
            chartController1.Chart = tChart1;

            tChart1.Aspect.View3D = false;
            tChart1.Legend.Visible = false;
            tChart1.Dock = DockStyle.Fill;

            Bubble bub1 = new Bubble(tChart1.Chart);
            bub1.XValues.Order = ValueListOrder.None;

            bub1.Add(1, 1, 0.5, Color.SkyBlue);

            bub1.Add(1, 0.7, 0.1, Color.Red);
            bub1.Add(1.07, 0.7, 0.1, Color.Red);
            bub1.Add(0.93, 0.7, 0.1, Color.Red);

            bub1.Add(0.89, 1, 0.1, Color.Red);
            bub1.Add(1.04, 1, 0.1, Color.Red);
            bub1.Add(1.11, 1, 0.1, Color.Red);

            bub1.Add(1, 1.27, 0.1, Color.Red);
            bub1.Add(1.07, 1.27, 0.1, Color.Red);
            bub1.Add(0.93, 1.27, 0.1, Color.Red);

            bub1.Add(1, 2, 0.5, Color.SkyBlue);

            bub1.Add(1.07, 1.7, 0.1, Color.Red);
            bub1.Add(0.93, 1.7, 0.1, Color.Red);

            bub1.Add(0.89, 2, 0.1, Color.Red);
            bub1.Add(0.96, 2, 0.1, Color.Red);
            bub1.Add(1.04, 2, 0.1, Color.Red);
            bub1.Add(1.11, 2, 0.1, Color.Red);

            bub1.Add(1, 2.27, 0.1, Color.Red);
            bub1.Add(1.07, 2.27, 0.1, Color.Red);
            bub1.Add(0.93, 2.27, 0.1, Color.Red);

            tChart1.Axes.Left.SetMinMax(0.5, 2.5);
            tChart1.Axes.Bottom.SetMinMax(0.5, 1.5);
        }
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Chris.CHWU
Newbie
Newbie
Posts: 57
Joined: Wed Jan 30, 2008 12:00 am

Re: How to draw the bubble chart on TeeChart?

Post by Chris.CHWU » Thu Jul 16, 2009 9:55 am

Thanks, I will try it

Post Reply