Skip to content

Instantly share code, notes, and snippets.

@EE2dev
EE2dev / README.md
Last active August 29, 2015 14:16
Sorting grouped bars

This shows how to adjust Mike Bostock's example of grouped bars such that you can separately sort the bars within groups or the groups themselves.

To separately sort the bars within groups see the comments A1 - A3. To sort the groups themselves see comment B1.

@EE2dev
EE2dev / index.html
Last active August 29, 2015 14:19
Rotating globe
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.country {
fill: green;
stroke: darkgrey;
stroke-width: .5px;
stroke-linejoin: round;
}
@EE2dev
EE2dev / README.md
Last active November 6, 2015 22:54
item explorer - visualization option 1

An example of the visualization options for item explorer. Each visualization option is a function which returns the itemExplorerChart object, thus it allows method chaining.

In this example, the thousands separator is set to ".", and the tick format is set to "s". The thousands separator "." causes the decimal separator (of the percentages in the info and exploration panels) to be ",". The tick format "s" refers to the SI-prefix format type.

More examples

The main example is here.

Complete list of examples:

@EE2dev
EE2dev / README.md
Last active November 6, 2015 22:56
item explorer - data format - example 5
@EE2dev
EE2dev / README.md
Last active November 6, 2015 22:56
item explorer - data format - example 4

An example of the required format for item explorer. This example shows how to use dimensions. Introducing different dimensions for the items typically means that each dimension is refering to something different. In this example dimensions distinguish between items (bought) and payment method. Using dimensions has two effects:

  • for each dimension the corresponding items are shown in a separate chart with the dimension label for the x axis
  • when sorting is applied each dimension is sorted separately

More examples

The main example is here.

@EE2dev
EE2dev / README.md
Last active November 6, 2015 22:57
item explorer - data format - example 3

An example of the required format for item explorer. Long names can be used to describe items and are shown in the tooltip. Regular item names should not consist of more than 5 letters to allow for a visual appealing label of the x axis. If this means that the item is abbreviated then the long name of the item can be used to reveal the full name.

More examples

The main example is here.

Complete list of examples:

  1. Data formatting
@EE2dev
EE2dev / README.md
Last active November 6, 2015 22:57
item explorer - data format - example 2
@EE2dev
EE2dev / README.md
Last active November 6, 2015 22:58
item explorer - data format - example 1
@EE2dev
EE2dev / README.md
Last active November 6, 2015 22:58
item explorer - data source - example 4

An example how to use item explorer with data embedded in the html file which needs to be processed before it passed on to item explorer. The resulting data is assumed to be in the required format. Note that data within html must not contain empty lines, leading spaces or tabs.

This approach can be used when no web server is available.

More examples

The main example is here.

Complete list of examples:

@EE2dev
EE2dev / README.md
Last active November 6, 2015 22:59
item explorer - data source - example 3

An example how to use item explorer with a csv file which needs to be processed before it is passed on to item explorer. The resulting data is assumed to be in the required format.

More examples

The main example is here.

Complete list of examples:

  1. Data formatting