Available in the OSS Version

Zoombar - TypeScript

This sample demonstrates how to implement zoombar functionality and data chart with financial series alongside in TypeScript.

This sample is designed for a larger screen size.

On mobile, try rotating your screen, view full size, or email to another device.

Some of the additional controls enable resizing the zoom window to a specific period of time and show tooltips with date information for the left and right borders. A template is used for the tooltip to define how the data will be displayed.

Code View

Copy to Clipboard
<!DOCTYPE html>
<html>
<head>
    <title></title>
    <!-- Ignite UI for jQuery Required Combined CSS Files -->
    <link href="http://cdn-na.infragistics.com/igniteui/2024.2/latest/css/themes/infragistics/infragistics.theme.css" rel="stylesheet" />
    <link href="http://cdn-na.infragistics.com/igniteui/2024.2/latest/css/structure/infragistics.css" rel="stylesheet" />

    <script src="http://ajax.aspnetcdn.com/ajax/modernizr/modernizr-2.8.3.js"></script>
    <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
    <script src="http://code.jquery.com/ui/1.11.1/jquery-ui.min.js"></script>

    <!-- Ignite UI for jQuery Required Combined JavaScript Files -->
    <script src="http://cdn-na.infragistics.com/igniteui/2024.2/latest/js/infragistics.core.js"></script>
    <script src="http://cdn-na.infragistics.com/igniteui/2024.2/latest/js/infragistics.dv.js"></script>
    <script src="http://cdn-na.infragistics.com/igniteui/2024.2/latest/js/infragistics.lob.js"></script>

    <style type="text/css">
        .buttonset {
            position: absolute;
            top: 0px;
            left: 50px;
            z-index: 10000;
        }

            .buttonset > label {
                width: 60px;
                height: 26px;
                margin-right: -4px !important;
            }

        .tooltip {
            font-weight: bold;
        }
    </style>

    <script id="tooltipTemplate" type="text/x-jquery-tmpl">
        <span class="tooltip">${item.DateString}</span>
        <br />
        <span class="tooltip">Open:&nbsp;</span>
        <span>${item.Open}</span>
        <br />
        <span class="tooltip">Low:&nbsp;</span>
        <span>${item.Low}</span>
        <br />
        <span class="tooltip">High:&nbsp;</span>
        <span>${item.High}</span>
        <br />
        <span class="tooltip">Close:&nbsp;</span>
        <span>${item.Close}</span>
        <br />
    </script>
</head>
<body>
    <div id="chartTypeScript"></div>
    <div id="zoombar"></div>
    <script src="/data-files/financial-data-random.js"></script>
    <script src="/TypeScriptSamples/zoombar/typescript.js"></script>
</body>
</html>