Skip to content

Instantly share code, notes, and snippets.

@EE2dev
Last active November 6, 2015 22:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EE2dev/131ad62a0ef5a8e6968b to your computer and use it in GitHub Desktop.
Save EE2dev/131ad62a0ef5a8e6968b to your computer and use it in GitHub Desktop.
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:

  1. Data formatting
  1. Including data
  1. Visualization options
<!DOCTYPE html>
<meta charset="utf-8">
<head>
<link rel="stylesheet" type="text/css" href="http://www.ankerst.de/lib/itemExplorer_10.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
<script src="http://www.ankerst.de/lib/itemExplorer_10.min.js"></script>
</head>
<body>
<script>
var myIEChart = itemExplorerChart("/ee2dev/raw/a3ee04578325668bd3f8/items_all.csv").thousandsSeparator(".").tickFormat("s");
showChart();
function showChart() {
d3.select("body")
.append("div")
.attr("class", "chart")
.call(myIEChart);
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment