3d barchart zdepth issue
-
- Newbie
- Posts: 93
- Joined: Thu Apr 17, 2008 12:00 am
3d barchart zdepth issue
Hi:
We have an issue with the zdepth of 3d barcharts. Please reference the attachments called "good.jpg" and "bad.jpg". We note that when the "bad" graph is displayed, the tchart.axes.depth.Minimum = -0.5. When is "good" it is 100.
Strangely, when the graph is first rendered it looks "good", but after we refresh the form (me.refresh) it looks "bad".
Also, interesting is when we use the zdepth tool to drag we can "fix" the graph to make it look "good". And if we resize our form during runtime to make it taller, after refreshing, the graph can be made to look "good".
So I'm thinking that the automatic zdepth calculations are not working all of the time. Do you have any suggestions? Maybe there are some "minimum" values we can set some properties to, or alter the way that automatic depth calculations are made?
Thanks,
Matt
We have an issue with the zdepth of 3d barcharts. Please reference the attachments called "good.jpg" and "bad.jpg". We note that when the "bad" graph is displayed, the tchart.axes.depth.Minimum = -0.5. When is "good" it is 100.
Strangely, when the graph is first rendered it looks "good", but after we refresh the form (me.refresh) it looks "bad".
Also, interesting is when we use the zdepth tool to drag we can "fix" the graph to make it look "good". And if we resize our form during runtime to make it taller, after refreshing, the graph can be made to look "good".
So I'm thinking that the automatic zdepth calculations are not working all of the time. Do you have any suggestions? Maybe there are some "minimum" values we can set some properties to, or alter the way that automatic depth calculations are made?
Thanks,
Matt
- Attachments
-
- bad.jpg (64.41 KiB) Viewed 13352 times
-
- good.jpg (74.63 KiB) Viewed 13345 times
Re: 3d barchart zdepth issue
Hello biqpaulson,
I couldn't reproduce your problem using last version of TeeChart.Net and next code:
Can you tell please if you can reproduce your problem using previous code?
Thanks,
I couldn't reproduce your problem using last version of TeeChart.Net and next code:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
for (int i = 0; i < 25; i++)
{
new Steema.TeeChart.Styles.Bar(tChart1.Chart);
if (i < 10)
{
tChart1[i].FillSampleValues(50);
}
else if (i > 10 && i < 20)
{
tChart1[i].FillSampleValues(15);
}
else
{
tChart1[i].FillSampleValues(4);
}
tChart1[i].Marks.Visible = false;
(tChart1[i] as Steema.TeeChart.Styles.Bar).MultiBar = MultiBars.None;
}
tChart1.Axes.Depth.Automatic=false;
tChart1.Axes.Depth.Minimum = -0.5;
tChart1.Axes.Depth.Maximum = 25;
}
private void button1_Click(object sender, EventArgs e)
{
tChart1.Draw();
}
Thanks,
Best Regards,
Sandra Pazos / 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 |
-
- Newbie
- Posts: 93
- Joined: Thu Apr 17, 2008 12:00 am
Re: 3d barchart zdepth issue
Hi:
We are a vb.net customers. Never the less, the following line doesn't look correct to us:
new Steema.TeeChart.Styles.Bar(tChart1.Chart);
You create this object and then don't use it. Unless we don't understand this syntax. The converted vb code we used is here:
For i As Integer = 0 To 24
Dim foo As New Steema.TeeChart.Styles.Bar
TChart1.Series.Add(New Steema.TeeChart.Styles.Bar(TChart1.Chart))
If i < 10 Then
TChart1(i).FillSampleValues(50)
ElseIf i > 10 AndAlso i < 20 Then
TChart1(i).FillSampleValues(15)
Else
TChart1(i).FillSampleValues(4)
End If
TChart1(i).Marks.Visible = False
foo.MultiBar = Steema.TeeChart.Styles.MultiBars.None
Next
tChart1.Axes.Depth.Automatic = False
tChart1.Axes.Depth.Minimum = -0.5
tChart1.Axes.Depth.Maximum = 25
But it only creates a 2d bar, not a 3x (x by y).
Thanks,
Matt
We are a vb.net customers. Never the less, the following line doesn't look correct to us:
new Steema.TeeChart.Styles.Bar(tChart1.Chart);
You create this object and then don't use it. Unless we don't understand this syntax. The converted vb code we used is here:
For i As Integer = 0 To 24
Dim foo As New Steema.TeeChart.Styles.Bar
TChart1.Series.Add(New Steema.TeeChart.Styles.Bar(TChart1.Chart))
If i < 10 Then
TChart1(i).FillSampleValues(50)
ElseIf i > 10 AndAlso i < 20 Then
TChart1(i).FillSampleValues(15)
Else
TChart1(i).FillSampleValues(4)
End If
TChart1(i).Marks.Visible = False
foo.MultiBar = Steema.TeeChart.Styles.MultiBars.None
Next
tChart1.Axes.Depth.Automatic = False
tChart1.Axes.Depth.Minimum = -0.5
tChart1.Axes.Depth.Maximum = 25
But it only creates a 2d bar, not a 3x (x by y).
Thanks,
Matt
-
- Newbie
- Posts: 93
- Joined: Thu Apr 17, 2008 12:00 am
Re: 3d barchart zdepth issue
Hi:
I have more information:
When our form resizes, we resize the chart automatically. We noticed that if we make the form taller, the problem goes away and the chart is rendered correctly. Now, here is the strange part:
As we resize to different heights, the problem comes and goes, but not in a linear sequence. For example we might see the following pattern as we resize the form to be larger and larger:
1) initial render fails
2) make form taller and render works
3) make form EVEN taller and render fails
4) make form EVEN taller and render works again.
Once you answer my question from the previous post can you please modify your sample code to resize the chart as the form resizes? And then play with the height of the form and see if you can see what we are seeing in the "bad" jpg?
Thanks,
Matt
I have more information:
When our form resizes, we resize the chart automatically. We noticed that if we make the form taller, the problem goes away and the chart is rendered correctly. Now, here is the strange part:
As we resize to different heights, the problem comes and goes, but not in a linear sequence. For example we might see the following pattern as we resize the form to be larger and larger:
1) initial render fails
2) make form taller and render works
3) make form EVEN taller and render fails
4) make form EVEN taller and render works again.
Once you answer my question from the previous post can you please modify your sample code to resize the chart as the form resizes? And then play with the height of the form and see if you can see what we are seeing in the "bad" jpg?
Thanks,
Matt
-
- Newbie
- Posts: 93
- Joined: Thu Apr 17, 2008 12:00 am
Re: 3d barchart zdepth issue
Also, anticipating your next request, we looked into upgrading from 2010 to 2011 version of your product, but it appears that it only supports the .net 4.0 framework. We are on version 3.5 and since some of our customers are large slow moving institutions, I don't think all of them are ready for the 4.0 .net platform yet. Is it possible to use to the 2011 product under 3.5?
Thanks,
Matt
Thanks,
Matt
Re: 3d barchart zdepth issue
Hello Matt,
First Question:
I have modified your code of C# to .vb :
Thanks,
First Question:
I have modified your code of C# to .vb :
Code: Select all
Imports Steema.TeeChart.Styles
Imports Steema.TeeChart
Public Class Form1
Public Sub New()
InitializeComponent()
InitializeChart()
End Sub
Private Sub InitializeChart()
TChart1.Dock = DockStyle.Fill
For i As Integer = 0 To 24
Dim bar As Steema.TeeChart.Styles.Bar = New Steema.TeeChart.Styles.Bar(TChart1.Chart)
If i < 10 Then
TChart1(i).FillSampleValues(50)
ElseIf i > 10 AndAlso i < 20 Then
TChart1(i).FillSampleValues(15)
Else
TChart1(i).FillSampleValues(4)
End If
TChart1(i).Marks.Visible = False
TryCast(TChart1(i), Steema.TeeChart.Styles.Bar).MultiBar = MultiBars.None
Next
TChart1.Axes.Depth.Automatic = False
TChart1.Axes.Depth.Minimum = -0.5
TChart1.Axes.Depth.Maximum = 25
End Sub
Private Sub button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
TChart1.Draw()
End Sub
Using previous code I can reproduce your problem. When you do the height of Chart =0 the chart only draw in the plane X and Y and for this reason I believe that the behavior of chart is correct, because bar series draws without height. If you doesn't agree with me, please explain why, so we can try to consider or not your problem, as bug.Once you answer my question from the previous post can you please modify your sample code to resize the chart as the form resizes? And then play with the height of the form and see if you can see what we are seeing in the "bad" jpg?
Yes, you can use last version of TeeChart.Net in .Net Frameworks 3.5, when you install the last version you can choose what Visual Studio you are using and install the version according your requirements.Also, anticipating your next request, we looked into upgrading from 2010 to 2011 version of your product, but it appears that it only supports the .net 4.0 framework. We are on version 3.5 and since some of our customers are large slow moving institutions, I don't think all of them are ready for the 4.0 .net platform yet. Is it possible to use to the 2011 product under 3.5?
Thanks,
Best Regards,
Sandra Pazos / 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 |
-
- Newbie
- Posts: 93
- Joined: Thu Apr 17, 2008 12:00 am
Re: 3d barchart zdepth issue
"Using previous code I can reproduce your problem. When you do the height of Chart =0 the chart only draw in the plane X and Y and for this reason I believe that the behavior of chart is correct, because bar series draws without height. If you doesn't agree with me, please explain why, so we can try to consider or not your problem, as bug. "
It appears that we were using the automatic setting for "TChart1.Axes.Depth.Automatic" -- I assume that was the default. So why do charts render with a min = -0.5 ever? This is the basic question we are trying to understand: Why does the package ever render 0 height charts when it's set to automatic and can we override this setting? I understand that when the form size change to a very small size, and the chart control also resizes, there is a point where rendering becomes impossible, but I don't think we are at that point in the "bad" image I attached.
Simple question: what setting will enforce the min rendering height? Or are you saying it's not possible?
Finally, you mention "height" -- your example doesn't mention height. To what are you referring?
--------------------------------------------------------------------
"Yes, you can use last version of TeeChart.Net in .Net Frameworks 3.5, when you install the last version you can choose what Visual Studio you are using and install the version according your requirements. "
I see -- there is a "select components" option. I selected 3.5 and DevStudio 2010. When I ran the install I received an error (see attached installerror1.jpg).
And when I ran the demo, I received the following stack trace:
************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'TeeChart, Version=4.1.2012.1033, Culture=neutral, PublicKeyToken=9c8126276c77bdb7' or one of its dependencies. The system cannot find the file specified.
File name: 'TeeChart, Version=4.1.2012.1033, Culture=neutral, PublicKeyToken=9c8126276c77bdb7'
at Steema.TeeChart.Samples.MainForm.ShowForm(TreeView tree)
at Steema.TeeChart.Samples.MainForm.treeView1_AfterSelect(Object sender, TreeViewEventArgs e)
at System.Windows.Forms.TreeView.TvnSelected(NMTREEVIEW* nmtv)
at System.Windows.Forms.TreeView.WmNotify(Message& m)
at System.Windows.Forms.TreeView.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.239 (RTMGDR.030319-2300)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
TeeChartNetExamples
Assembly Version: 4.1.2012.1033
Win32 Version: 4.1.2012.1033
CodeBase: file:///C:/Program%20Files%20(x86)/Steema%20Software/Steema%20TeeChart%20for%20.NET%202011%204.1.2012.01030/Examples/DemoProject/bin/ExecutableDemo/TeeChartNetExamples.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.235 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.236 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Finally, when I removed the 2010 reference from our project and added in the new 2011/3.5 reference, I received the following error from the debugger when our teechart form attempted to load:
{"Could not load file or assembly 'TeeChart, Version=4.1.2012.1032, Culture=neutral, PublicKeyToken=9c8126276c77bdb7' or one of its dependencies. An attempt was made to load a program with an incorrect format."}
I would say that the upgrade did not go well. Is there something else I need to do besides change the project reference to the dll?
It appears that we were using the automatic setting for "TChart1.Axes.Depth.Automatic" -- I assume that was the default. So why do charts render with a min = -0.5 ever? This is the basic question we are trying to understand: Why does the package ever render 0 height charts when it's set to automatic and can we override this setting? I understand that when the form size change to a very small size, and the chart control also resizes, there is a point where rendering becomes impossible, but I don't think we are at that point in the "bad" image I attached.
Simple question: what setting will enforce the min rendering height? Or are you saying it's not possible?
Finally, you mention "height" -- your example doesn't mention height. To what are you referring?
--------------------------------------------------------------------
"Yes, you can use last version of TeeChart.Net in .Net Frameworks 3.5, when you install the last version you can choose what Visual Studio you are using and install the version according your requirements. "
I see -- there is a "select components" option. I selected 3.5 and DevStudio 2010. When I ran the install I received an error (see attached installerror1.jpg).
And when I ran the demo, I received the following stack trace:
************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'TeeChart, Version=4.1.2012.1033, Culture=neutral, PublicKeyToken=9c8126276c77bdb7' or one of its dependencies. The system cannot find the file specified.
File name: 'TeeChart, Version=4.1.2012.1033, Culture=neutral, PublicKeyToken=9c8126276c77bdb7'
at Steema.TeeChart.Samples.MainForm.ShowForm(TreeView tree)
at Steema.TeeChart.Samples.MainForm.treeView1_AfterSelect(Object sender, TreeViewEventArgs e)
at System.Windows.Forms.TreeView.TvnSelected(NMTREEVIEW* nmtv)
at System.Windows.Forms.TreeView.WmNotify(Message& m)
at System.Windows.Forms.TreeView.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.239 (RTMGDR.030319-2300)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
TeeChartNetExamples
Assembly Version: 4.1.2012.1033
Win32 Version: 4.1.2012.1033
CodeBase: file:///C:/Program%20Files%20(x86)/Steema%20Software/Steema%20TeeChart%20for%20.NET%202011%204.1.2012.01030/Examples/DemoProject/bin/ExecutableDemo/TeeChartNetExamples.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.235 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.236 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Finally, when I removed the 2010 reference from our project and added in the new 2011/3.5 reference, I received the following error from the debugger when our teechart form attempted to load:
{"Could not load file or assembly 'TeeChart, Version=4.1.2012.1032, Culture=neutral, PublicKeyToken=9c8126276c77bdb7' or one of its dependencies. An attempt was made to load a program with an incorrect format."}
I would say that the upgrade did not go well. Is there something else I need to do besides change the project reference to the dll?
- Attachments
-
- installerror1.jpg (43.34 KiB) Viewed 13284 times
Re: 3d barchart zdepth issue
Hello biqpaulson,
1.- You can check the checkBox DockChart you can see in the form name where appears the height of Panel and if you change height of panel you can get minimum value allow you draw in 3D view Chart, correctly.
2.- You can set visible true the Axes depht and TopDepht and check if the scale are correct.
3.- You can uncheck DockChart and move the Horizonal Bar to check what is the axes limit position of chart where it is drawn fine, in 3D view , you can see the values in the Form name. If in previous example, I still understand your problem, please send us a simple example and the steps to reproduce it.
I hope will helps.
Thanks,
First, I inform you that if you use tChart1.Axes.depht.Minimum or tChart1.Axes.depth.Maximum you are modifying the scale of axes depth. To get the height of Axes you need the subtract between StartPosition and EndPosition of axis, this would be helpful for you to calculate the min rendering height as chart draw in 3D view. I have made a simple example where you can do next tests:what setting will enforce the min rendering height? Or are you saying it's not possible?
1.- You can check the checkBox DockChart you can see in the form name where appears the height of Panel and if you change height of panel you can get minimum value allow you draw in 3D view Chart, correctly.
2.- You can set visible true the Axes depht and TopDepht and check if the scale are correct.
3.- You can uncheck DockChart and move the Horizonal Bar to check what is the axes limit position of chart where it is drawn fine, in 3D view , you can see the values in the Form name. If in previous example, I still understand your problem, please send us a simple example and the steps to reproduce it.
I am referring of height of axes and panel, when its dock style is fill and you move it.Finally, you mention "height" -- your example doesn't mention height. To what are you referring?
Can you tell us exactly steps we need do to reproduce your problem, because I couldn't reproduce it here? On the other hand, I recommend you check if you have all permissions to works with this folder, so, check if permissions aren't in read only.I see -- there is a "select components" option. I selected 3.5 and DevStudio 2010. When I ran the install I received an error (see attached installerror1.jpg).
And when I ran the demo, I received the following stack trace:
I hope will helps.
Thanks,
Best Regards,
Sandra Pazos / 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 |
-
- Newbie
- Posts: 93
- Joined: Thu Apr 17, 2008 12:00 am
Re: 3d barchart zdepth issue
Hi Sandra:
We are not making any progress on either front. So for now, let's focus on the zdepth issue. Also, since you can't seem to recreate the issue, and non of your suggestions have had any effect, let's try a different approach:
We have noticed that when we see a "bad" chart (flat, no-z), we can enable one of your built in tools and use the mouse to drag the zdepth around, and we can FIX the graph -- i.e make it look reasonable. The code to enable your tool looks like this:
CurrentTChart.Tag.DChart = True
So, when this built-in tool is active, specifically what chart properties is it changing? If we could know the answer to this question, we could work with those properties during the creation of the graph and hopefully get better results.
Does this sound reasonable?
Thanks,
Matt
We are not making any progress on either front. So for now, let's focus on the zdepth issue. Also, since you can't seem to recreate the issue, and non of your suggestions have had any effect, let's try a different approach:
We have noticed that when we see a "bad" chart (flat, no-z), we can enable one of your built in tools and use the mouse to drag the zdepth around, and we can FIX the graph -- i.e make it look reasonable. The code to enable your tool looks like this:
CurrentTChart.Tag.DChart = True
So, when this built-in tool is active, specifically what chart properties is it changing? If we could know the answer to this question, we could work with those properties during the creation of the graph and hopefully get better results.
Does this sound reasonable?
Thanks,
Matt
-
- Newbie
- Posts: 93
- Joined: Thu Apr 17, 2008 12:00 am
Re: 3d barchart zdepth issue
Hi Sandra:
We have made some progress. It turns out once we enable the 3d tool, we were trapping mouse moves and adjusting the chart ourselves. I had that wrong -- sorry. Anyway we determined that the chart.aspect.chart3dpercent was the property we were looking for. So now, we can adjust this value on "busy" charts to get a reasonable rendering.
I will work on the 2011 install issues today and get back to you with status.
Thanks,
Matt
We have made some progress. It turns out once we enable the 3d tool, we were trapping mouse moves and adjusting the chart ourselves. I had that wrong -- sorry. Anyway we determined that the chart.aspect.chart3dpercent was the property we were looking for. So now, we can adjust this value on "busy" charts to get a reasonable rendering.
I will work on the 2011 install issues today and get back to you with status.
Thanks,
Matt
Re: 3d barchart zdepth issue
Hello Matt,
Thanks for your information. I am glad that you have found a solution for your problem . If you have more problems, please let me know.
Thanks,
Thanks for your information. I am glad that you have found a solution for your problem . If you have more problems, please let me know.
Thanks,
Best Regards,
Sandra Pazos / 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 |