Javascript API Gauge widget Clear() ???

2785
1
07-16-2014 12:28 AM
Meka_KiranKumar
New Contributor

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

0 Kudos
1 Reply
NicholasHaney
New Contributor III

Not that I am aware of. It would be simple to create your own clear function though.

0 Kudos