Debian Codegraph @

src/js/Rickshaw.Graph.Renderer.Line.js

raw
1 Rickshaw.namespace('Rickshaw.Graph.Renderer.Line');
2
3 Rickshaw.Graph.Renderer.Line = Rickshaw.Class.create( Rickshaw.Graph.Renderer, {
4
5 name: 'line',
6
7 defaults: function($super) {
8
9 return Rickshaw.extend( $super(), {
10 unstack: true,
11 fill: false,
12 stroke: true
13 } );
14 },
15
16 seriesPathFactory: function() {
17
18 var graph = this.graph;
19
20 var factory = d3.svg.line()
21 .x( function(d) { return graph.x(d.x) } )
22 .y( function(d) { return graph.y(d.y) } )
23 .interpolate(this.graph.interpolation).tension(this.tension);
24
25 factory.defined && factory.defined( function(d) { return d.y !== null } );
26 return factory;
27 }
28 } );
29