New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve viewing of sensor data #227
Comments
Chatted with @paul121 about this today and we landed on the best approach: create a custom Views style plugin that displays graph(s), and add that as an Attachment display to the sensor data View. |
I played with this a little bit this weekend. I found the Drupal Charts that basically does what we were describing - it adds a Views plugin for graphs! And has support for D7 and D8, although D7 has fewer options for the graphing libraries. Here's what I found:
Multiple series: One sensor value: Views UI config: The graphing library displayed here is google charts. This is the only library available with Charts D7, but D8 has more options. It's also possible to integrate additional libraries.. which might be worth exploring! The "display" issues are mostly related to the JS library, not Charts module. Might make it fairly easy to get something working with D7. |
@paul121 I wonder if we can close this, and/or create new specific issues in the drupal.org issue queue? |
Closing old/stale issues. There's been some renewed discussion in chat about charting modules in farmOS v2. Let's start a new issue or pull request when a specific pathway is clear. |
Wanted to start working on improving the viewing of sensor listener data. I thought the first place to start would be with adding a date range to the
farm_sensor_data
view. And then work on passing this set of data to the graph.I was able to add the Date filters to to the view via the Views UI admin page:
I can verify that the
Start date
andEnd date
filters are working correctly, but because the formsaction
is a POST to/farm/assets/sensors/%d/data
, submitting the filters takes me off of the/farm/sensors/**sensor_name**
page where the graph is displayed:@mstenta am I taking the right approach for this? I see the
farm_sensor_data
view is added to the sensor page in a bit of a "custom" way: https://github.com/farmOS/farmOS/blob/7.x-1.x/modules/farm/farm_sensor/farm_sensor_listener/farm_sensor_listener.module#L642I also just came across your reply here where you mention creating a custom view plugin for displaying graphs. After playing with Views UI I think I have a better understanding for what you mean... Theoretically a "Graph" view plugin could be used for quantity data and sensor data, correct?
The text was updated successfully, but these errors were encountered: