MySolar and MyElectric 'today' button

So what is ‘Month’ then?

SInce midnight, on the 1st of the current month to now

Midnight local / user or UTC (the former I guess)?

That was what I suggested above. However, that does not answer your question -

unless you look at 23:59 on the last day of the month - hence my suggestion of M-1 as one of the periods.

I’ve added a dropdown menu for the period selector in place of the buttons:

We could still have the buttons in the expanded view if we think that’s better?.. I’ve left it as a dropdown for the time being

1 Like

Thanks @stuart for the recent changes, including the stepped line graph for the tariffs! :slight_smile:

1 Like

No problem.

I absolutely HATE the Jquery FLOT graphs though!

I’ve been using Apache eCharts recently and find it really powerful, so many graph types and options, take a look at some of the examples/demos

https://echarts.apache.org/en/index.html

2 Likes

Wow Apache eCharts looks nice! and great its open source, so many different options! Good to know its available

1 Like

thumbsup thumbsup

I couldn’t resist trying out the Octopus graph using the eChart library… Works very similar to flot, and the data arrays port straight over.

1 Like

Whats the total library size compared to flot?

Based on this https://cdnjs.cloudflare.com/ajax/libs/echarts/4.7.0/echarts.min.js
its 760KB uncompressed, gzipped its 236KB.

There are smaller versions of the library if you only want selected features, for example https://cdnjs.cloudflare.com/ajax/libs/echarts/4.7.0/echarts.simple.min.js

is 313KB (102KB compressed)

As it currently stands (on emoncms) the flot library has 4 separate SCRIPT tags

  • jquery.flot.min.js - 40K
  • date.format.js - 4K
  • jquery.flot.selection.min.js - 5.2K
  • jquery.flot.time.min.js 6.9K

So eCharts is definately larger compared to flot at 56.1KB.

Just trying out the “dataZoom” feature - gives a neat slider bar at the bottom of the graph for picking date ranges and window sizes

Highcharts. has that feature. That’s one I really like.
Sure would be nice to see eCharts used in emonCMS. Would be one helluva step up!

1 Like

Thanks @stuart though the totality of all the flot components in the flot directory seems to be 1.1MB so could end up being less or comparable. Interesting.

Do you think you could make your changes available as a branch to test?

We have a lot of other development priorities at this point in time so its not a switch I think we would make in haste, need to get them finished first, but it’s interesting to consider for the future.

1 Like

I’ve already checked in what I’ve done in my branch. It’s just for testing!

2 Likes

Given the negative tariff on todays electric I had fun trying to maximise the income!

I ran out of things to plug in!!

I’ve used 24.1kwh at a cost of £ -0.57 (negative) - at one point I was pulling 18kw from the grid along with 3.3kw of solar.

2 Likes