Appearance differs from Old version to New Teechart Assembly

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
YTI
Newbie
Newbie
Posts: 15
Joined: Wed May 24, 2017 12:00 am

Appearance differs from Old version to New Teechart Assembly

Post by YTI » Tue May 08, 2018 3:14 pm

Hello Steema,

We were using the Teechart version 4.1.2010.9282 initially.
But we faced an issue related to out of memory exception as discussed http://www.teechart.net/support/viewtop ... =4&t=16731
So based on the suggestion from above post, we upgraded the Teechart to version 4.1.2017.10191

After using the recent updated Teechart assembly, one of our client is complaining that the default look of the component has been changed.
Please see the attachments where 1.jpg is the appearance with Older version and 2.jpg is the appearance with the latest version.
Ex: You can notice that the top and right borders are missing with latest versions of the Teechart assembly.

Please assist us in this regard that why did the appearance got changed after upgrading the latest assembly and how to overcome it.
It is critical for our clients to retain the same look and feel without any degrade in the functionality.

Best Regards
Attachments
2.jpg
New Version
2.jpg (21.7 KiB) Viewed 25660 times
1.jpg
Old Version
1.jpg (27.47 KiB) Viewed 25661 times

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Appearance differs from Old version to New Teechart Assembly

Post by Christopher » Wed May 09, 2018 7:16 am

YTI wrote: Please assist us in this regard that why did the appearance got changed after upgrading the latest assembly and how to overcome it.
It is critical for our clients to retain the same look and feel without any degrade in the functionality.
Do you have any evidence of degradation in functionality?

Of course we want to help you identify this difference - in order for us to do so we will need to reproduce the issue here. Could you please be so kind as to post a simple code example which we can run against both versions to see the changes?
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

YTI
Newbie
Newbie
Posts: 15
Joined: Wed May 24, 2017 12:00 am

Re: Appearance differs from Old version to New Teechart Assembly

Post by YTI » Wed May 09, 2018 9:34 am

Hi Christopher,

We have a tool to see the graph component as depicted in the previous images.
So if I change my tools reference to the older version of Teechart assembly and recompile my tool, it shows me the correct Graph(as depicted in 1.jpg).
If I change the reference to latest version of Teechart assembly and recompile my tool, it shows me the Graph as depicted in 2.jpg.

This is the only evidence I got. No source code change in my tool and just the reference change of Teechart assembly changes the appearance of graph.

If required, I can demo it in a remote session on a mutually agreed time.

Creating a sample app to demonstrate the issue isn't feasible.
Can you suggest me the relevant property to bring back the original look?

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Appearance differs from Old version to New Teechart Assembly

Post by Christopher » Wed May 09, 2018 11:16 am

YTI wrote: Creating a sample app to demonstrate the issue isn't feasible.
Can you suggest me the relevant property to bring back the original look?
When I run the following code using the TeeChart version you are using:

Code: Select all

	public partial class Form1 : Form
	{
		public Form1()
		{
			InitializeComponent();
			TChart chart = new TChart();
			chart.Dock = DockStyle.Fill;
			chart.Header.Text = Utils.Version;
			Line series = new Line(chart.Chart);
			this.Controls.Add(chart);
		}
	}
I obtain the following:
TeeChartPro_2018-05-09_13-08-31.png
TeeChartPro_2018-05-09_13-08-31.png (4.09 KiB) Viewed 25651 times
This is what the default chart looks like with a series with no values in it. This default chart is different to the default chart you show me in your images, and it is different because you are coding the chart to make it look different. Could you please give me the code you are using to make your chart look the way it does? Without being able to reproduce your default chart here I'm afraid we won't be able to help you.
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Appearance differs from Old version to New Teechart Assembly

Post by Christopher » Wed May 09, 2018 12:24 pm

Christopher wrote:Could you please give me the code you are using to make your chart look the way it does? Without being able to reproduce your default chart here I'm afraid we won't be able to help you.
Further to this - to bring this default look to previous versions of several years ago, you can use a single line:

Code: Select all

	public partial class Form1 : Form
	{
		public Form1()
		{
			InitializeComponent();
			TChart chart = new TChart();
			chart.Dock = DockStyle.Fill;
			chart.Header.Text = Utils.Version;
			Line series = new Line(chart.Chart);
			this.Controls.Add(chart);


			chart.CurrentTheme = ThemeType.Opera;
		}
	}
which gives us this:
TeeChartPro_2018-05-09_14-12-13.png
TeeChartPro_2018-05-09_14-12-13.png (6.52 KiB) Viewed 25650 times
this could be the answer you are looking for.
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

YTI
Newbie
Newbie
Posts: 15
Joined: Wed May 24, 2017 12:00 am

Re: Appearance differs from Old version to New Teechart Assembly

Post by YTI » Wed May 09, 2018 3:16 pm

Hi Christopher,

Thanks for reverting back.
However I am facing 2 issues while using provided code snippet.
While applying the theme, following exception occurs.
------------------------------------
2018-05-09 19:43:39,982 [1] FATAL ASC [(null)] - On Un-handled Exception
System.NullReferenceException: Object reference not set to an instance of an object.
at Steema.TeeChart.WPF.Themes.ColorPalettes.ApplyPalette(Chart custom, Color[] Palette)
at Steema.TeeChart.WPF.Themes.ColorPalettes.ApplyPalette(Chart custom, Int32 Index)
at Steema.TeeChart.WPF.Drawing.Aspect.set_ColorPaletteIndex(Int32 value)
at Steema.TeeChart.WPF.Themes.CustomTheme.ChangeAspect(Aspect ChartAspect)
at Steema.TeeChart.WPF.Themes.CustomTheme.Apply(Chart AChart)
at Steema.TeeChart.WPF.Themes.TeeChartTheme.Apply(Chart AChart)
at Steema.TeeChart.WPF.Themes.OperaTheme.Apply()
at Steema.TeeChart.WPF.Chart.setTheme(ThemeType aTheme)
at Steema.TeeChart.WPF.TChart.set_CurrentTheme(ThemeType value)
-----------------------------------------

Also Setting Teechart Dock(TeeChart.Dock = DockStyle.Fill) gives a compile time error saying TChart does not contain a definition of Dock.
Please help further in order to overcome these issues.

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Appearance differs from Old version to New Teechart Assembly

Post by Christopher » Wed May 09, 2018 4:26 pm

Hello,

The code I posted is for TeeChart.dll, the Windows Forms version of TeeChart. Using the TeeChart.WPF.dll, the WPF version of TeeChart, the following code is required:

Code: Select all

		public MainWindow()
		{
			InitializeComponent();
			TChart chart = new TChart();
			chart.Margin = new Thickness(0);
			chart.Header.Text = Utils.Version;
			Steema.TeeChart.WPF.Styles.Line series = new Steema.TeeChart.WPF.Styles.Line(chart.Chart);
			this.grid1.Children.Add(chart);


			chart.CurrentTheme = ThemeType.Opera;
		}
which gives:
TeeChartPro_WPF_2018-05-09_18-24-14.png
TeeChartPro_WPF_2018-05-09_18-24-14.png (6.21 KiB) Viewed 25638 times
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

YTI
Newbie
Newbie
Posts: 15
Joined: Wed May 24, 2017 12:00 am

Re: Appearance differs from Old version to New Teechart Assembly

Post by YTI » Fri May 11, 2018 1:10 pm

Hi Christopher,

Thank you for providing code related to Teechart.WPF.dll.
How to get the rectangular border using the latest assembly as you displayed in TeeChartPro_2018-05-09_14-12-13.png ?

Also when I apply the theme in a sample app, it does not throw any exception.
However when I use the theme application code line in my WPF, it crashes while applying theme. Any clue regarding this behavior?

-------------------------
System.NullReferenceException: Object reference not set to an instance of an object.
at Steema.TeeChart.WPF.Themes.ColorPalettes.ApplyPalette(Chart custom, Color[] Palette)
at Steema.TeeChart.WPF.Themes.ColorPalettes.ApplyPalette(Chart custom, Int32 Index)
at Steema.TeeChart.WPF.Drawing.Aspect.set_ColorPaletteIndex(Int32 value)
at Steema.TeeChart.WPF.Themes.CustomTheme.ChangeAspect(Aspect ChartAspect)
at Steema.TeeChart.WPF.Themes.CustomTheme.Apply(Chart AChart)
at Steema.TeeChart.WPF.Themes.TeeChartTheme.Apply(Chart AChart)
at Steema.TeeChart.WPF.Themes.OperaTheme.Apply()
at Steema.TeeChart.WPF.Chart.setTheme(ThemeType aTheme)
at Steema.TeeChart.WPF.TChart.set_CurrentTheme(ThemeType value)
------------------------

Thanks.

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Appearance differs from Old version to New Teechart Assembly

Post by Christopher » Mon May 14, 2018 8:11 am

Hello!
YTI wrote: Thank you for providing code related to Teechart.WPF.dll.
How to get the rectangular border using the latest assembly as you displayed in TeeChartPro_2018-05-09_14-12-13.png ?
Yes, there are two lines you can add to obtain this border, i.e.

Code: Select all

		public MainWindow()
		{
			InitializeComponent();
			TChart chart = new TChart();
			chart.Margin = new Thickness(0);
			chart.Header.Text = Utils.Version;
			Steema.TeeChart.WPF.Styles.Line series = new Steema.TeeChart.WPF.Styles.Line(chart.Chart);
			this.grid1.Children.Add(chart);


			chart.CurrentTheme = ThemeType.Opera;

			chart.Walls.Back.Visible = true;
			chart.Walls.Back.Pen.Visible = true;
		}
YTI wrote: Also when I apply the theme in a sample app, it does not throw any exception.
However when I use the theme application code line in my WPF, it crashes while applying theme. Any clue regarding this behavior?
No clues from the stack trace I'm afraid - could you please send me some code with which I can reproduce the problem here?
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

YTI
Newbie
Newbie
Posts: 15
Joined: Wed May 24, 2017 12:00 am

Re: Appearance differs from Old version to New Teechart Assembly

Post by YTI » Mon May 14, 2018 3:28 pm

Hi Christopher,

Thanks for sharing two new properties related to Border.
Were these properties enabled by default previously and turned off in later versions?

Please find a sample project to note the difference between the old and new assembly of TeeChart.WPF.dll.
Kindly add the reference of the versions as I mentioned earlier and see the notable differences.

Thanks
Attachments
WpfAppTeechart.zip
SampleProjectToSeeTheDIfferenceBetweenOldAndNewAssembly
(263.7 KiB) Downloaded 893 times

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Appearance differs from Old version to New Teechart Assembly

Post by Christopher » Tue May 15, 2018 2:46 pm

Hello,

Okay, I think we have a solution. Using the following code in the two versions I obtain:

Code: Select all

		TChart tChart1 = new TChart(false); //<- set false in the constructor for latest version
		public MainWindow()
		{
			string Version()
			{
				string version = typeof(Chart).Assembly.GetName().Version.ToString();

				if (version.Length == 13)
					version = version.Insert(9, "0");

				return version;
			}

			InitializeComponent();

			tChart1.Legend.Visible = false;
			tChart1.Aspect.View3D = false;

			tChart1.Panel.MarginLeft = 1;
			tChart1.Panel.MarginRight = 1;
			tChart1.Panel.MarginTop = 10;
			tChart1.ClipToBounds = true;
			tChart1.Aspect.ClipPoints = true;

			UpdateTeechartBasicSettings();
			UpdateTeeChartDisplaySetting();
			FillTeeChartSeriesDataDesignTime();

			tChart1.Header.Text = Version();
			this.grid1.Children.Add(tChart1);
		}
WpfAppTeechart_2018-05-15_16-42-29.png
WpfAppTeechart_2018-05-15_16-42-29.png (11.08 KiB) Viewed 25565 times
WpfAppTeechart_2018-05-15_16-43-40.png
WpfAppTeechart_2018-05-15_16-43-40.png (11.05 KiB) Viewed 25565 times
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

YTI
Newbie
Newbie
Posts: 15
Joined: Wed May 24, 2017 12:00 am

Re: Appearance differs from Old version to New Teechart Assembly

Post by YTI » Wed May 16, 2018 12:45 pm

Hi Christopher,

In the sample app, we created the Teechart module in code behind. However in our actual application, the teechart component is created in XAML file, so no code behind initialization. In this case, how to setup the 'setTheme' flag? Suggest me the equivalent property name please. Also in my previous image 2.jpg(New version) you can see that the vertical lines aren't aligned properly. I am not able to replicate that behavior with my sample application. Any idea about the fix for that issue ?
Also what is the significance of the 'string Version()' method within mainWindow method in your last provided code snapshot?

We are able to identify 2 downgrades from old version to new till now, but not sure how many are hidden yet.
Will it be possible for you to provide us the old version only with the out of memory fix as mentioned in previously link?

Thanks,

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Appearance differs from Old version to New Teechart Assembly

Post by Christopher » Wed May 16, 2018 12:52 pm

YTI wrote: In the sample app, we created the Teechart module in code behind. However in our actual application, the teechart component is created in XAML file, so no code behind initialization. In this case, how to setup the 'setTheme' flag? Suggest me the equivalent property name please.
There is no equivalent property, this flag only exists in the constructor. However, given that you will have made no changes to the Chart at designtime in XAML you will lose no information whatsoever by instantiating the Chart at runtime.
YTI wrote: Also in my previous image 2.jpg(New version) you can see that the vertical lines aren't aligned properly. I am not able to replicate that behavior with my sample application. Any idea about the fix for that issue ?
Without being able to reproduce the problem here I'm afraid I have no idea for a fix to it.
YTI wrote: Also what is the significance of the 'string Version()' method within mainWindow method in your last provided code snapshot?
It is so you can see that I am using the relevant version of the TeeChart.WPF.dll in my screenshots.
YTI wrote: We are able to identify 2 downgrades from old version to new till now, but not sure how many are hidden yet.
Will it be possible for you to provide us the old version only with the out of memory fix as mentioned in previously link?
No, this will not be possible.
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

YTI
Newbie
Newbie
Posts: 15
Joined: Wed May 24, 2017 12:00 am

Re: Appearance differs from Old version to New Teechart Assembly

Post by YTI » Tue May 22, 2018 8:11 am

Hi Christopher,

I can understand the limitations you are facing in supporting our issue.
But our client is adamant towards finding a resolution of this issue.

Does our license provide source code access of Teechart WPF dll?
If not, do you have any other higher license plan with source code access ?

Thanks in advance.

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Appearance differs from Old version to New Teechart Assembly

Post by Christopher » Tue May 22, 2018 8:37 am

Hello,
YTI wrote: Does our license provide source code access of Teechart WPF dll?
If not, do you have any other higher license plan with source code access ?
Yes, there is a source-code version of TeeChart.WPF which can be ordered from here:
https://www.steema.com/product/net#pricing
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Post Reply