Need help to graphically represent a data point

I monitor my sump pump fairly closely, one of the things I monitor is the rolling average of time in minutes between runs for the current day starting at midnight. I cannot figure out how to present that data in a typical graph.

Our ground water table is very high, my basement does not leak but I have infiltration into a sump pit from below the pit. Can go without running a pump at all as the water does not rise above the bottom of the floor in the pit. But, if I had a leak… I really need the pump.

This is how if represent it now…
image

Is there a way to get an x and y axis on this graph? It would be nice to have an x axis to represent days and a y axis to represent a range of minutes. This is several days, but there is no way to tell that from the graph.

Since you are looking for a rate of change over time, maybe a derivative sensor can get you close. As for an xy graph, a statistics graph with a day period might also work. But what would give you any and all graphs that’d you could wish would be exporting data to Grafana.

Check out ApexCharts. It is very customisable, including axis labelling.

Or the History Explorer card (this can replace your pop-up graphs too):

Wow, the second one looks amazing! But, it has gone unsupported, is it likely to work for a good while?

Oh! I didn’t realise that (I just copied my bookmark without opening it). Yeah don’t use that custom card. There is no way to know how long it will keep working.

I have the Apex chart running now. For the life of me I cannot figure out how to increase the resolution of the Y axis. I would like a smaller range between divisions, maybe 5 or 10…
image

Try this:

yaxis:
  apex_config:
    tickAmount: 10

See: https://github.com/RomRider/apexcharts-card#yaxis-options-multi-y-axis

And: https://apexcharts.com/docs/options/yaxis/

This is making me feel like an idiot… I cannot figure out for the life of me where this would be inserted… I am not sure what to do with the format of the second link you sent… Does not look like yaml to me.

No matter where I insert the yaxis I get “/// apexcharts-card version 2.0.4 /// value.yaxis is not an array”

type: custom:apexcharts-card
header:
  show: true
  title: Sump Pump history
  show_states: true
  colorize_states: true
all_series_config:
  stroke_width: 1 
graph_span: 7d
span:
  end: day
yaxis:
  apex_config:
    tickAmount: 10
series:
  - entity: sensor.sump_minutes_between_run
    data_generator: ''
  - entity: sensor.sump_run_count_24h
    type: line
    data_generator: ''

I think yaxis expects a list of mappings (one for each yaxis, but you only have one):

yaxis:
  - apex_config:
      tickAmount: 10

Tom, I have the card being accepted as valid but tickAmount is flat being ignored?

type: custom:apexcharts-card 
header:
  show: true
  title: Sump Pump history
  show_states: true
  colorize_states: true
all_series_config:
  stroke_width: 1
graph_span: 5d
span:
  end: day
series:
  - entity: sensor.sump_minutes_between_run
    data_generator: ''
  - entity: counter.sumppump
    type: line
    data_generator: ''
yaxis:
  - apex_config:
      tickAmount: 10

This is the chart that is presented…
image

Your graph is showing 10 tick intervals. That is the expected behavior. Please read the documentation Tom linked.

tickAmount: Number
Number of Tick Intervals to show

So, I did not know what to describe… that is on me. But, I have been reading docs and about every post here I can read. I needed stepSize, but as you can see it is not working in my example… From my config I would expect the side bar to take 10 even steps from 0 to 100. I am getting 10 steps less than 10 to the max value . While it is redrawing the graph, for a short time I see an empty graph with y axis of 0-100 in even steps of 10. I guess what I am wanting to see is a y axis that is arbitrary numbers, not based upon my data fields. It looks like I could maybe use the function option to define a static y axis, but I really have no idea what to put in for a function.

To make matters worse, every time I make a change under yaxis I have to touch each of the properties and delete the spaces in front of them and put the spaces back for them to register the change.

From the docs:

One more example of stepSize ignoring my config…

type: custom:apexcharts-card
header:
  show: true
  title: Sump Pump history
  show_states: true
  colorize_states: true
all_series_config:
  stroke_width: 1
graph_span: 5d
span:
  end: day
series:
  - entity: sensor.sump_minutes_between_run
    data_generator: ''
  - entity: counter.sumppump
    type: line
    data_generator: ''
yaxis:
yaxis:
  - apex_config:
      stepSize: 10
      forceNiceScale: true
      tickAmount: 10
      max: 100

I have been running HA for many years and have a couple hundred automations, many of them are fairly complex with multiple choices and I have many sensors, bulbs, controlled outlets and motion and occupancy based actions. There are times I hit a brick wall of frustration with HA and this is one of them. I am getting old and tired, maybe I should just stick with what works and makes sense to me and not worry about things above and beyond. I love several of the things added by good programmers to HACS, but some are just above me.

Sorry to rant, but I spend enough time during the week in front of computers, at home I relax with them and today has not been relaxing at all. I love the challenge of a good automation, but making graphs pretty and any type of data mining… do not love it and really do not understand the add on.

Current dashboard… Just felt that I could maybe represent the data from the 2 charts better and clean it up a little. Maybe I will still use what I have in place of the 2 other charts.

1 Like

Did you get the the bottom of the stepSize question? Same issue on mine - would love to be able to have it so that a temperature graph displays grid lines on the nearest degree C so its easier to read!

Nope, finally gave up on it. Still have the graph, but I am mainly using the graph on the left side. Will likely remove the other one.