Closed (won't fix)
Project:
Flot
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Jul 2010 at 17:57 UTC
Updated:
19 Jan 2018 at 16:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
kyle_mathews commentedNew patch with much better handling of data. It now averages each raw_data value which falls within a given time period.
Comment #2
kyle_mathews commentedJust noticed this issue is a duplicate of #663350: Fix support for 'raw' display option in the datapoint handler's pre_render() method
My patch has quite different behavior from the other issue. My patch averages all the raw values that fall in a group whereas Will's just adds them together. Both are valid for different use cases. Perhaps this distinction should be exposed in the UI?
Comment #3
kyle_mathews commentedPerhaps people should be able to select the behavior they want, sum, mean, median, mode.
Comment #4
kyle_mathews commentedComment #5
deggertsen commentedYes, I think before this is committed there should be options for people to select the behavior they want. However the patch above appears to work for averaging all of the raw values in the given period.
Thanks.
Comment #6
R.J. Steinert commentedI think this idea of granularity could be dropped all together when dealing with raw data. At first I figured there was a data point being generated for every tick on the y axis because Flot.js requires it but that's not what I found when playing around with this example http://people.iola.dk/olau/flot/examples/time.html
I cut out a bunch of data in the middle and got the attached graph. It seems if we just feed Flot.js the actual raw data it would handle it just fine. I suppose if what we are trying to do is protect the end user from having to download a large dataset then removing data points could be useful but doing so seems like an additional feature as opposed to getting raw data to actually work. I try this out tonight or tomorrow unless anyone else knows better.
Comment #7
kyle_mathews commentedgrammer check
Comment #8
R.J. Steinert commentedI've hacked this module over here https://github.com/rj-steinert/Drupal-Flot
I commented out a lot of code and prepared the timestamps for output to be understood by javascript. This approach depends on Flot's own graphing logic to prepare the graph for display. I would love to have time to merge my work into the current module but it will require adding a lot more options for my different approach. I might just opt for making the Views support a new module.
Comment #9
R.J. Steinert commentedIt looks like Will White has created a patch of his own to fix raw data series handling http://drupal.org/node/663350
Comment #10
R.J. Steinert commentedI've created a separate module called Flot Timemode Views. It contains a Views Style and data field handler for using raw data in a series over time.
https://github.com/rj-steinert/flot-timemode-views
Comment #11
beakerboy