[Release] Quick Chart - Chart your data, quickly and easily

v1.0.1 - Added support for customizing the periodic interval of chart updates

Select "Custom Time Period" from the Periodic Update dropdown, then define updates to occur every X minutes, hours, or days, starting from the next occurrence of a specified time of day

Awesome! Thank you so much! I’ve already set it up, but will have to wait few days to see it in action.

Feeling bad to ask, but could you also allow decimal numbers for the “Difference from previous value to record a data point (range: 0..100)” parameter, or at a minimum allow 0.5?

Thanks again for a great app, and amazing support!

1 Like

v1.0.3 - Support for decimal values for data collector value/percentage difference

1 Like

Awesome, awesome, awesome!

Now with the ability to collect data over months, could you update the “Select Day to Chart” field to allow longer interval than 7 days?

Thanks again, great and great support!

Added this in 1.0.4

Great. Another big thank you!

@JustinL now that we can customize the chart length to period greater than 7 days, the X axis, which does not capture the date, is not helpful. Furthermore, if the data are taken at the same hour, than the X axis overwrite itself (see pic below). And yes, I do realize all these issues are the result of my initial request…sorry!

@JustinL Thank you for all the steady progress on the Quick Chart app. I discovered this code was out there only a few days ago and I've been dying for a better way to visualize certain Hubitat data than numbers on dash boards or downloading data I've put in a file to graph in excel. The charts are very useful for me. For example, I have a golf cart whose charger is plugged into a 15A Sarnoff switch that reports power. I'm able to graph out the charging curve in real time vs. writing all the data to file then graphing in excel after the fact. Very cool!

I do think I've run across a bug while using v1.0.6 where the X-axis labels disappear for numerical data like temperatures. I've seen others bump into this in this thread going way back and I'm guessing there may still be an issue or two. I don't have very much experience with Groovy, but I've dropped in a few debug statements in Quick Chart Child to hopefully help someone narrow down the root cause.

Reproducing the bug (i.e. Sparkline with numeric data displayed without X-axis labels) :

  1. Make a sparkline chart that plots two temperature sensors for Today. When working, the chart looks like this in my case:

    (I'll provide all the configuration settings if requested)
  2. Note: the bug NEVER happens when you trigger the chart manually from within the app configuration - this always works correctly! Why?
  3. The first chart I created after installing Quick Chart 1.0.6 works fine and does not reproduce the bug at all. Weird.
  4. Every numeric chart after the that first one I created seems to reproduce the bug, BUT ONLY when it does it's own periodic update (I'm using every 5 minutes for now). Here's what the chart looks like when the bug happens:
  5. To be perfectly clear, I never see this when I'm using the manual trigger in the child app settings.

Here's what I've noticed in the Quick Chart Child code and logs:

A. When the chart is adding X-axis labels correctly, the "Xaxes" setup within the "builderChart" debug output looks like this:
xAxes: [{display: true, stacked: false, type: 'time', time: {unit: 'minute', displayFormats: {minute: 'ddd HH:mm'}}, ticks: {source:'auto', fontColor: 'white'}, gridLines:{display: true, zeroLineColor: 'gray', color: 'gray'}}]
But when the bug happens it looks like this:
xAxes: [{display: true, stacked: false, type: 'time', time: {unit: 'day', displayFormats: {day: 'ddd'}}, ticks: {source:'auto', fontColor: 'white'}, gridLines:{display: true, zeroLineColor: 'gray', color: 'gray'}}]

You'll notice the good one have the time unit set to 'minute' and the bad one has it set to 'day'. Tracing this back in the code, it appears there is an issue eventChartingHandler in the chunk of code handling numeric charts. Around line 1872 you'll see this fragment of code:

        if(dataType == "rawdata") {
            if(dFormat) {
                 displayFormat = "ddd HH:mm"
             } else {
                 displayFormat = "ddd hh:mm"
             }
         }
         else {
             displayFormat = "ddd"
             displayUnit = 'day'
        }

When the bug happens, ${dataType} seems to be a null value at this check (is it out of scope?) and the displayUnit is incorrectly set to 'day'. I don't really understand why dataType is null here. I can work around the bug by changing the code to force displayUnit to "minute" and displayFormat to "ddd HH:mm".

I hope this helps you improve the app. I'm happy to provide more information if needed.

1 Like

I have a temp and humidity sensor that I was trying to create a chart for and got this error when I change the chart type to "Guage" and then manually triggered a chart

## Unexpected Error

#### An unexpected error has occurred trying to load the app. Check [Logs](http://192.168.86.205/logs) for more information.

Error: No signature of method: java.util.ArrayList.capitalize() is applicable for argument types: () values: []

I have no apps logs other then it as installed successfuly and I am not sure how to turn debug mode on as that setting is in this part the is giving the error

The various prompts seem to suggest that one can graph a "state change" as a binary value, even if the "value" that changes might be non-numeric. Is this true?

Example: A Nest thermostat which has a variable "thermostatOperatingState" which presents the values "heating" and "idle" (or "cooling" and "idle").

Try as I might, I cannot get this configured, I cannot even get the data collector to create the data file.

The logs are confusing:

app:5592024-12-11 09:37:30.497 AM errorjava.lang.RuntimeException: OAuth is not enabled for this App on line 740 (method updated)
app:5592024-12-11 09:34:18.885 AM debugDetected attribute type: [chart:string, chartLength:number, ifChart:string]
app:5592024-12-11 09:34:18.883 AM debugDetected attribute types: [chart, chartLength, ifChart]
app:5592024-12-11 09:34:18.871 AM debugIn createDataChildDevice (1.0.0)
app:5592024-12-11 09:33:28.530 AM debugIn getEvents - eventMap: [:]
app:5592024-12-11 09:33:28.528 AM debugIn getEvents - events: [] for device: Furnace_on_off_tracker_virtual_device_quick_chart - chart
app:5592024-12-11 09:33:28.524 AM debugIn getEvents - settings['theDevice']: [Furnace_on_off_tracker_virtual_device_quick_chart] - [chart] - Tue Dec 10 00:00:00 EST 2024 (1)
app:5592024-12-11 09:33:28.522 AM debugIn getEvents (1.0.0) - Event History
app:5592024-12-11 09:33:28.520 AM debug----------------------------------------------- Start Quick Chart -----------------------------------------------
app:5592024-12-11 09:33:28.511 AM debugDetected attribute type: [chart:string, chartLength:number, ifChart:string]
app:5592024-12-11 09:33:28.510 AM debugDetected attribute types: [chart, chartLength, ifChart]
app:5592024-12-11 09:33:28.503 AM debugIn createDataChildDevice (1.0.0)
app:5592024-12-11 09:33:13.126 AM debugDetected attribute type: [chart:string, chartLength:number, ifChart:string]
app:5592024-12-11 09:33:13.124 AM debugDetected attribute types: [chart, chartLength, ifChart]
app:5592024-12-11 09:33:13.117 AM debugIn createDataChildDevice (1.0.0)

Yes

The error at the top of your log suggests the issue could be that you have not enabled OAuth for the app...

OK, that's weird. A temp graph works fine, so OAuth must have been set, but looking at the list, NONE of the apps have OAuth.

So, set them again, and I will see what happens.