dashboards README

The project's README from github.com/keen/dashboards. As one markdown file: README.md.

Dashboards by Keen IO

Building an analytics dashboard? Don’t start from scratch. Grab one of our CSS Grid-based templates and admire your data in minutes.

UPDATE: All examples in this repo have been updated to use keen-dataviz.js and keen-analysis.js, as well as CDN versions of all dependencies. When producing charts with keen-dataviz.js, the HTML wrapper for each chart (.chart-wrapper, described below) is rendered automatically.

Begin with a layout:

Hero Thirds Example

Add charts to each chart-stage HTML element:

<div class="grid-hero">
  <div class="hero chart-wrapper">
    <div class="chart-title">
      Chart Title
    </div>
    <div class="chart-stage">
      <div id="grid-1-1">
        <!-- chart goes here! -->
      </div>
    </div>
    <div class="chart-notes">
      Notes about this chart (optional)
    </div>
  </div>
</div>

And voilà!

Sample Dashboard

An attractive, custom analytics dashboard that's ready to be shown to your team or your customers. No hours lost tweaking CSS or testing responsiveness on eight different mobile devices.

The Templates

These layout templates are composed of a minimal set of custom styles. They cover the most common use cases and layout configurations we've encountered so far.

Integrations

These templates can work with any data source or charting library, but they're particularly streamlined to work with Keen IO's Dataviz SDK. You can add some charts to your dashboard with just a few lines of code. Talk to our team to get started today.

Usage

Ready to use one of these awesome layouts? Here's how to get started.

  1. Download a copy of this repository as a zip file, using this link. You can also type git clone keen/dashboards in your terminal.

  2. Check out the various layouts and pick the one that best suits your needs. Find the template in the repository you downloaded at folder/layouts/(name-of-template).

  3. Start editing! In the destination folder will exist an .html file. Open it in your favorite text editor. There are three things you need to do to edit your dashboard:

  4. Setup: If you're a registered Keen IO user, navigate to your keen project or if you don't have a user at first, you can simply use some demo data that we've prepared for you. You can access those by going to the repository and navigating to demo-data. There, you will see some javascript files with some code in them. We will simply paste those in the .html file.

  5. Some copypasta. When you navigate to the bottom of the .html file, you can see that there are a bunch of script tags. Just before the end of the body tag, we're going to add in the code from sample.html. Simply copy and paste the code just before you see </body>.

  6. Once you've done that we need to hook up the specific items within the template to the code that we've just pasted in to our file. Each KeenDataviz instance has container property, which is a node selector required by query. That means that this query will try to find inside the html file a specified node. Please bear in mind that you have to set a height of this node in your stylesheet or using inline CSS. In these templates, you will see lines of that resemble something like:

<div class="chart-stage"> <!-- This is where you need to put the id property in! -->
  <img data-src="holder.js/100%x650/white">
</div>

Now we're going to change those lines so that it looks like this:

<div class="chart-stage" id="chart-01"> <!-- This is where you need to put the id property in! -->
  <!-- Get rid of that img tag! -->
</div>

You're finished! Congratulations on setting up your first chart! Repeat step three with the rest of the items in the template to complete your dashboard!

Docker

Clone the repository.

$ git clone https://github.com/keen/dashboards.git

Access the repository and build your Docker image.

$ cd dashboards
$ docker build -t keen/dashboards .

Run the Docker container.

$ docker run -d -p 80:80 keen/dashboards

Contributing

Contributions are 11,000,000% welcome! That's a lot!

Please file issues for any bugs you find or features you'd like to see. And if you're up for it, send in a pull request.

To develop, you'll need to first install dependencies using Bower:

$ npm install -g bower
$ bower install

Note: Updates to the site backed by the gh-pages branch go live immediately once pull requests are reviewed and approved.

Note #2: This project is moving fast, so make sure and stay up to date. Here's what we suggest. Fork this repo, clone the fork, and add the original repo as a remote called upstream:

$ git clone https://github.com/keen/dashboards.git
$ cd dashboards
$ git remote add upstream https://github.com/keen/dashboards.git

Pull from upstream frequently to keep your local copy up to date:

$ git pull upstream gh-pages

Support

Need a hand with something? Send us an email to [email protected] and we'll get back to you right away! For technical questions, use the keen-io tag on Stack Overflow.

dashboards (keen/dashboards)

Searching Database…

这是什么?Keen IO 推出的一套自适应(响应式)数据分析仪表盘模板。选一个 CSS Grid 布局,加上图表,几分钟内就能得到一个可以展示给团队或客户的仪表盘。
它是要安装到项目里的库或框架吗?都不是——它只是一组带有少量自定义样式的纯 HTML 布局模板。把某个模板文件夹复制过来,直接编辑其中的 .html 文件即可;没有任何需要安装的包。
我怎么才能让一个仪表盘跑起来?克隆仓库(git clone keen/dashboards)或下载 zip 压缩包,在 folder/layouts/(name-of-template) 里选一个模板,打开它的 .html 文件,粘贴演示数据的脚本和图表代码,然后用浏览器打开即可。仓库里还附带一个 Dockerfile:构建镜像并运行容器就行。
试用它需要 Keen IO 账号或自己的数据吗?不需要:仓库在 demo-data 里提供了可以直接粘贴的 JavaScript 演示数据文件,keen-dataviz.js 和 keen-analysis.js 从 CDN 加载。已注册的 Keen IO 用户也可以把图表接入自己的项目。
接入图表有什么麻烦的地方吗?每个图表容器都必须在样式表或内联 CSS 里指定高度,否则图表无法正常排版。而且模板里的每个条目都要重复执行复制、粘贴和选择器的步骤。
包含哪些类型的布局?预先构建好的自适应布局模板,覆盖了团队遇到过的最常见的仪表盘配置,还附带了针对特定领域、数据模型和热门集成的示例。
Keen IO 为什么要做这个?从零开始搭建一个仪表盘,意味着要花好几个小时调整 CSS,并在各种设备上测试响应式效果。这些模板能让你在几分钟内得到一个美观、可定制的分析仪表盘,随时可以演示。
Keen IO 是什么?就是这些模板背后的数据分析平台。使用这些布局并不需要它——任何数据源都可以——但配合它的 Dataviz SDK 使用体验最为顺畅,遇到问题也可以发邮件到 [email protected] 获取其团队的帮助。
Creator
keen
Size
2.2 MB
Stars
11K
Age
12y
Commits · 90 Days