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

How can I get Linear gauge's SVG?

6 Answers 91 Views
Gauges
This is a migrated thread and some comments may be shown as answers.
Paula
Top achievements
Rank 1
Paula asked on 01 Jun 2012, 05:48 PM
Hi,

I try to get SVG of Linear Gauge but I can't do it, I mean, I have two exceptions and I don't know what is that. Can you help me? 

it's occurs in this part:
var gauge = $("#gauge").data("kendoLinearGauge");
     gauge.svg();  

Uncaught ReferenceError: Chart is not defined  
Uncaught TypeError: Cannot read property '_animation' of undefined  

thanks,

Paula Castellanos

6 Answers, 1 is accepted

Sort by
0
Hristo Germanov
Telerik team
answered on 05 Jun 2012, 06:38 AM
Hello Paula,

Can you give me your configuration of the LinearGauge, because I can't reproduce the issue.

All the best,
Hristo Germanov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Paula
Top achievements
Rank 1
answered on 05 Jun 2012, 02:54 PM
hi, 

Well, the linear gauge's configuration is 

 function createGauges() {
            var theme = $(document).data("kendoSkin") || "default",
                        value = $("#gauge-value").val();


            $("#gauge").kendoLinearGauge({
                theme: theme,


                pointer: {
                    value: 28,
                    shape: "arrow"
                },
                scale: {
                    majorUnit: 20,
                    minorUnit: 20,
                    majorTicks: {
                        color: "#0000FF",
                        size: 10
                    },
                    min: -40,
                    max: 60, 
                    vertical: true,
                    ranges: [
                                {
                                    from: -40,
                                    to: -20,
                                    color: "#2798df"
                                }, {
                                    from: 25,
                                    to: 60,
                                    color: "#ffc700"
                                }, {
                                    from: 30,
                                    to: 32,
                                    color: "#c20000"
                                },
{
   from: -20,
   to: 0,
   color: "#cFFFF22"
       }
                            ]
                }
            });
            setInterval("updateValue()", 5000);            
        }
  //in this function I try to get SVG but I can't do it
        function svg() {
            var gauge = $("#gauge").data("kendoLinearGauge");
           var text = gauge.svg();
           alert(text);
        }

//Update the graphics' value
        function updateValue() {
            $("#gauge").data("kendoLinearGauge").value(Math.floor((Math.random() * 40) + 1));
   svg();
        }
        $(document).ready(function () {
            createGauges();
            var gauge = $("#gauge").data("kendoLinearGauge");
            gauge.mirror = true;
            $(document).bind("kendo:skinChange", function (e) {
                createGauges();
            });
        });
}

I don't what happen, I mean, if you look the configuration is very easy and basic.

Thanks.

0
Hristo Germanov
Telerik team
answered on 05 Jun 2012, 03:21 PM
Hello Paula,

The problem is fixed in the Q1 2012 SP1 of Kendo UI.

Kind regards,
Hristo Germanov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Paula
Top achievements
Rank 1
answered on 05 Jun 2012, 03:28 PM
Hi,
But I have version 2012.1 322, How can I get the version 2012.1.515?, I mean, is it necessary  new license?
Thanks.  
 

0
Hristo Germanov
Telerik team
answered on 06 Jun 2012, 12:57 PM
Hi Paula,

The service pack of the Q1 2012 (version 2012.1.515) is available only for customers. Users with a trial or GPL version of Kendo UI should wait for the next official release of Kendo UI (scheduled for July 2012). If you don't want to wait until the official release you need to update your license to Kendo UI Complete or Kendo UI DataViz.

Kind regards,
Hristo Germanov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Paula
Top achievements
Rank 1
answered on 07 Jun 2012, 05:09 PM
Hi,

Thanks, now it's perfect. :D
Tags
Gauges
Asked by
Paula
Top achievements
Rank 1
Answers by
Hristo Germanov
Telerik team
Paula
Top achievements
Rank 1
Share this question
or