This question is locked. New answers and comments are not allowed.
Greetings,
I'm experiencing some problems which I can describe as follows:
Ranges:
Setting the Min and Max of a range (linearrange or radialrange) to the same value will cause the range to remain in the same place.
This is ok but if you change the Min, Max, or tick marks of the gauge as a whole, the rendered ranges no longer correlate to the gauge correctly.
By contrast, if you set the ranges to a different value, they will redraw and the correlation will be maintained when any of the Min/Max/tick marks of the gauge change.
To demonstrate this problem:
I have a value, step 1, and step 2. I have 3 ranges: green, yellow, and red.
If you set the following 3 valuesets one after the other the error will be evident:
1st valueset:
step1 = 4, step2 = 6, value =3
0-4 would be green
4-6 Yellow
6-9 (calculated max) would be red
the needle falls inside these ranges, so max is calculated to 9
second valueset:
step1 = 4, step2 = 6, value = 85
0-4 would be green
4-6 Yellow
6-100 (calculated max) would be red
the needle falls outside the normal ranges, so max is calculated to 100
third valueset:
step1 = 4.0001, step2= 6.0001, value=85
0-4.0001 would be green
4.0001-6.0001 would be yellow
6.0001-100 (calculated max as before) would be red
Taking the above valuesets into account, the gauge would draw correctly for valueset 1. When you insert valueset 2, the gauge will increase to count from 0 to 100 instead of 0 to 9, based on some calculations. At this point, the first 2 ranges will appear to span up over 2/3 of the gauge, but their values are less than 10% of the gauge.
Implementing valueset 3 would solve this problem, so it would seem that there is some kind of 'propertychanged' event handler which must be called for these values to render correctly. I've modified my own code, adding the following:
This ensures that the property always changes, albeit slightly, so that I do not experience the problems described above.
Please let me know if I'm doing something wrong or if this is not easy to understand, I can always compile a sample app for you to demonstrate the problem.
Second problem, Needle:
Thanks in advance for your replies,
Paul
Ranges:
I'm experiencing some problems which I can describe as follows:
Ranges:
Setting the Min and Max of a range (linearrange or radialrange) to the same value will cause the range to remain in the same place.
This is ok but if you change the Min, Max, or tick marks of the gauge as a whole, the rendered ranges no longer correlate to the gauge correctly.
By contrast, if you set the ranges to a different value, they will redraw and the correlation will be maintained when any of the Min/Max/tick marks of the gauge change.
To demonstrate this problem:
I have a value, step 1, and step 2. I have 3 ranges: green, yellow, and red.
If you set the following 3 valuesets one after the other the error will be evident:
1st valueset:
step1 = 4, step2 = 6, value =3
0-4 would be green
4-6 Yellow
6-9 (calculated max) would be red
the needle falls inside these ranges, so max is calculated to 9
second valueset:
step1 = 4, step2 = 6, value = 85
0-4 would be green
4-6 Yellow
6-100 (calculated max) would be red
the needle falls outside the normal ranges, so max is calculated to 100
third valueset:
step1 = 4.0001, step2= 6.0001, value=85
0-4.0001 would be green
4.0001-6.0001 would be yellow
6.0001-100 (calculated max as before) would be red
Taking the above valuesets into account, the gauge would draw correctly for valueset 1. When you insert valueset 2, the gauge will increase to count from 0 to 100 instead of 0 to 9, based on some calculations. At this point, the first 2 ranges will appear to span up over 2/3 of the gauge, but their values are less than 10% of the gauge.
Implementing valueset 3 would solve this problem, so it would seem that there is some kind of 'propertychanged' event handler which must be called for these values to render correctly. I've modified my own code, adding the following:
private void setGreenMax(double e) |
{ |
if (Green.Max == e) |
e = e + 0.00001; |
GreenRange.Max = e; } |
private void setGreenMin(double e) |
{ |
if (Green.Min == e) |
e = e - 0.00001; |
GreenRange.Min = e; } |
This ensures that the property always changes, albeit slightly, so that I do not experience the problems described above.
Please let me know if I'm doing something wrong or if this is not easy to understand, I can always compile a sample app for you to demonstrate the problem.
Second problem, Needle:
- Setting the Needle.Value of the radial gauge needle indicator to 0.0 causes it to fall outside the gauge area. I can't recreate this now after about 10 minutes, but I am sure it was happening for 0.0 value on the needle. I can try to make a sample app to demonstrate this if I have enough time, might be some strange combination of factors.
Thanks in advance for your replies,
Paul
Ranges: