UNPKG

jqwidgets-framework

Version:

jQWidgets is an advanced Angular, Vue, Blazor, React, Web Components, jquery, ASP .NET MVC, Custom Elements and HTML5 UI framework.

101 lines (85 loc) 3.35 kB
<!DOCTYPE html> <html lang="en"> <head> <title id='Description'>This demo illustrates inversed axis position.</title> <meta name="keywords" content="jQuery Heatmap, Heatmap, Inversed Axis" /> <link rel="stylesheet" href="../../../jqwidgets/styles/jqx.base.css" type="text/css" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <meta name="viewport" content="width=device-width, initial-scale=1 maximum-scale=1 minimum-scale=1" /> <script type="text/javascript" src="../../../scripts/jquery-1.11.1.min.js"></script> <script type="text/javascript" src="../../../scripts/demos.js"></script> <script type="text/javascript" src="../../../jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="../../../jqwidgets/jqxheatmap.js"></script> <script type="text/javascript" src="../../../jqwidgets/jqxcheckbox.js"></script> <style> body { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; } #heatmap { width: 100%; max-width: 1000px; } #options { margin: 50px; } #xAxis { margin-bottom: 20px; } </style> <script type="text/javascript"> $(document).ready(function () { var xAxis = { labels: ['John', 'Marry', 'Alba', 'Steven', 'Josh', 'Alica', 'Robert', 'Kim', 'Ann', 'Paul', 'Regina', 'Dorothy'], isInversed: true }; var yAxis = { labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'], isInversed: true }; var data = [ [89, 39, 94, 55, 3], [53, 38, 26, 68, 33], [22, 0, 66, 90, 78], [97, 68, 68, 3, 99], [47, 47, 88, 6, 1], [73, 23, 3, 79, 100], [21, 86, 13, 33, 0], [53, 81, 95, 79, 66], [74, 68, 88, 51, 43], [10, 12, 78, 14, 21], [55, 58, 12, 82, 99], [88, 23, 86, 59, 53], ]; $("#heatmap").jqxHeatMap({ xAxis: xAxis, yAxis: yAxis, source: data, title: 'Car sales revenue per employee(in 1000 &euro;)', }); $(".jqxcheckbox").jqxCheckBox({ width: 170, height: 25, checked: true }); $("#xAxis").on("change", function () { var isChecked = $('#xAxis').jqxCheckBox('checked'); $("#heatmap").jqxHeatMap('reverseXAxisPosition', isChecked); }); $("#yAxis").on("change", function () { var isChecked = $('#yAxis').jqxCheckBox('checked'); $("#heatmap").jqxHeatMap('reverseYAxisPosition', isChecked); }); }); </script> </head> <body class='default'> <div id="heatmap"></div> <div id="options"> <div id="xAxis" class='jqxcheckbox'>Reverse X-Axis Origin</div> <div id="yAxis" class='jqxcheckbox'>Reverse Y-Axis Origin</div> </div> </body> </html>