Problems with template files

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
UserLS
Newbie
Newbie
Posts: 5
Joined: Thu Apr 30, 2009 12:00 am
Contact:

Problems with template files

Post by UserLS » Fri Apr 16, 2010 10:22 pm

I am using TChart 2009 now and have a list of things that are not saved/retrieved correctly from a template file. This is a VERY BIG problem for us, since all our users create graphs, save them into template files and then use them in their reports month after month and they expect them to look the same every time. So, here is the list of things that do not survive round-tripping (some of these I believe I already have reported in the past, but I will include them here anyway):
  • All shadows (shapes and fonts) with negative offsets.
  • All brushes (except for series marks) if I ever set Solid to false and then set it back to true.
  • Series Marks:
    • Setting Brush.Solid to false.
    • Setting Brush.Gradient.Style.Visible to true.
    • Setting ArrowHead type to something other than None.
  • Pie charts
    • Custom Radius.
    • Edge styles (other than none)
    • Mark positions, when auto mark position is false and there are a lot of small slices (BTW: in this case setting auto mark position to true does not help anyway - they will run into each other even if there is plenty of space to spread them up).
  • Bar graphs
    • Setting Brush.Gradient.Visible to true for anything, but GradientRectangle and Cylinder.
    • Setting Brush.Gradient.Style.Visible to true.
    • Setting Relative Gradient to true (and in many cases, it does not work at all, especially for horizontal bars).
    • Depth Percent other than 100.
  • Area graphs
    • Setting Brush.Gradient.Style.Visible to true.
    • Setting Relative Gradient to false.
    • Setting Dark3D to false.
  • Line, Points and LinePoints series - Setting Brush.Gradient.Visible to true.
  • LinePoints series - Setting Draw3D to true.

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

Re: Problems with template files

Post by Sandra » Mon Apr 19, 2010 12:43 pm

Hello UserLs,
All shadows (shapes and fonts) with negative offsets.
I could reproduce your problem and I have added in list bug report with number [TF02014814]. We will try to fix it in next maintenances releases for TeeChart for .NET v2009
All brushes (except for series marks) if I ever set Solid to false and then set it back to true.
Using next code I couldn't reproduce your problem with last version 4 of TeeChart.Net.

Code: Select all

        public Form1()
        {
            InitializeComponent();
            InitializeChart();
        }
        Steema.TeeChart.Styles.Bar bar1;
        private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;
            bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
            for (int i = 0; i < 10; i++)
            {
                bar1.Add(i, i + 5);
            }
            bar1.Marks.Visible = false;
            bar1.ColorEach = true;
 
        }

        private void button1_Click(object sender, EventArgs e)
        {
            tChart1.Export.Template.Save("c:\\teeChart1.ten");
            tChart1.Clear();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            tChart1.Import.Template.Load("C:\\teeChart1.ten");
        }

private void button4_Click(object sender, EventArgs e)
        {
            bar1.Brush.Solid = false;
            bar1.Brush.Style = System.Drawing.Drawing2D.HatchStyle.BackwardDiagonal;

            tChart1.Walls.Back.Gradient.Visible = false;
            tChart1.Walls.Back.Brush.Solid = false;
            tChart1.Walls.Back.Brush.Color = Color.White;
            tChart1.Walls.Back.Brush.Visible = true;
            tChart1.Walls.Back.Brush.Style = System.Drawing.Drawing2D.HatchStyle.BackwardDiagonal;
        }
Please, you could say if previous code reproduces your problem in your computer? If doesn't appears your problem using next code please modifies it, because we can reproduce it here.
Series Marks:

* Setting Brush.Solid to false.
* Setting Brush.Gradient.Style.Visible to true.
* Setting ArrowHead type to something other than None.
Please, you could say exactly what we are doing for reproduce your problem?

Pie charts
* Custom Radius.
* Edge styles (other than none)
* Mark positions, when auto mark position is false and there are a lot of small slices (BTW: in this case setting auto mark position to true does not help anyway - they will run into each other even if there is plenty of space to spread them up).
Using next code and last version 4 we can not reproduce your problem. Please, you could modify next code, because we can reproduce your problem here?

Code: Select all

private void InitializeChart()
{  
            tChart1.Aspect.View3D = true;
            Steema.TeeChart.Styles.Pie pie = new Steema.TeeChart.Styles.Pie(tChart1.Chart);
            pie.FillSampleValues(100);
            pie.BevelPercent = 18;
            pie.Dark3D = true;
            pie.CustomXRadius = 100;
            pie.CustomYRadius = 100;
            pie.EdgeStyle = Steema.TeeChart.Drawing.EdgeStyles.Curved;
            pie.ExplodeBiggest = 10;
            pie.AutoMarkPosition = false;
}

        private void button1_Click(object sender, EventArgs e)
        {
            tChart1.Export.Template.Save("c:\\teeChart1.ten");
            tChart1.Clear();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            tChart1.Import.Template.Load("C:\\teeChart1.ten");
        }

Setting Brush.Gradient.Visible to true for anything, but GradientRectangle and Cylinder.
I could reproduce your problem and I have added to list of bug report with number [ TF02014816]. We will try to fix for next version of TeeChart.Net.
Area graphs

* Setting Brush.Gradient.Style.Visible to true.
* Setting Relative Gradient to false.
* Setting Dark3D to false.
Please, you could explain what your problem exatcly is? because using next code we can not find the problem:

Code: Select all

 
private void initializeChart()
{
tChart1.Series.Clear();
     Steema.TeeChart.Styles.Area area1 = new Steema.TeeChart.Styles.Area(tChart1.Chart);
            area1.FillSampleValues();
            area1.Brush.Gradient.Style.Visible = true;
            area1.GradientRelative = false;
            area1.Dark3D = false;
}
  private void button1_Click(object sender, EventArgs e)
        {
            tChart1.Export.Template.Save("c:\\teeChart1.ten");
            tChart1.Clear();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            tChart1.Import.Template.Load("C:\\teeChart1.ten");
        }
Line, Points and LinePoints series - Setting Brush.Gradient.Visible to true
Please, you could explain exactly what your problem is, because we can reproduce the problem here.
LinePoints series - Setting Draw3D to true.
I could reproduce your problem and I have added in list bug report with number [TF02014817] We will try to fix it for next releases of TeeChart.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

UserLS
Newbie
Newbie
Posts: 5
Joined: Thu Apr 30, 2009 12:00 am
Contact:

Re: Problems with template files

Post by UserLS » Tue Apr 20, 2010 1:49 pm

Sorry, it looks, most of the problems with different series are located in our code, since we had to write replacement for Series.Assign() and it does not handle some of the properties correctly. The problem with brushes can be easily reproduced by the next code:

Code: Select all

                var chart = new TChart {Width = 640, Height = 480};

                var bar = new Bar(chart.Chart);
                bar.FillSampleValues(10);
                bar.Brush.Solid = false;
                bar.Brush.Style = HatchStyle.DottedGrid;
                bar.Brush.Solid = true;

                chart.Export.Image.PNG.Save(@"c:\before.png");

                chart.Export.Template.Save(stream);
                stream.Position = 0;
                chart.Import.Template.Load(stream);
                chart.Refresh();

                chart.Export.Image.PNG.Save(@"c:\after.png");
Same type of problem can be reproduced with all the brushes in the system.

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

Re: Problems with template files

Post by Sandra » Thu Apr 22, 2010 10:13 am

Hello UserLs,

Ok, thanks for your code. I could reproduce your problem and I have add it in bug list report with number [TF02014828]. We will try to fix for next maintenances releases of TeeChart .Net.

Thanks,

UserLS
Newbie
Newbie
Posts: 5
Joined: Thu Apr 30, 2009 12:00 am
Contact:

Re: Problems with template files

Post by UserLS » Mon Apr 26, 2010 7:25 pm

More about shadows:
  • negative offsets for smooth shadows are treated as positive numbers
  • if I set shadow to smooth on my graph area - it (shadow) disappears at all
  • donut series has a shadow of a pie series (there is no hole!) which looks really odd

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

Re: Problems with template files

Post by Sandra » Wed Apr 28, 2010 12:05 pm

Hello UserLs,
negative offsets for smooth shadows are treated as positive numbers
This bug is already in the list of bugs with number [TF02014814], as is commented in this thread. Anyway, I have added the information about smooth in it.
if I set shadow to smooth on my graph area - it (shadow) disappears at all
I couldn't reproduce it with last version of TeeChart.Net. Please, you could say exactly as we have done for reproduce it here?
donut series has a shadow of a pie series (there is no hole!) which looks really odd
I could reproduce your problem, and I have added it in bug report list with number [TF02014837]. We will try to fix it for next versions of TeeChart.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

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

Re: Problems with template files

Post by Sandra » Mon May 24, 2010 10:22 am

Hello UserLs,

We inform that (TF02014816) is expected behaviour, because the Cylinder BarStyle is a special case where the Gradient is specially created from the Bar Series Color.


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