Available in the Full Version

Financial Chart - Volume Types

This sample demonstrates the different Volume Types of the Financial Chart.
Use the combo below to change the Financial Volume type.


This sample is designed for a larger screen size.

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

Code View

Copy to Clipboard
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <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" />

    <link href="http://cdn-na.infragistics.com/igniteui/2024.2/latest/css/structure/modules/infragistics.ui.chart.css" rel="stylesheet" />
    <link href="http://cdn-na.infragistics.com/igniteui/2024.2/latest/css/structure/modules/infragistics.ui.financialchart.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.lob.js"></script>
    <script src="http://cdn-na.infragistics.com/igniteui/2024.2/latest/js/infragistics.dv.js"></script>


    <script src="/data-files/Data.js" type="text/javascript"></script>

</head>
<body>
    <div style="font-size:17px;">Use the combo below to change the Financial Volume type.</div>
    <select id="chartTypePicker"></select>
    <br /><br />
    <div id="chart" style="width:98%;height:500px"></div>

    <script>
        var comboData = [
            { "VolumeType": "column" },
            { "VolumeType": "line" },
            { "VolumeType": "area" }
        ];

        $(function () {

            var data = PriceData.AMZN();
            $("#chart").igFinancialChart({
                dataSource: data,
                volumeType: "area"
            });

            $("#chartTypePicker").igCombo({
                dataSource: comboData,
                mode: "dropdown",
                valueKey: "VolumeType",
                textKey: "VolumeType",
                dropDownOnFocus: true,
                initialSelectedItems: [
                    { index: 2 }
                ],
                selectionChanged: function (evt, ui) {
                    $("#chart").igFinancialChart("option", "volumeType", $("#chartTypePicker").igCombo("value"));
                }
            });
        });
    </script>

</body>
</html>