Piechart, adding items to the piechart error
Piechart, adding items to the piechart error
Hello,
I am getting an error when im trying to add items to the piechart. A colleague also encoutered the same problem but with a different control.
The error is:
Width must be non-negative.
When i add items to the piechart with a small width, everything works fine, but with a little bit larger objects it crashes.
Can this be fixed?
tnx in advance
I am getting an error when im trying to add items to the piechart. A colleague also encoutered the same problem but with a different control.
The error is:
Width must be non-negative.
When i add items to the piechart with a small width, everything works fine, but with a little bit larger objects it crashes.
Can this be fixed?
tnx in advance
Re: Piechart, adding items to the piechart error
Hi SPS,
Could you please attach here a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
Could you please attach here a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Piechart, adding items to the piechart error
Hi, ofcourse. Check it out.
Play a little bit with the measurements of the window, when the width is big enough it works else it doesnt.
Play a little bit with the measurements of the window, when the width is big enough it works else it doesnt.
- Attachments
-
- TestCharting.rar
- (11.92 KiB) Downloaded 468 times
Re: Piechart, adding items to the piechart error
Hi SPS,
The example project you've sent is using the GSLibrary that I don't have here. Could you please send us a simple example that only uses the default libraries and the TeeChart one?
Thanks in advance.
Update:
I've removed the reference and changed the chart construction and could reproduce it. I'm investigating what's happening.
The example project you've sent is using the GSLibrary that I don't have here. Could you please send us a simple example that only uses the default libraries and the TeeChart one?
Thanks in advance.
Update:
I've removed the reference and changed the chart construction and could reproduce it. I'm investigating what's happening.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Piechart, adding items to the piechart error
Hi,
Oops sorry for that, i'm glad you got it to work.
And tnx for taking a look at it.
Oops sorry for that, i'm glad you got it to work.
And tnx for taking a look at it.
Re: Piechart, adding items to the piechart error
Hi SPS,
It seems that there is a problem in WPF that makes the application cash when having a too width mark. I've added it to the wish list to be fixed in future releases (TW16014509) but in the meanwhile maybe you could check that the labels length isn't too large. For example you could use series' marks OnGetMarksText event as follows:
It seems that there is a problem in WPF that makes the application cash when having a too width mark. I've added it to the wish list to be fixed in future releases (TW16014509) but in the meanwhile maybe you could check that the labels length isn't too large. For example you could use series' marks OnGetMarksText event as follows:
Code: Select all
public Window1()
{
InitializeComponent();
tchart.Chart.Series.Add(new Steema.TeeChart.WPF.Styles.Pie());
tchart.Chart.Aspect.View3D = false;
tchart.Legend.Visible = false;
tchart.Chart.Series[0].Add(4, "TESTESTETETETETEETETETETTESTESTETETETETEETETETET");
tchart.Chart.Series[0].Add(6, "s");
tchart.Chart.Series[0].Add(1, "s");
tchart.Chart.Series[0].Add(9, "s");
tchart.Chart.Series[0].Add(4, "s");
tchart[0].GetSeriesMark += new Steema.TeeChart.WPF.Styles.Series.GetSeriesMarkEventHandler(Window1_GetSeriesMark);
}
void Window1_GetSeriesMark(Steema.TeeChart.WPF.Styles.Series series, Steema.TeeChart.WPF.Styles.GetSeriesMarkEventArgs e)
{
if (e.MarkText.Length > 20)
{
e.MarkText = e.MarkText.Substring(0, 17) + "...";
}
}
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Piechart, adding items to the piechart error
Thank you, but your workaround also works when the window is being resized?
Re: Piechart, adding items to the piechart error
Hi SPS,
It was an example of workaround. If your chart will be resized, the 20 constant (note that the 17 constant is the 20 without the three points) should be recalculated. This will probably be proportional to the Chart width.
It was an example of workaround. If your chart will be resized, the 20 constant (note that the 17 constant is the 20 without the three points) should be recalculated. This will probably be proportional to the Chart width.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Piechart, adding items to the piechart error
Hello,
Is there some news about this issue, because the solution you gave me, will sometimes still create an error.
I hope it will be fixed in the next release?
Thanks in advance.
Is there some news about this issue, because the solution you gave me, will sometimes still create an error.
I hope it will be fixed in the next release?
Thanks in advance.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Piechart, adding items to the piechart error
Hi SPS,
No, this issue hasn't been fixed yet. When do those errors occur?
Thanks in advance.
No, this issue hasn't been fixed yet. When do those errors occur?
Thanks in advance.
Best Regards,
Narcís Calvet / 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 |
Re: Piechart, adding items to the piechart error
It depends on the information that is being shown in the piechart, with large information it will still crash even with the solution you gave me.
I see there is a new release, isnt it fixed in that release?
I see there is a new release, isnt it fixed in that release?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Piechart, adding items to the piechart error
Hi SPS,
Can you please attach a simple example project with which we can reproduce the issue here?It depends on the information that is being shown in the piechart, with large information it will still crash even with the solution you gave me.
No, it's not listed in the release notes mentioned in the new release announcement.I see there is a new release, isnt it fixed in that release?
Best Regards,
Narcís Calvet / 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 |
Re: Piechart, adding items to the piechart error
Hello, i was wondering if there is a solution already. It has been a couple of months ago and we need it to move on.
Re: Piechart, adding items to the piechart error
Hi SPS,
I'm afraid that the ticket with number [TW16014509] hasn't been closed yet. Please, be aware at this forum or subscribe to our RSS news feed for new release announcements and what's implemented on them.
I'm afraid that the ticket with number [TW16014509] hasn't been closed yet. Please, be aware at this forum or subscribe to our RSS news feed for new release announcements and what's implemented on them.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |