amclay / flotr

Automatically exported from code.google.com/p/flotr
1 stars 0 forks source link

Top Fill #168

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
A possibiit to fill a line versus top of the graph

Original issue reported on code.google.com by mil...@gmail.com on 3 Jan 2011 at 4:43

GoogleCodeExporter commented 9 years ago
A possible patch for the lines type:

  fill: false,           // => true to fill the area from the line to the x axis, false for (transparent) no fill
+ fillTop: false,        // => true to fill the area from the line to the top 
of the graph, false for (transparent) no fill

  ctx.strokeStyle = series.color;
- if(series.lines.fill){
+ if(series.lines.fill || series.lines.fillTop){

  top, 
- bottom = Math.min(Math.max(0, ya.min), ya.max),
+ bottom = (series.lines.fillTop ? Math.max(Math.min(this.plotHeight, ya.max), 
ya.min) : Math.min(Math.max(0, ya.min), ya.max)),

Original comment by mil...@gmail.com on 4 Jan 2011 at 9:28

GoogleCodeExporter commented 9 years ago
demo image

Original comment by mil...@gmail.com on 10 Jan 2011 at 8:47

Attachments: