How can I create a speed gauge in Appcelerator Studio? Using only view.xml, view.tss and view.js? Because I am not using other libraries like d3.js.
Implement a speed gauge in Appcelerator Studio
50 Views Asked by phdias At
2
There are 2 best solutions below
0
On
I found one solution, i use a image and and set a dynamic rotation. Just use 2DMatrix
Example: .js
var rotateFirst = Titanium.UI.create2DMatrix().rotate(90);
$.imageTest.transform = rotateFirst;
----- .xml
<View id="test">
<ImageView id="imageTest"/>
</View>
---- .tss
"#imageTest":{
image:"/images/home/hello.png",
width:"40%",
opacity:1,
left:"7%",
anchorPoint : {
x : 0.5,
y : 0.5
}
}
"Speed gauge" is a bit vague, but depending on how complicated of a solution you're looking for, using something like D3 might be the best, and quickest solution.