Available in the Full Version

Sparkline - Visual Settings

This sample demonstrates how to change the look and feel of the igSparkline control.

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>
    <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>

</head>
<body>
    <style>
        #slNightSky {
            border-color: #FFFFFF;
        }

        #slSnakeSkin {
            border-color: #FFFFFF;
            margin: 20px 0 0 0;
        }

    </style>
	<!-- Target elements for the igSparkline -->
	<div id="slNightSky"></div>
	<div id="slSnakeSkin"></div>

    <!-- File supplying the northwindInvoices object for the igSparkline data source -->
    <script src="/data-files/financial-data.js"></script>

    <script>

        $(function () {

            $("#slNightSky").igSparkline({
                dataSource: randomOldData,
                displayType: "area",
                height: "120px",
                width: "100%",
                valueMemberPath: 'Change',
                brush: "#446185",
                normalRangeVisibility: "visible",
                trendLineBrush: "#d0d0e0",
                trendLineType: "simpleAverage",
                markerVisibility: "visible",
                markerBrush: "#a8aec4",
                markerSize: 1
            });

            $("#slSnakeSkin").igSparkline({
                dataSource: randomOldData,
                displayType: "column",
                height: "120px",
                width: "100%",
                valueMemberPath: 'Change',
                labelMemberPath: 'DateString',
                horizontalAxisVisibility: 'visible',
                verticalAxisVisibility: 'visible',
                negativeBrush: "#cfc8c0",
                negativeMarkerVisibility: "collapsed",
                brush: "#bdada1",
                normalRangeVisibility: "visible",
                trendLineBrush: "#403636",
                trendLineType: "simpleAverage",
                markerVisibility: "visible",
                markerBrush: "#6e5348",
                trendLineThickness: 2
            });

        });
    </script>       

</body>
</html>