x axis direction on graphs


dts350z
 

Would it be a big deal to have option to flip the x axis orientation so the newest data is on the right?

I guess I'd prefer to just have the time stamp on the x axis vs. "units in the past" to the right.

Most other sensor graphs I have around the house work that way and I keep getting mentally tangled up with trying to correlate readings.

Thanks


dts350z
 

A friend of mine figured this one out.

With these changes you can display the chart data with time flowing left to right
in WebWeather.ino around line 229 in the function makeChartJs...
 
        //pb minus sign to display the data chart with time progression from left to right
        if (hours==1) dtostrf(-(120-i)/2.0,1,1,ws1);
        if (hours==24) dtostrf(-(120-i)/5.0,1,1,ws1);
        if (hours==48) dtostrf(-(120-i)/2.5,1,1,ws1);
// was 
//        if (hours==1) dtostrf((120-i)/2.0,1,1,ws1);
//        if (hours==24) dtostrf((120-i)/5.0,1,1,ws1);
//        if (hours==48) dtostrf((120-i)/2.5,1,1,ws1);
 


Howard Dutton
 

I will come back to the OCS and look into incorporating this and other suggestions/fixes.

At the moment I'm working on OnStep so this will have to wait for a little bit.


Howard Dutton
 
Edited

On Thu, Sep 3, 2020 at 03:55 AM, Howard Dutton wrote:
I will come back to the OCS and look into incorporating this and other suggestions/fixes.
This time has arrived.

All suggested changes/fixes are addressed in the code but untested.  I expect it'll all just work.
Some of these changes are kept disabled by default and must be enabled in Constants.h