This is a migrated thread and some comments may be shown as answers.

Update Gauge Series on Timer

2 Answers 135 Views
Gauges
This is a migrated thread and some comments may be shown as answers.
Laura
Top achievements
Rank 1
Laura asked on 16 May 2012, 07:57 PM

Hello,

I have a gauge that has values that are retrieved via a web service. The gauge is initially created successfully, but when my timer runs, the object that the series are bound to get updated, but the UI doesn't change.

Is there something I can do to get the UI to refresh that doesn't involve the flickering that I get when I call redraw or I recreate the gauge?

Here is my code:

The first code only updates the pointer value, but I also might want the range values to change.

function ServiceSucceeded(result) {
            //alert('Service call succeeded');
            // = result.d.Pointer;
            Current = result.d;
            $("#radial-gauge1").data("kendoRadialGauge").value(Current.Pointer);
        }
function createGauge() {
            $("#radial-gauge1").kendoRadialGauge({
                pointer: {
                    value: Current.Pointer
                },
                scale: {
                    majorUnit: 10,
                    minorUnit: 3.5,
                    min: Current.Start,
                    max: Current.Size,
                    ranges: [
                        {
                            from: Current.Start,
                            to:  Current.RedWidth,
                            color: "red"
                        }, {
                            from: Current.RedWidth,
                            to: Current.RedWidth + Current.YellowWidth,
                            color: "yellow"
                        }, {
                            from: Current.RedWidth + Current.YellowWidth,
                            to: Current.GreenWidth  +  Current.YellowWidth  +  Current.RedWidth,
                            color: "green"
                        }]
                }
            });
        }

2 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 17 May 2012, 06:39 PM
Hi Laura,

I am afraid currently it is not possible to refresh the gauge without flickering. The good news is that our team is working on the implementation of such functionality, but at this point I can not commit to an exact time frame.

Regards,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Laura
Top achievements
Rank 1
answered on 18 May 2012, 09:10 PM
Ok thanks for letting me know!
Tags
Gauges
Asked by
Laura
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Laura
Top achievements
Rank 1
Share this question
or