In WPF TChart (3.5.3498.27368) I can use this code for Histogram series:
series.Delete(0, series.Count);
All works Ok. But in the latest 3.5.3700.30575 version when series.Count > 1 I get an exception "Index out of range"
System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
в System.ThrowHelper.ThrowArgumentOutOfRangeException()
в System.Collections.ObjectModel.Collection`1.RemoveAt(Int32 index)
в Steema.TeeChart.WPF.Styles.ColorList.RemoveRange(Int32 index, Int32 count)
в Steema.TeeChart.WPF.Styles.Series.Delete(Int32 index, Int32 count, Boolean removeGap)
в Steema.TeeChart.WPF.Styles.Series.Delete(Int32 index, Int32 count)
What to do?
Bug in WPF 3.5.3700.30575 (no in 3.5.3498.27368!)
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Bug in WPF 3.5.3700.30575 (no in 3.5.3498.27368!)
Hi Neurosoft,
It works fine for me here using code below with 3.5.3700.30575. Does this work fine at your end? Can you attach a simple example project we can run "as-is" to reproduce the problem here?
Thanks in advance.
It works fine for me here using code below with 3.5.3700.30575. Does this work fine at your end? Can you attach a simple example project we can run "as-is" to reproduce the problem here?
Code: Select all
public Window1()
{
InitializeComponent();
InitializeChart();
}
private Steema.TeeChart.WPF.Styles.Histogram histogram1;
private void InitializeChart()
{
histogram1 = new Steema.TeeChart.WPF.Styles.Histogram(tChart1.Chart);
histogram1.FillSampleValues();
}
private void button1_Click(object sender, RoutedEventArgs e)
{
histogram1.Delete(0, histogram1.Count);
}
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: Bug in WPF 3.5.3700.30575 (no in 3.5.3498.27368!)
Narcís!
For bug reproduce only change
histogram1.FillSampleValues();
to this code
histogram1.Add(10, 10, string.Empty, Colors.Beige);
histogram1.Add(20, 20, string.Empty, Colors.Beige);
Regards
For bug reproduce only change
histogram1.FillSampleValues();
to this code
histogram1.Add(10, 10, string.Empty, Colors.Beige);
histogram1.Add(20, 20, string.Empty, Colors.Beige);
Regards
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Bug in WPF 3.5.3700.30575 (no in 3.5.3498.27368!)
Hi Neurosoft,
Thanks for the feedback. I could reproduce the issue and added it (TW16014781) to the defect list to be fixed. In the meantime a workaround is using code below. The problem is in point colors ValueList.
Thanks for the feedback. I could reproduce the issue and added it (TW16014781) to the defect list to be fixed. In the meantime a workaround is using code below. The problem is in point colors ValueList.
Code: Select all
public Window1()
{
InitializeComponent();
InitializeChart();
}
private Steema.TeeChart.WPF.Styles.Histogram histogram1;
private void InitializeChart()
{
histogram1 = new Steema.TeeChart.WPF.Styles.Histogram(tChart1.Chart);
histogram1.Color = Colors.Beige;
histogram1.Add(10, 10);//, string.Empty, Colors.Beige);
histogram1.Add(20, 20);//, string.Empty, Colors.Beige);
}
private void button1_Click(object sender, RoutedEventArgs e)
{
histogram1.Delete(0, histogram1.Count);
}
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: Bug in WPF 3.5.3700.30575 (no in 3.5.3498.27368!)
Hello Narcís!
I need each bar with different color, so your workaround is not useful for me.
Thanks for you care, we shall wait bug fix
I need each bar with different color, so your workaround is not useful for me.
Thanks for you care, we shall wait bug fix