IRC logs for #farmOS, 2023-04-01 (GMT)

2023-03-31
2023-04-02
TimeNickMessage
[12:45:36]<FarmerEd[m]>paul121: have you done anything with charts in 2.x yet?
[12:49:45]<FarmerEd[m]>I think I recall a few modules were waiting on a charts module to be updated to Drupal 9,
[12:49:45]<FarmerEd[m]>was it this module? https://www.drupal.org/project/charts
[13:00:31]<mstenta[m]>Yea I think that was the main one Farmer Ed
[13:00:35]<mstenta[m]>Looks like it's stable for D9/10!
[13:01:15]<mstenta[m]>I think the next thing to figure out after that was which JS library to adopt
[13:01:59]<mstenta[m]>In v1 we adopted plotly.js because it was MIT licensed
[13:02:32]<mstenta[m]>farmOS core cannot include libraries that are not GPL compatible, as I understand it
[13:03:01]<mstenta[m]>It's been a long time since I've reviewed what's available - curious to see!
[13:05:25]<mstenta[m]>[The c](https://www.drupal.org/project/farm/issues/2941621)
[13:05:32]<mstenta[m]>https://www.drupal.org/project/farm/issues/2941621
[13:05:48]<mstenta[m]>Maybe we need a 2.x equivalent issue :-)
[13:06:03]<mstenta[m]>According to the Charts project page:
[13:06:03]<mstenta[m]>> Users can choose between multiple charting libraries, such as Billboard.js, C3.js, Chart.js, Google Charts, or Highcharts.
[13:06:41]<mstenta[m]>C3JS looks pretty nice https://c3js.org
[13:06:41]<mstenta[m]>MIT licensef
[13:07:12]<mstenta[m]>pretty well maintained it looks like https://github.com/c3js/c3
[13:08:41]<mstenta[m]>billboard.js looks good too - a little less popular maybe
[13:08:42]<mstenta[m]>https://naver.github.io/billboard.js/
[13:08:43]<mstenta[m]>https://github.com/naver/billboard.js
[13:08:46]<FarmerEd[m]>Cool, I might have a play with that, I need to produce some bar charts for a grass wedge
[13:09:25]<mstenta[m]>Cool! Yea I had a desire to get sensor data charting up and running again in v2
[13:09:30]<mstenta[m]>Let me know what you find!
[13:09:38]<FarmerEd[m]>That too
[13:09:59]<mstenta[m]>If it's pretty straightforward maybe we can include it in v2.1.0!
[13:10:07]<mstenta[m]>(with sensor graphing as a first use-case)
[13:10:09]<FarmerEd[m]>Was there a grass measuring module in v1
[13:10:42]<mstenta[m]>Eh sorta - there was a "move animals" quick form that also had the ability to take "pasture height" observations before/after movements
[13:17:05]<FarmerEd[m]>Ah Ok, might try taking it a little further, be nice to work out grazing/ fodder budgets.
[13:18:05]<symbioquine[m]><mstenta[m]> "Eh sorta - there was a "move..." <- If folks think they'd use it, I'd be happy to whip up a Asset Link plugin that does that - should be very easy...
[13:41:06]<FarmerEd[m]>I suppose symbioquine it depends how many Grass farmers are going to use Asset-Link, there are a couple of different ways farmers measure grass and the scales are very different. Height is one one way but a more accurate representation of available grass is dry matter weight per Hectare/acre
[13:43:49]<FarmerEd[m]>Simply recording hight or dm weight would be a good start, but a module that produces visual data of grass available on the entire farm and current demand based on grazing livestock numbers is my goal.
[13:44:31]<FarmerEd[m]>Have you considered charts for Asset Link?
[18:10:40]<paul121[m]>> <@farmer-ed:matrix.org> I think I recall a few modules were waiting on a charts module to be updated to Drupal 9,
[18:10:41]<paul121[m]>> was it this module? https://www.drupal.org/project/charts
[18:10:41]<paul121[m]>That's the one! I've have done a little bit of work in a custom farmOS module, but it's not too fancy with any generic/general use with views or something. It's a form with start/end date, etc that then builds a chart using the Render API that the Charts module provides
[18:14:27]<paul121[m]><mstenta[m]> "I think the next thing to figure..." <- Chart.js is my preference, also MIT license! I think it looks "the best" out of the box and has lots of flexibility with the API. I actually contributed a good amount to drupal/charts to make it compatible with Chart.js v3 (but wow now there is a v4!)
[18:16:12]<paul121[m]>I met one of the maintainers of Charts at DrupalCon last year. Right now the Charts module itself provides integrations with charting libraries but they would like to move these out to separate modules which makes sense. It would make sense to make a new Plotly.js module if that's what we wanted!
[18:18:23]<paul121[m]>Charts is designed to provide an abstracted API that is then mapped to individual charting libraries. So in theory we could even let farmOS users choose which charting library they prefer! But I think the reality is that might be hard to achieve a good UX... each library will have its own kinks
[18:19:46]<paul121[m]>Mo actually worked with drupal/charts in the Cool Farm Tool module iirc... the module is still a work in progress, but we were able to build Charts using Drupal views which is really cool :-)