Commit 8eea0369 authored by Tejesh's avatar Tejesh 🖖

update docs

parent 113352fc
Pipeline #91123 failed with stage
in 2 minutes and 48 seconds
** Scales **
Scales is an abstraction over d3-scales and d3-scale-chromatic libraries using configurations.
Scales are dictionaries with the following keys:
- `metric:` can be a string column name or a `function(d, i)` that returns a value for each item in the data
- `scheme:` d3 chromatic color scheme to interpolate to (e.g. `'RdYlGn'`)
- `scale:` d3 scale to use. Defaults to `'linear'`
- `range`: a list that contains the scale's range. (Note: `Scheme` takes priority over 'range')
- `domain`: a list that contains the scale's domain (defaults to the extent of the metric)
`scale` can take any of the values below.
**Scale Types**:
- **Quantitative Scales**
- `linear`
- `log`
- `pow`
- `sqrt`
- `symlog`
- `time`
- `utc`
- `sequential`
- **Discrete Scales**
- `ordinal`
- `band`
- `point`
- **Discretizing Scales**
- `quantile`
- `quantize`
- `threshold`
- `bin-ordinal`
Usage:
```js
fill: {
metric: 'age',
......@@ -12,14 +50,6 @@ fill: {
}
```
Scales are dictionaries with the following keys:
- `metric:` can be a string column name or a `function(d, i)` that returns a value for each item in the data
- `scheme:` d3 chromatic color scheme to interpolate to (e.g. `'RdYlGn'`)
- `scale:` d3 scale to use. Defaults to `'linear'`
- `range`: a list that contains the scale's range. (Note: `Scheme` takes priority over 'range')
- `domain`: a list that contains the scale's domain (defaults to the extent of the metric)
**Notes**:
- *Schemes* is used to describe a discrete color range.
......
......@@ -16,6 +16,9 @@
<body>
<div id="test">
</div>
<script>
tape.onFinish(function () { window.renderComplete = true })
</script>
<script>
var data = [];
for (var i = 1; i <= 100; i++) {
......
......@@ -20,6 +20,9 @@
<body>
<h1>Lodash templates</h1>
<template id="t1">Your platform is <%= navigator.userAgent %></template>
<script>
tape.onFinish(function () { window.renderComplete = true })
</script>
<script>
function strip(text) {
return text.replace(/^\s+/, '').replace(/\s+$/, '')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment