Available in the Full Version

Data Chart - Series Drop Shadows

This sample demonstrates applying a drop-shadow effect to the data series in the Chart control.
Agricultural data from: UNdata
Population data from: Quandl

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 xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Drop Shadows</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" />

    <!--CSS file specific for chart styling -->
    <link href="http://cdn-na.infragistics.com/igniteui/2024.2/latest/css/structure/modules/infragistics.ui.chart.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>

</head>
<body>
    <script type="text/javascript" src="/data-files/us-fao-gross-production.js"></script>
    <script type="text/javascript" src="/data-files/uk-france-population.js"></script>
     
    <div id="chartBubble"></div>
    <div class="UNdata-attribution">
        Agricultural data from: <a href="http://data.un.org/" target="_blank">UNdata</a>
    </div>
     
    <div id="chartLine"></div>
    <div class="Quandl-attribution">
        Population data from: <a href="http://www.quandl.com/" target="_blank">Quandl</a>
    </div>

    <script type="text/javascript">

        $(function () {
            $("#chartBubble").igDataChart({
                width: "100%",
                height: "300px",
                dataSource: agriculturalData,
                title: "U.S. Agricultural Production Per Year",
                subtitle: "Data from 1961-2007",
                axes: [{
                    name: "xAxis",
                    type: "numericX",
                    interval: 10,
                    title: "Year",
                }, {
                    name: "yAxis",
                    type: "numericY",
                    title: "Billions of USD",
                    maximumValue: 200000,

                    formatLabel: function (val) {
                        var bVal = (val / 1000),
                        rounded = Math.round(bVal * 100) / 100;
                        return "$" + rounded;
                    }
                }],
                series: [{
                    isDropShadowEnabled: true,
                    useSingleShadow: false,
                    shadowColor: "#666666",
                    title: "(Year, Production), Population",
                    name: "bubble",
                    type: "bubble",
                    xAxis: "xAxis",
                    yAxis: "yAxis",
                    xMemberPath: "Year",
                    yMemberPath: "Value",
                    radiusMemberPath: "Population",
                    showTooltip: true,
                    markerBrush: "rgba(68,172,214,0.7)",
                    radiusScale: {
                        minimumValue: 30,
                        maximumValue: 50,
                        isLogarithmic: true
                    },
                }],
                horizontalZoomable: true,
                verticalZoomable: true,
                windowResponse: "immediate"
            });

            $("#chartLine").igDataChart({
                width: "100%",
                height: "300px",
                dataSource: data,
                rightMargin: 35,
                title: "U.K. vs. France",
                subtitle: "A comparison of populations over time",
                axes: [{
                    name: "xAxis",
                    type: "categoryX",
                    label: "Date",
                    isInverted: true,
                    interval: 2,
                    title: "Year"
                },
                {
                    name: "yAxis",
                    type: "numericY",
                    interval: 5,
                    minimumValue: 45,
                    title: "Millions of People"
                }],
                series: [{
                    isDropShadowEnabled: true,
                    shadowOffsetX: 0,
                    shadowOffsetY: 3,
                    useSingleShadow: false,
                    shadowColor: "#666666",
                    name: "ukPop",
                    type: "line",
                    title: "UK",
                    isTransitionInEnabled: true,
                    xAxis: "xAxis",
                    yAxis: "yAxis",
                    valueMemberPath: "ukPopulation",
                    showTooltip: true,
                    thickness: 5
                }, {
                    isDropShadowEnabled: true,
                    shadowOffsetX: 0,
                    shadowOffsetY: 3,
                    useSingleShadow: false,
                    shadowColor: "#666666",
                    name: "frPop",
                    type: "line",
                    title: "France",
                    isTransitionInEnabled: true,
                    xAxis: "xAxis",
                    yAxis: "yAxis",
                    valueMemberPath: "francePopulation",
                    showTooltip: true,
                    thickness: 5
                }],
                horizontalZoomable: true,
                verticalZoomable: true,
                windowResponse: "immediate"
            });
        });
    </script>

</body>
</html>