Page 1 of 1

Chart Shrinks in the control if legend items are more

Posted: Fri Sep 14, 2012 7:38 am
by 16063283
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?

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

Posted: Fri Sep 14, 2012 9:20 am
by 10050769
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,

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

Posted: Mon Sep 24, 2012 9:23 am
by 16063283
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

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

Posted: Mon Sep 24, 2012 11:28 am
by 10050769
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,