Skip to content

fullscale/dangle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dangle.js

A set of AngularJS directives that provide common D3 visualizations for elasticsearch.

NOTE: this is still pretty experimental work so consider the APIs volatile.

Project Goal

D3 comes from a very prestigious lineage and is arguably one of the most powerful open source visualizations libraries available. This power comes at a cost of having a relatively steep learning curve. The goal of dangle is to minimize this curve as much as possible.

At the cost of starting a potential religious war, let me briefly explain why we chose AngularJS over other alternatives such as Backbone and Ember.

We chose AngularJS because directives allow us to create an HTML based DSL around D3, making it extremely easy to insert (i.e., dangle) graphs from the DOM in a concise, declarative manner. D3's direct DOM manipulation fits well with Angular's DOM based templating. We believe that in order to provide the best experience, we have to be opinionated here.

If you'd like something more framework agnostic then you should have a look at NVD3.

Available Directives

  • <fs:bar /> Horizontal bar chart. Good for visualizing terms facets
  • <fs:column /> Vertical bar chart.
  • <fs:area /> A traditional area chart (fill can be set to none to produce a line graph)
  • <fs:pie /> A naive pie chart (you probably want to use donut)
  • <fs:donut /> A more sophisticated pie chart that includes labels and innner radius settings.
  • <fs:date-histo /> This is really a time-series being exploited to display an elasticsearch date-histogram. It has several caveats1,2

  1. elasticsearch allows you to define different time intervals in your query but the interval is not returned as part of the response, making it difficult to auto-detect the proper interval. We've got a pull request in that resolves this.

  2. the date histogram in elasticsearch is a true histogram meaning that empty bins are not created for missing intervals. This causes issues with the x-axis (time) because we're using D3 time scales which automatically produce the best time labels for the given period. We're working on a possible patch to resolve this in elasticsearch.

Documentation

You can find the official documentation here

You will also be able to find unofficial documentation and examples on on our blog and GitHub Gist pages here and here.

You can see a simple demo here.

3rd Party Documentation

  • AngularJS - HTML enhanced for web apps.
  • elasticsearch - the most advanced search engine to date.
  • D3 - a JavaScript library for manipulating documents based on data.

License

Copyright (c) 2012 FullScale Labs, LLC
Licensed under the MIT license.

About

A set of AngularJS directives that provide common D3 visualizations for elasticsearch

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published