HumbleSoftware / Flotr2

Graphs and Charts for Canvas in JavaScript.
http://www.humblesoftware.com/flotr2/
MIT License
2.45k stars 528 forks source link

Implement fill on stacked lines (II) #186

Closed acs closed 4 years ago

acs commented 11 years ago

I have implemented a basic implementation for this feature. It does not support holes in the time series.

I have seen another try at:

https://github.com/HumbleSoftware/Flotr2/pull/94

I will take a look to compare approaches.

cesutherland commented 11 years ago

Could you create a fiddle for this from http://jsfiddle.net/cesutherland/Fk3tR/ ?

I had some issue trying to create one, but haven't debugged yet.

acs commented 11 years ago

Sure Carl. I will work on that!

acs commented 11 years ago

Carl, I am working on this issue. We need to take a decision: null values has sense in stacked charts? If so, null + x = null? Or we convert null values to zero?

I think that once I have this issue clear I can go ahead and finish this work.

acs commented 11 years ago

Carl, playing a bit more I feel that the general prob is complex so I plan to solve it step by step. In Bitergia we have solved our main need. To have stacked, filled lines graphs with the restriction:

Data with positive values (non null), integer sequence number.

I think that in this scenario, it works pretty well. I am thinking in the best approach to improve Flotr2 for then general use. Maybe implement this scenario and check data series before drawing and it the data does not follow the restrictions, show a message and not display anything. But I continue thinking in it!

cesutherland commented 11 years ago

@acs I was able to create a fiddle for this: http://jsfiddle.net/9BDG3/3/

Please take a look. There's some loop or something... the process runs away. Any ideas?

acs commented 11 years ago

Carl, I have fixed the prob wit the loop. I can invest sometime this week to work on this.

Maybe the approach with NULL values could be that anything + NULL = NULL and try to display the stacked value as it is done with normal NULL values. Any thoughts?

cesutherland commented 11 years ago

I think that approach makes sense!

What is the actual use-case? Why would there be null data at one time for a series, and not for another series?

Assuming the null value is 0 may actually be mis-leading.

acs commented 4 years ago

Closing this PR ... outdated probably.