plottable
plottable copied to clipboard
AreaPlot / LinePlot should default to no padding on xScale
Why is that? Please explain.
Not sure about Line Plot actually. But for AreaPlot, having the fill cut out before the edge of the chart is ugly.
bad:

good:

@crmorford is this still an issue? http://bower.io/stats/
I want to change the defaults!
Is there a setting to remove padding for line charts / xScale?
Any update on this? Setting the xScale's outerPadding to 0 doesn't solve the issue for me. I want the graph to touch both ends of my component container.
http://jsfiddle.net/07h87qbb/2/
In your fiddle @realph the inner and outer padding was set to 0.1, but if you set it to 0, it looks to me like it does go edge-to-edge: http://jsfiddle.net/5y0y4hj1/

@themadcreator Sorry I posted the wrong fiddle, updated the fiddle link in my original question.
Managed to fix it by setting the innerPadding to 999. http://jsfiddle.net/07h87qbb/1/
Wanted to know if there was a better way around this.
@realph The real value that controls the empty space is xScale.padProportion(0) - see http://plottablejs.org/docs/classes/plottable.scales.linear.html#padproportion . All scales have a default value of 0.05, setting it to 0.0 should work for you.