Needle Update of Analog Gauge - Error Messages

View: New views
1 Messages — Rating Filter:   Alert me  

Needle Update of Analog Gauge - Error Messages

by tino80 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

when updating the needle of a Dojo Analog Gauge

needle.update(5);

the following error message appears when running it on an application server:

Error: this.shapes[i].setTransform is not a function
Source File: dojo-release-1.3.2/dojo/dojo.js
Line: 98

and

onAnimate Exception

Following Script:
---
        dojo.require('dojox.widget.AnalogGauge');
        dojo.require('dojox.widget.gauge.AnalogArcIndicator');
        dojo.require('dojox.widget.gauge.AnalogNeedleIndicator');
        dojo.require('dijit.form.Button');

var needle = new dojox.widget.gauge.AnalogNeedleIndicator({
    value: 2,
    width: 4,
    length: 80,
    hover: 'Variation: 2',
    color: 'black',
    noChange: true
   
  });
dojo.addOnLoad(init);

function init() {
gauge2 = dojo.byId("top_gauge");
                gauge2 = new dojox.widget.AnalogGauge({
                        id: "top_gauge",
                        width: 300,
                        height: 130,
                        radius: 120,
                        cx: 145,
                        cy: 125,
                        startAngle: -90,
                        endAngle: 90,
                        ranges: [
                                {low: 0, high: 70, color: '#99CCFF'},
                        ],
                        minorTicks: {
                                offset: 65,
                                interval: 5,
                                length: 6,
                                color: 'black'
                        },
                        majorTicks: {
                                offset: 65,
                                interval: 10,
                                length: 10,
                                color: 'black'
                        },
                        indicators: [new dojox.widget.gauge.AnalogArcIndicator({
                                                        value: 70,
                                                        width: 20,
                                                        offset: 100,
                                                        color: '#00008b',
                                                        noChange: true,
                                                        hideValue: true
                                                }),
                                                needle
                                               
                        ]
                }, gauge2);
                gauge2.startup();
                gauge2.setBackground('white');
        }

      function updateGauge(){
           /*
           needle.attr("value", 4);
           needle.draw();
          */
           needle.update(4);
               
                }
---

Following HTML

----
<div id="top_gauge"></div>
<input type="button" value= "Update" onClick= "updateGauge()">
----

Is there anything I could do about that? Your help is really much appreciated.

Best,
Tino