phdias
phdias

Reputation: 215

Implement a speed gauge in Appcelerator Studio

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.

Upvotes: 0

Views: 50

Answers (2)

phdias
phdias

Reputation: 215

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
   }
}

Upvotes: 0

pxtrick
pxtrick

Reputation: 1

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

Upvotes: 0

Related Questions