Hello,
I think I found a bug. The charts hangs when I'm trying to set the minimun or maximum of a second Y-Axis in Code (it works for YAxes[0]).
It is easy to reproduce this bug by extending the ExampleSeveralAxesXY Code-Behind by adding a button and this Click-Handler:
private void Button_Click(object sender, RoutedEventArgs e)
{
m_chart.BeginUpdate();
m_chart.ViewXY.YAxes[1].Minimum = 0;
m_chart.ViewXY.YAxes[1].Minimum = 1000;
m_chart.EndUpdate();
}
Best regards
Mathias
Error when setting YAxis Minimum/Maximum
Moderator: Queue Moderators
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: Error when setting YAxis Minimum/Maximum
Hi Mathias,
if calling it like that, it hangs in infinite loop. I haven't traced the problem but it definitely shouldn't do that.
Please set the Maximum instead of minimum second time
m_chart.BeginUpdate();
m_chart.ViewXY.YAxes[1].Minimum = 0;
m_chart.ViewXY.YAxes[1].Maximum = 1000;
m_chart.EndUpdate();
Then it works.
Yet better is to use
m_chart.BeginUpdate();
m_chart.ViewXY.YAxes[1].SetRange(0,1000);
m_chart.EndUpdate();
if calling it like that, it hangs in infinite loop. I haven't traced the problem but it definitely shouldn't do that.
Please set the Maximum instead of minimum second time
m_chart.BeginUpdate();
m_chart.ViewXY.YAxes[1].Minimum = 0;
m_chart.ViewXY.YAxes[1].Maximum = 1000;
m_chart.EndUpdate();
Then it works.
Yet better is to use
m_chart.BeginUpdate();
m_chart.ViewXY.YAxes[1].SetRange(0,1000);
m_chart.EndUpdate();
LightningChart Support Team, PT
-
- Posts: 3
- Joined: Sat Nov 29, 2014 3:54 pm
Re: Error when setting YAxis Minimum/Maximum
Hi Pasi,
you are right, my example was wrong. It is not that easy to reproduce my error.
In my application the YAxis Minimum is NaN and then it ends up in the same infinite loop, but I don't now why it is NaN.
I will try to create a small code example.
Best regards
Mathias
you are right, my example was wrong. It is not that easy to reproduce my error.
In my application the YAxis Minimum is NaN and then it ends up in the same infinite loop, but I don't now why it is NaN.
I will try to create a small code example.
Best regards
Mathias
-
- Posts: 3
- Joined: Sat Nov 29, 2014 3:54 pm
Re: Error when setting YAxis Minimum/Maximum
Hello Pasi,
using SetRange() solved my problem at the moment ... thank you
using SetRange() solved my problem at the moment ... thank you
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: Error when setting YAxis Minimum/Maximum
Fixed in 6.3.1 today...
LightningChart Support Team, PT