Skip to content

Commit

Permalink
Merge pull request #118 from n3-charts/stacked_series
Browse files Browse the repository at this point in the history
Stacked series
  • Loading branch information
Lorem Ipsum committed Jul 12, 2014
2 parents e326fac + 8f2fc9c commit f02e7a7
Show file tree
Hide file tree
Showing 52 changed files with 1,595 additions and 753 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ $scope.options = {
],
lineMode: 'linear',
tension: 0.7,
tooltip: {mode: 'dots', interpolate: true, formatter: function(x, y, series) {return 'pouet';}},
tooltip: {mode: 'scrubber', formatter: function(x, y, series) {return 'pouet';}},
drawLegend: true,
drawDots: true
drawDots: true,
columnsHGap: 5
}
```
##### Axes
Expand Down Expand Up @@ -88,7 +89,7 @@ The `series` key must be an array which contains objects with the following prop

##### Tooltip
The `tooltip` must be an object which contains the following properties :
+ `mode` : can be set to `none`, `axes`, or `scrubber`. It can also be set to `scrubber`, which displays tooltips for all series.
+ `mode` : can be set to `none`, `axes`, or `scrubber`. It can also be set to `scrubber`, which displays tooltips for all series. Default is `scrubber`.
+ `interpolate` : can be either `true`or `false`. Default is `false`. Will be ignored if the tooltip's mode is not `axes`.
+ `formatter` : optional, allows to catch the tooltip before it gets rendered. Must be a function that takes `x`, `y` and `series` as arguments and returns a string. Ignored when mode is not `scrubber`.

Expand All @@ -113,6 +114,8 @@ The `tension` can be set, too (default is `0.7`). See [issue #44][2] about that.
The `drawLegend` and `drawDots` are optional. They respectively enable/disable the chart's legend and the lines and areas dots. Default is `true` for both.

The `columnsHGap` is optional (default is `5`). Sets the space between two columns. If you haven't any column series on your chart but are wondering why this option doesn't do anything, please don't send me an email.

#### Mode
The mode can be set to 'thumbnail' (default is empty string). If so, the chart will take as much space as it can, and it will only display the series. No axes, no legend, no tooltips. Furthermore, the lines or areas will be drawn without dots. This is convenient for sparklines.

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "n3-line-chart",
"version": "1.1.1",
"version": "1.1.2",
"main": "dist/line-chart.min.js",
"ignore": [
"**/.*",
Expand Down
Loading

0 comments on commit f02e7a7

Please sign in to comment.