Spotfire Speedometer Chart

Hi All ,

I am trying to create a speedometer chart as shown in the attachment and have written a code to make it . Can anyone help me out in figuring out whats going wrong in this code so that it will be helpful for me .Here is the jquery code which I am trying .

HTML:

<span id=calcValue><SpotfireControl id="y0ursp07f1r3c41cV41u3" />

<DIV style="WIDTH: 400px; HEIGHT: 320px" id=gauge></DIV>

Java Script:

<link href="css/speedometer.css" rel="stylesheet">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="js/speedometer.js"></script>

$("#calcValue").myfunc({
maxVal  : 180, // Max value of the meter
divFact : 10,  // Division value of the meter
dangerLevel : 120, // more than this leval, color will be red
initDeg : -45, // reading begins angle
maxDeg  : 270, // total angle of the meter reading
edgeRadius  : 150, // radius of the meter circle
speedNobeH  : 4,   // speed nobe height
speedoNobeW : 95,  // speed nobe width
speedoNobeL : 13,  // speed nobe left position
indicatorRadius : 125, // radius of indicators position
indicatorNumbRadius : 90,  // radius of numbers position
speedPositionTxtWH  : 80,  // speedo-meter current value cont
nobW: 20,  // indicator nob width
nobH: 4,   // indicator nob height
numbW   : 30,  // indicator number width
numbH   : 16,  // indicator number height
midNobW : 10,  // indicator mid nob width
midNobH : 3,   // indicator mid nob height
noOfSmallDiv: 2,   // no of small div between main div
eventListenerType   : 'change',// no of small div between main div
});

$(calcValue).on('DOMSubtreeModified',function(){

g.refresh($(this).text())

  })

}

 

Request you to do the needful!!!!

 

 

 

Attachments

AttachmentSize
Image icon speedomeer_-_copy.jpg16.5 KB

(1) Answer

Login