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

Radial Gauge blanks out when i try to change label position from outside to inside

2 Answers 129 Views
Gauges
This is a migrated thread and some comments may be shown as answers.
Morne
Top achievements
Rank 1
Morne asked on 23 Oct 2012, 10:35 AM
Hi,

I have a radial gauge and it is working fine, but as soon as i add the following it goes completely blank when i run the code.

labels: {
                                position: labelPosition || "inside"
                            },
If i remove this code it works again.
Any ideas?

Here is the complete function for reference.

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


                    $("#Lgauge").kendoRadialGauge({
                        theme: theme,


                        pointer: {
                            value: 80
                        },


                        scale: {
                            majorUnit: 10,
                            minorUnit: 2,
                            min: 0,
                            max: 100,
                            labels: {
                                position: labelPosition || "inside"
                            },
                       
                            ranges: [
                                {
                                    from: 0,
                                    to: 35,
                                    color: "red"
                                }, {
                                    from: 35,
                                    to: 70,
                                    color: "yellow"
                                }, {
                                    from: 70,
                                    to: 100,
                                    color: "green"
                                }
                            ]
                        }
                    });
                }

And here is the only styling i apply to the div :

            div#gaugeLCon {
                    background: transparent url("../images/gauge-container-partial.png") no-repeat 50% 50%;
                    width: 386px;
                    height: 386px;
                    text-align: center;
                    margin: 0 0 30px 50px;
                    }                  
          
             div#Lgauge
          {
              
              width: 330px;
              height: 310px;  
              text-align: center;
              margin: 0 auto 0;
          }

2 Answers, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 23 Oct 2012, 10:46 AM
Hello Morne,

Are you getting any JavaScript errors in the web page?

All the best,
Alex Gyoshev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Morne
Top achievements
Rank 1
answered on 23 Oct 2012, 10:51 AM
Hi Alex,

Yes.

Here is the error.

Uncaught ReferenceError: labelPosition is not defined


Regards,
Morne

UPDATE :

Alex, I have resolved the issue.
All i needed to do was remove "labelPosition ||"

Thanks for the help.

Morne
Tags
Gauges
Asked by
Morne
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Morne
Top achievements
Rank 1
Share this question
or