Heat.js
A lightweight JavaScript library that generates customizable heat maps and ...
README
Heat.js
<p align="center">🌞 A lightweight JavaScript library that generates customizable heat maps to visualize date-based activity and trends.</p>
<p align="center">v1.5.1</p>
What features does Heat.js have?
- Zero-dependencies and extremely lightweight!
- Full API available via public functions.
- Fully styled in CSS/SASS, fully responsive, and compatible with the Bootstrap library.
- Full CSS theme support (using :root variables).
- 2 views supported: Map and Chart!
- Fully configurable per DOM element.
- Toggling colors on/off support.
- Export all data to CSV.
- 12 language translations available!
- Trend types allows data to be split up and viewed separately.
What browsers are supported?
All modern browsers (such as Google Chrome, FireFox, and Opera) are fully supported.
What languages are supported?
- Arabic
- Bengali
- Chinese (simplified)
- English
- French
- German
- Hindi
- Japanese
- Polish
- Portuguese
- Spanish
- Turkish
What are the most recent changes?
To see a list of all the most recent changes.
How do I get started?
To get started using Heat.js, do the following steps:
1. Prerequisites:
Make sure you include the "DOCTYPE html" tag at the top of your HTML, as follows:
- ```markdown
- DOCTYPE html>
- ```
2. Include Files:
- ```markdown
- <link rel="stylesheet" href="dist/heat.js.css">
- <script src="dist/heat.js"></script>
- ```
3. DOM Element Binding:
- ```markdown
- <div id="heat-map" data-heat-options="{ 'showDayNames': true }">
- Your HTML.
- </div>
- ```
To see a list of all the available binding options you can use for "data-heat-options".
To see a list of all the available custom triggers you can use for "data-heat-options".
5. Adding Dates:
Now, you can add/remove dates, which will update the heat map automatically!
- ```markdown
- <script>
- var newDateObject = new Date();
- $heat.addDate( "heat-map", newDateObject, "Trend Type 1", true );
- $heat.removeDate( "heat-map", newDateObject, "Trend Type 1", true );
- </script>
- ```
5. Finishing Up:
That's it! Nice and simple. Please refer to the code if you need more help (fully documented).
How do I go about customizing Heat.js?
To customize, and get more out of Heat.js, please read through the following documentation.
1. Public Functions:
To see a list of all the public functions available.
2. Configuration:
Configuration options allow you to customize how Heat.js will function. You can set them as follows:
- ```markdown
- <script>
- $heat.setConfiguration( {
- safeMode: false
- } );
- </script>
- ```
To see a list of all the available configuration options you can use, click here.
探客时代
