Chart Shrinks in the control if legend items are more

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
HoneywellSteema
Newbie
Newbie
Posts: 12
Joined: Wed Aug 22, 2012 12:00 am

Chart Shrinks in the control if legend items are more

Post by HoneywellSteema » Fri Sep 14, 2012 7:38 am

Hi,

In the teeChart contol the charts shrinks inside the control to adjust the legend,

Attached for reference,do we have any property to set the height and width percentage of the chart inside the control?
Attachments
123.jpg
123.jpg (86.16 KiB) Viewed 4707 times

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Chart Shrinks in the control if legend items are more

Post by Sandra » Fri Sep 14, 2012 9:20 am

Hello HoneywellSteema,

I can not reproduce your problem using next code:

Code: Select all

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

        private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;
            tChart1.Dock = DockStyle.Fill;
            tChart1.Legend.Alignment = LegendAlignments.Bottom;
         
            for (int i = 0; i < 8; i++)
            {
                new Steema.TeeChart.Styles.Line(tChart1.Chart);
                tChart1[i].FillSampleValues();
            }
            for (int j = 0; j < tChart1.Series.Count; j++)
            {
                if (j % 3 == 0)
                {
                    tChart1[j].Title = "Series" + j.ToString()+"0000000000000000000000000000000000";
                }
                else
                {
                    tChart1[j].Title = "Series" + j.ToString();
                }
            }
        }
Can you please check if code works as you want? Moreover can you tell us which version are you using of TeeChartFor.Net?

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

HoneywellSteema
Newbie
Newbie
Posts: 12
Joined: Wed Aug 22, 2012 12:00 am

Re: Chart Shrinks in the control if legend items are more

Post by HoneywellSteema » Mon Sep 24, 2012 9:23 am

Hi ,

we are using Tee Chart Silvelight version 4.0.2009.42283 and Dock property is not available in this version.

Please suggest some other alternative.

This is how , we have added the chart control in xaml.

<stc:TChart x:Name="trendControl" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"></stc:TChart>


Thanks,
Monika

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Chart Shrinks in the control if legend items are more

Post by Sandra » Mon Sep 24, 2012 11:28 am

Hello Monika,

I inform you that using last version of Silverlight and next code:

Code: Select all

 public MainPage()
        {
            InitializeComponent();
            InitializeChart();
        }
        private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;
            tChart1.Legend.Alignment = LegendAlignments.Bottom;
         
            for (int i = 0; i < 8; i++)
            {
                new Steema.TeeChart.Silverlight.Styles.Line(tChart1.Chart);
                tChart1[i].FillSampleValues();
            }
            for (int j = 0; j < tChart1.Series.Count; j++)
            {
                if (j % 3 == 0)
                {
                    tChart1[j].Title = "Series" + j.ToString()+"0000000000000000000000000000000000";
                }
                else
                {
                    tChart1[j].Title = "Series" + j.ToString();
                }
            }
        }
your problem doesn't appear for me. I suggest your, download last maintenance release of TeeChartFor.Net that you can download here. When you get new version, please try again if our problem persist. If it persists, but using my code you don't reproduce it, please try to arrange a simple project, because we can reproduce your problem here.

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply