0

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.

tmthydvnprt
  • 10,398
  • 8
  • 52
  • 72
phdias
  • 205
  • 1
  • 11

2 Answers2

0

"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.

0

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
   }
}
phdias
  • 205
  • 1
  • 11