Message " xx is not a valid value " GAUGE series

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Adrian
Advanced
Posts: 116
Joined: Thu Jun 23, 2005 4:00 am

Message " xx is not a valid value " GAUGE series

Post by Adrian » Fri Jan 11, 2008 1:56 am

I have created a gauge series in code where the default min (0) and max (100) values have been used however my value is say 279. The gauge is created however if I try to edit the chart using the chart editor I get the following error
Message "'279.048611111111' is not a valid value for 'Value'. 'Value' should be between 'Minimum' and 'Maximum'."
While I can correct this by traping the error amd then making the max greater than the value in the message I think it should be handled better by the chart editor... i.e. it should lem me edit the chart so I can manually set the min and max values.
Adrian Heald
Captell Developments
www.captelldevelopments.com

Adrian
Advanced
Posts: 116
Joined: Thu Jun 23, 2005 4:00 am

Post by Adrian » Fri Jan 11, 2008 3:08 am

Further to this problem

I can't replicate this in your demo because your demo keeps resetting the value. However I believe there is a problem when a gauge is created where the value falls outside of the maximum value for the gauge. The gauge can be created but an error is thrown when the chart editor is started.

See the following code snipet form my app.

Code: Select all

 Try
         tcE.HideTabs = tcEHiddenTabs
         tcE.ShowModal()   <====== fails here, TCE is the chart editor
         m_chart.bChanged = True

      Catch ex As Exception
         Try
            If ex.Message.EndsWith("is not a valid value for 'Value'. 'Value' should be between 'Minimum' and 'Maximum'.") Then
               Dim dValue As Double
               Dim s As String
               Dim serGauge As Steema.TeeChart.Styles.Gauges
               s = ex.Message.Substring(ex.Message.IndexOf("'") + 1)
               dValue = s.Substring(0, s.IndexOf("'") - 1)
               serGauge = tc.Series(0)
               If dValue < serGauge.Minimum Then serGauge.Minimum = Int(dValue - 10)
               If dValue > serGauge.Maximum Then serGauge.Maximum = Int(dValue + 10)
               MessageBox.Show("Gauge range automatically increased as the value fell outside of the range", "Gauge range changed", MessageBoxButtons.OK, MessageBoxIcon.Information)
            End If

            ' sometimes the first call to tce.showmodal causes an "Object not set error" but second call works so ere we go
            tcE.ShowModal()
            m_chart.bChanged = True
         Catch ex2 As Exception
            m_control.log.LogMsg(ex2.Message, True, Captell_Constants.LOG_MESSAGE_TYPES.Error, -98, m_chart.m_iChartID, Me)
         End Try
      End Try

if the gauge value is outsige the range of minimum and maximum then the chart editor throws the error which I trap and then attempt to set the range greater than the value but the error is thrown again on the second call to open the chart editor.
Adrian Heald
Captell Developments
www.captelldevelopments.com

Adrian
Advanced
Posts: 116
Joined: Thu Jun 23, 2005 4:00 am

Post by Adrian » Fri Jan 11, 2008 3:11 am

also on your sample

Welcome! --> Chart styles --> Standard --> Gauges

Click the edit button.

Can't seem to set the Value greater than 100.... is this a designed limitation or a bug. I can set the maximum number of ticks greater than 100.
Adrian Heald
Captell Developments
www.captelldevelopments.com

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Jan 11, 2008 9:29 am

Hello Adrian,

Thanks for the information. I've added your request (TF02012706) to our defect list to be enhanced for next releases.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Adrian
Newbie
Newbie
Posts: 34
Joined: Thu Oct 25, 2007 12:00 am

Post by Adrian » Thu Jan 24, 2008 10:46 pm

Tested with V 3.2.2945.19736, not fixed

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Jan 25, 2008 12:47 pm

Hi Adrian,

This defect was assigned a bug-tracking number before the release of version 3.2.2945.19736. Therefore, if the defect had been fixed for this release then mention of it together with its reference number would have appeared in the release notes. As you can see in the release notes here:

http://www.steema.com/files/public/teec ... elease.txt

No mention of the defect being resolved is made. As a general rule of thumb, and to save you time, one can consider defects which are not stated as resolved in the release notes as still being a problematic issue. In this sense, there is little need for you to check that they are still there.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply