ianbutler/heat_map

语言: HTML

git: https://github.com/ianbutler/heat_map

热图。获取15分钟间隔数据的列表并构建一小时平均数据并在图表中显示数据...
Heat map. Takes a list of 15 minute interval data and builds an hour average data and displays the data in a chart wi…
README.md (中文)

heat_map

热图。意图创建一个彩色编码热图,以便每小时比较一次数据。显示24小时内的比较。

采用以毫秒为单位的时间数组,以及要比较的数据数组。它还需要一个可配置选项的对象。

初始化如下:

var heatMap = new HeatMap(time,powerArr,heatMapOptions);

选项可以设置如下。大多数是可选的:

var heatMapOptions = {     container:'heatMap',//你想要heatMap使用的id。这是一个必要的输入

screwyTime : 7, // this is a dirty fix that is needed to make up for the difference in time of the data I was using vs the way the timestamp read it.  7 is for the number of hours difference.  defaults to 0

font : '10px FuturaLight', // set the fonts of the labels, and units.  defauts to '10px serif'

blockScale : true, //sets the scale as blocks or as a gradient.  Takes true or false.  defaults to true

spacing : 3, //how much space you want around each block.  defaults to 3

roundedEdge : true,  // do you want each block to be rounded or square.  defaults to true

colorArr : [
    '#eee',
    '#ccc',
    '#999',
    '#777',
    '#444',
    '#111'
],  // allows you to change the color scale, and the number of difference markers

unit : 'kW' // set the units.  It's default is kW.

}

本文使用googletrans自动翻译,仅供参考, 原文来自github.com

en_README.md

heat_map

Heat map. Meant to create a color coded heat map to compare data over an hourly basis. Shows the comparison over a 24 hour period.

Takes in an array of time in milliseconds, and an array of data you want to compare. It also takes an object of configurable options.

Initialized like this:

var heatMap = new HeatMap( time, powerArr, heatMapOptions );

Options can be set up like below. Most are optional:

var heatMapOptions = {
container : 'heatMap', //the id you want heatMap to use. this is a neccesary input

screwyTime : 7, // this is a dirty fix that is needed to make up for the difference in time of the data I was using vs the way the timestamp read it.  7 is for the number of hours difference.  defaults to 0

font : '10px FuturaLight', // set the fonts of the labels, and units.  defauts to '10px serif'

blockScale : true, //sets the scale as blocks or as a gradient.  Takes true or false.  defaults to true

spacing : 3, //how much space you want around each block.  defaults to 3

roundedEdge : true,  // do you want each block to be rounded or square.  defaults to true

colorArr : [
    '#eee',
    '#ccc',
    '#999',
    '#777',
    '#444',
    '#111'
],  // allows you to change the color scale, and the number of difference markers

unit : 'kW' // set the units.  It's default is kW.

}