Wijmo UI for the Web
Customize Labels
Wijmo User Guide > Widgets > RadialGauge > RadialGauge How To > Customize Labels

Building on the Quick Start example, you can change the style and offset of the label text using the labels option. For more information on styles that you can use, see Style Options.

  1. In the <head> section of your HTML file, replace the script that includes the document ready function with this one, which changes the labels style option to green Comic Sans with no outline, and changes the offset to 33 pixels so that the labels render inside the gauge face. 

    Drop down and copy script to paste in <head> section

    Script
    Copy Code
    <script type="text/javascript">
                $(document).ready(function () {
        $("#radialgauge1").wijradialgauge({
            value: 90,
            labels: {
                style: {
                    "font-family": "courier",
                    "font-size": 15,
                    fill: "Green",
                    stroke: "none"
                },
                offset: 33
            }
        });
    });
    </script>
  2. No changes are necessary in the <body> section of your HTML file. The basic <div> tag is sufficient to create the gauge.
  3. Save your HTML file and open it in a browser. The gauge appears like the one in the live widget below, with the labels in green Courier font.
See Also

Widgets

Reference

Concepts