It just defaults to counting. I don't know if there's some complexity here I'm not seeing which is why it's currently unimplemented but the patch makes raw values work for my use case.

Comments

kyle_mathews’s picture

StatusFileSize
new1.78 KB

New patch with much better handling of data. It now averages each raw_data value which falls within a given time period.

kyle_mathews’s picture

Just 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?

kyle_mathews’s picture

Perhaps people should be able to select the behavior they want, sum, mean, median, mode.

kyle_mathews’s picture

Status: Active » Needs review
deggertsen’s picture

Yes, 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.

R.J. Steinert’s picture

I 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.

kyle_mathews’s picture

Title: Raw data series doesn't work » Raw data series don't work

grammer check

R.J. Steinert’s picture

I'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.

R.J. Steinert’s picture

It looks like Will White has created a patch of his own to fix raw data series handling http://drupal.org/node/663350

R.J. Steinert’s picture

I'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

beakerboy’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)