on 02-18-2009 2:51 AM
Hi,
I am trying to limit the Red,Green & Yellow arc lengths on the 3d Dial Guage. For E.g. i want to show 0-30 as red, 30-50 as yellow & the rest as green. I am able to rotate the arcs using "transform" property of the respective arcs.
I found few threads on sdn which says it can be done using SVG Object properties instead of using the "transform" property.
Can you pls. tell me exactly how using the SVG Object properties we can limit the low & high values of each of the arc's?
Regards,
Sushma.
Hi Sushma,
I had a similar requirement long back and I got the solution by playing with it. Please try the below.
Define Object Properties (of type Number):
HighLimit
LowLimit
MaxRange
MinRange
In your case, set HighLimit to 50 and LowLimit to 30 . Set MinRange and MaxRange as per your requirements (for example: 0 and 100)
Set Animation Links as follows (click Assign Link to set this value):
YellowArc: d
"M107.59 266.52 A 124,124 0 " & if( ((HighLimit - MinRange) / (MaxRange - MinRange) ) > (180.0/320.0) ,1,0) & " 1 " & (150 + 124 * cos(pi * (110 + ((HighLimit - MinRange) / (MaxRange - MinRange) ) * 320) / 180)) & " " & (150 + 124 * sin(pi * (110 + ((HighLimit - MinRange) / (MaxRange - MinRange) ) * 320) / 180))
RedArc: d
"M107.59 266.52 A 124,124 0 " & if( ((LowLimit - MinRange) / (MaxRange - MinRange) ) > (180.0/320.0) ,1,0) & " 1 " & (150 + 124 * cos(pi * (110 + ((LowLimit - MinRange) / (MaxRange - MinRange) ) * 320) / 180)) & " " & (150 + 124 * sin(pi * (110 + ((LowLimit - MinRange) / (MaxRange - MinRange) ) * 320) / 180))
Thanks,
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sushma,
If I understand your question properly, you want to modify the underlying SVG object. If so, you would either have to directly modify the xml structure or use an svg editor (I like inkscape.com's freeware). While MII can make use of the SVG object properties, it is not an svg editor. That is outside of its set of tools.
Hope this helps,
Mike
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
7 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.