<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="RenderSpeedometer.aspx.vb" Inherits="FinIQWebApp.RenderSpeedometer" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<script src="../FinIQ_User_Controls/FinIQ_Speedometer/Scripts/justgage.js"></script>
<script src="../FinIQ_User_Controls/FinIQ_Speedometer/Scripts/raphael-2.1.4.min.js"></script>

<head runat="server">
    <title></title>

    <script>
        var g1;
        function FillMeterGuage() {
            try {
                
                //val = document.getElementById("ctl00_MainContent_Speedometer_hdnSpeedometer").value;

                val = document.getElementById("hdnSpeedometer").value;
                if (val.includes('(') && val.includes(')')) {
                    val = eval(val);
                }
                //console.log(document.readyState);
                //if (b === 1) {

                //var g1 = null;

                if (!g1) {
                    g1 = new JustGage({
                        id: 'DivGauge',
                        value: val,
                        min: 0,
                        max: 10,
                        symbol: '',
                        pointer: true,
                        pointerOptions: {
                            toplength: -15,
                            bottomlength: 10,
                            bottomwidth: 12,
                            color: '#8e8e93',
                            stroke: '#ffffff',
                            stroke_width: 3,
                            stroke_linecap: 'round'
                        },
                        gaugeWidthScale: 0.6,
                        counter: true,

                    });
                }
                else {
                    g1.refresh(val)
                }
            }
            catch (error) {

            }
        }



</script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="DivGauge" class="divGauge"></div>
    <asp:HiddenField ID="hdnSpeedometer" runat="server"></asp:HiddenField>
    </form>
</body>
</html>
