AnsweredAssumed Answered

Javascript API Gauge widget Clear() ???

Question asked by kiran.meka on Jul 16, 2014
Latest reply on Jul 22, 2014 by NHaney-esristaff

Hi,

Is there anyway to clear content of gauge widget (without destroying or reinitialize gauge).

I am using "set" method of gauge, but it only sets gauge value and not the dataLabelfield value

 

Code snipet as below:

 

var gaugeParams = {

        "caption": "Building Construction Year.",

        "color": "#c0c",

        "dataField": "ConstructionYear", // name of the attribute used for the gauge value

        "dataFormat": "value",

        "dataLabelField": "InspectionReport",

        "layer": cmaGraphicLayer,

        "maxDataValue": 3,

        "noFeatureLabel": "No name",

        "title": "Inspection Remark",

        "unitLabel": " Year",

        "noDataLabel": "N/A"

    }

buildingGauges = new Gauge(gaugeParams, "buildingGauge");

buildingGauges.startup();

 

function clearGauge() {

buildingGauges.set("value", 0);

}

 

Thanks...

Outcomes