Dear Support ,
I’m afraid I have to disturb me again. I added a “Numeric Gauge” series to the TeeChart(ActiveX) control. Then I wrote the following codes in my program:
m_TChart.Series(0).SetValueFormat("10:00");
When I ran my program, I found that the result displayed on the dialog is “10:04”. The last number ‘0’ became ‘4’. I also found that this phenomenon is very common in any number sequence.
In “Polar” or “Point” series, I want to know whether the return value is the index of new generated point for the function:
int nIndex = m_TeeChart.Series(0).GetAsPolar().AddPolar()
But I found that, the collection of “nIndex” had several repeated values, when using a loop to generate several points. So I doubted the return value of the function mentioned before is not the index.
I also want to know how to get the index of the specified point in a series?
Dear Support, I have some troubles
Hi Gobing,
For example, note the difference between the following codes:
Here we are printing the value forcing three decimals after the "coma". Result: 25.760.
Here we are forcing to print the value only with integer part (there is no coma) so it will be rounded. And we are printing the value forcing four digits and with a "strange" character between some of the characters. Result: 0:026
Polar series: The problem here is the order. Each time you add a point to this series, the value list is reordered by angle reassigning the indexes. That's why this code returns non sequential numbers, but the correct index assigned in the value list for the entered new point:
If you want you could force not to do this reorder process with this:
The TextFormat is used to print the Value in the series with an specific visual aspect. The numbers in the string represents the number of digits that will be used to print the value, while the character '.' is used to separate the integer part from the decimal part. Other characters such as ':' will be printed as-is.Gobing wrote:I added a “Numeric Gauge” series to the TeeChart(ActiveX) control. Then I wrote the following codes in my program:
m_TChart.Series(0).SetValueFormat("10:00");
When I ran my program, I found that the result displayed on the dialog is “10:04”. The last number ‘0’ became ‘4’. I also found that this phenomenon is very common in any number sequence.
For example, note the difference between the following codes:
Code: Select all
TChart1.AddSeries scNumericGauge
TChart1.Series(0).asNumericGauge.Value = 25.76
TChart1.Series(0).ValueFormat = "0.000"
Code: Select all
TChart1.AddSeries scNumericGauge
TChart1.Series(0).asNumericGauge.Value = 25.76
TChart1.Series(0).ValueFormat = "0:000"
Point series: It seems to work fine here with the following code:Gobing wrote:In “Polar” or “Point” series, I want to know whether the return value is the index of new generated point for the function:
int nIndex = m_TeeChart.Series(0).GetAsPolar().AddPolar()
But I found that, the collection of “nIndex” had several repeated values, when using a loop to generate several points. So I doubted the return value of the function mentioned before is not the index.
Code: Select all
Private Sub Command1_Click()
TChart1.Header.Text.Text = Str(TChart1.Series(0).Add(Rnd * 1000, "", clTeeColor))
End Sub
Private Sub Form_Load()
TChart1.AddSeries scPoint
End Sub
Code: Select all
Private Sub Command1_Click()
TChart1.Header.Text.Text = Str(TChart1.Series(0).asPolar.AddPolar(Rnd * 360, Rnd * 1000, "", clTeeColor))
End Sub
Private Sub Form_Load()
TChart1.AddSeries scPolar
End Sub
Code: Select all
TChart1.Series(0).XValues.Order = loNone
Maybe I answered this with the answers above. If you want to retrieve the point index (ValueIndex) in an other situation, please, try to specify more in what context are you trying to do that.Gobing wrote:I also want to know how to get the index of the specified point in a series?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 6
- Joined: Fri Jan 11, 2008 12:00 am
- Location: Chengdu City, Sichuan Province, PRC
- Contact:
Re: Dear Support, I have some troubles
I want to use the “Numeric Gauge” series to implement the digital display of time with the format “hour : minute : second”. How can I do that?
Re: Dear Support, I have some troubles
Hi Gobing,
Here is an example:
Here is an example:
Code: Select all
TChart1.AddSeries scNumericGauge
TChart1.Series(0).asNumericGauge.Value = Int(Format$(Now, "hmmss"))
TChart1.Series(0).ValueFormat = "0:00:00"
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 6
- Joined: Fri Jan 11, 2008 12:00 am
- Location: Chengdu City, Sichuan Province, PRC
- Contact:
Re: Dear Support, I have some troubles
Thank you for your help, sir. I’ve already resolved the problems mentioned above. To the “Numerical Gauge” series, I know how to change the palette property from “LCD(default)” to “LED” easily, just using the static edit dialog provided by the TeeChart Control. I try my best , but still could not find a method to change the palette property in my program dynamically. Could you help me, again ?
Re: Dear Support, I have some troubles
Hi Gobing,
Yes, the possibility to assign palettes for Gauges at design time is an enhancement already present on the wish list to be implemented in future releases (TA05012741). I've incremented its priority as several users asked for this feature.
Yes, the possibility to assign palettes for Gauges at design time is an enhancement already present on the wish list to be implemented in future releases (TA05012741). I've incremented its priority as several users asked for this feature.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |