Hubigraphs 4.8 (The Final Chapter)

@FelipeT, Fixed. New Version of Line Graphs uploaded

1 Like

Thanks Thomas!

FYI I think the number of lines is approximate. If they don't fall on reasonable values (not sure what exactly that means), the number gets adjusted.

You are correct; but it was broken. With the fix, I put in 20 and got 13, 40 gave me 32. Turns out Google Charts takes the number as a recommendation. What are you gonna do?

I was trying to use two axis (left and right) and force them to have same number of lines, so the graph would be cleaner and one same line would used by both axis.

Considering that Google Charts just use the number as an input to calculates one more appropriate for each case (as @BrianP said) , I don’t know if I will get what I was looking for.

By the way, it was just an adjustment, not a dealbreaker.

With version 1.82 my errors for null opacity are gone, thanks.

Still can't get it to plot on the Chromebook, not sure if it is just being on Chrome OS or the age of my Chromebook. I have another Chromebook that I will try out in early July and report back.

Yea, I understand. I spent a few hour in the past trying to “line up” the right and left axis. What I found is setting both Axis with the same span or same logical span worked. Example: If the min was zero and the max was 100 on the left, then the right was min: 200 and the max was 2000. Make sense? I can look at it later today, I find it enjoyable to figure out how this stuff actually works....

1 Like

@dtbrewer, unfortunately I do not have a chrome book so I have no way to figure out what is going on. My guess from reading the online forums is that there is something in the JavaScript it doesn’t like...

If I install via package manager, do I still need to to this, or is this taken care of via package manager?

EDIT: Or am in not meant to install via package manager and instead install via the instructions and then use package manager to just keep it up to date?

I manually added hubigraph.js to the local file manager and updated the app/drivers through HPM (I had a previous version of the app and drivers already installed through HPM).

@saxnix, @marktheknife. The package manager does not support loading Hubigraph.js (you will need to follow the directions and do it manually). Notice the name; case matters. If you call it hubigraph.js it will not work. It should be a one time event. I have updated the package 10 times since that build came out and HubiGraph.js did not need updating. Enjoy :wink:

1 Like

Yup, it worked perfectly for me when I added the .js file, thanks. Good thing I followed directions and capitalized the file name when I actually added it :rofl:.

Just to confirm, the rest of the app can be installed via package manager?

Step 1 - install app via package manager
Step 2 - upload file as per instructions in post 1

Yes.

1 Like

Finding something odd with a timeline graph on the setup (app) screen. About 1/4 of the screen contains the graph - works great! But the rest is just a blank screen... Is there something that I can do to fix that, or is it an issue with the code?

Here’s a screen shot of part of the problem. There is more graph on top and more empty screen below.

That is just the scaling of the preview window; it is a simple fix, I’ll get to it... The actual graph (website or tile) is unaffected.

1 Like

So I'm really confused, trying to figure out what sets the height of an element to be at least 150px.

I saw that the "timeline" div is where the Google Chart gets added (in this case, with the Range Bar plot), at:

if (options.graphType == 1) {
    chart = new google.visualization.BarChart(document.getElementById("timeline"));
} else {
    chart = new google.visualization.ColumnChart(document.getElementById("timeline"));
}
//if we have a callback
if(callback) google.visualization.events.addListener(chart, 'ready', callback);

chart.draw(dataTable, options.graphOptions);

I also see the "timeline" div gets added shortly after that with:

  <body style="${fullSizeStyle}">
      <div id="timeline" style="${fullSizeStyle}" align="center"></div>
  </body>

What I can't figure out, is why there is a div inside of there that has its height set to a minimum of 150px:

Summary
<div id="timeline" style="margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden" align="center">
  <div style="position: relative;">
    <div style="position: relative; width: 68px; height: 150px;" dir="ltr">
      <div style="position: absolute; left: 0px; top: 0px; width: 100%; height: 100%;" aria-label="A chart.">
        <svg width="68" height="150" style="overflow: hidden;" aria-label="A chart.">

Inside the "timeline" div there's another div, then inside that one is a div with the height set to a minimum of 150px, which is the height of the SVG inside there. The thing that's really odd, is that the width does not have a minimum value.

I tried changing the loading screen to see if reducing its size might help, but I still got the same result. I'm not sure where else to look for how this gets a minimum height value. A simple Google Charts call will resize to a very small div on a sample page (not in an iframe). Any place else to look for this issue?

This is something in the Firefox browser where the tile container height is not set. That causes a default setting to explicitly restrict the size, but only on Firefox. Weird, I know.

All of the above is speculation based on comparing the html generated by Firefox and that generated by Chrome. Both browsers try to be “helpful” in different ways...

Getting the following error with a new line graph. Then it stays stuck at 3/4:

[error] groovy.lang.MissingMethodException: No signature of method: java.util.Date.div() is applicable for argument types: (java.lang.Integer) values: [1] Possible solutions: is(java.lang.Object), wait(), find(), dump(), any(), wait(long) on line 601 (getData)

It is composed of switches, motion and light sensors all with default settings (100 On / 0 off)

Anything I should do, or try?

Running version 1.82

Set “Maximum number of points” to zero. There is an incompatibility with that setting that I need to fix

1 Like