Is there a simple way (does someone have example code) to have a horizontal dotted line in the diagram to display a threshold? I would assume that it just needs a single value via the data generator which is then prolonged endlessly, but I am not sure how this would practically look like
Do i do this correctly?
I want to update the chart not at every change (this works, but is way to often with my sensor).
When i insert the update_interval: 5min nothing updates at all. Delete it - it updates again with every sensor update.
- type: custom:apexcharts-card
update_interval: 5min
header:
title: test (48h)
I’m currently configuring my first chart and I have a question: my chard displays only one sensor data for period of 2 days. Is it possible to display max value of sensor on the right side of div id=header__states and how to do that?
The help of the transform function says: With transform, you can modify raw data comming from Home-Assistant’s history using a javascript function.
I try to use that to draw a line that is always 4 points below another sensor being displayed in the same graph. But I would expect that this considers also the history and therefore moves up and down as per the reference sensor, but it doesn’t - instead it draws a straight line where the last point of the reference sensor is. Have I misunderstood something?
The red line should move up and dosn with the blue line, 4 points below. But it remains a straight line.
Btw., the help on the github page is not really clear about the statements of the transform function, thas was quite some try and error to get at least anything displayed.
Hello! With my Heat/AC pump model Daikin there was created a sensor named “sensor.daikinap42587_heat_energy_consumption”.
And according to this site It do show me the energy kwh per hour:
In the chart below I only want one series to be drawn in the graph, and that is “Aktuell förbrukning”. The other two, “Easee-laddning” and “Ampere fas 1” should only be shown in the header. The problem is that the yaxis get’s a scale that also takes “Ampere fas 1” into consideration.
One work around would be to use max: 5 but since I already have min: 0 I haven’t been able to combine them. Code below, all help with getting this to look correct would be appreciated.
Hi I have a string of dates and I’m trying to parse them onto the chart. On the javascript compiler, it works fine, but when I try to use it in a data_generator it would just load infinitely.
The string is: "2022-02-17 04:00:00+02:00 2022-02-17 02:00:00+02:00 2022-02-17 03:00:00+02:00"
However this chart is stuck at Loading… Any suggestions?
Thank you!
EDIT: I believe the problem was that I needed to add .state next to entity return entity.state.split
the graph now loads however it doesn’t show any data
The red line is supposed to be parallel to the blue line, because it takes the blue line minus 4. Where is this time shift coming from? And as soon as the blue line goes down to 44 again, the red line does also change for the past.
There does not seem to be that much support here for that otherwise great project, many questions but only few answers
This comment is very unfair to the author of ApexCharts.
I think we can agree that RomRider is a developer who answers most questions in his limited time.
By the way, I had the same problem as you and I found the solution by searching this thread.
I wish you success .
Hi,
I store daily values on a simple database, 2 columns date and value. I’ve created a sensor that returns the values based on a selected month (input_select) and return the values from that month. Till here all work fine.
I’m now trying to create the graph showing the selected month.
If I query the last 30 days it work without issues, the problem is if I select a specific month, as I I can’t manage to define the xaxis range, it always show the latest 30days (defined on graph_span) and not the values on queried interval.
Does anyone have any tip to overcome this? I’ve search a solution but couldn’t find so far.
Many thanks in advance
This is not against the author personally. Compared to e.g. button-cards, where always someone has an answer, I just see a mismatch of people that try to use this and people that have the necessary experience with this. Scroll up and you see more than a week of multiple questions by multiple people, no reply on any of them.
But thanks for sharing the solution. “I know something, but I don’t tell you”.
Has anyone been able to remove the red part below? Feels like the date information is unnecessary to show twice? Or is it possible to show the value in the red part and skip the top tooltip?
I have a slight problem.
I have one chart that measure my heat pump energy “per hour” and one for “per day”.
And it didnt match what numbers the heat pumps own app said.
The heat-energ-sensor gives me the pumps kWh per hour.
But when I look more into it it seems that the chart takes the value in the “00:00:00” and put that value in the next day. But that is wrong and the first value for the new day should be at “01:00:00”.
How do I tell the chart to do this?
hm, nope it still count that data from 00:00 from the day before.
Do I need to remove something when adding it?
If I set the duration to 23 hour I get the correct sum of the kWh this current day! But is that the real solution here? hm…
Unfortunately the library I use doesn’t allow to hide a serie from the legend.
Only way would be to set the number of ticks I believe
If the color threshold give a weird look, it’s because you have null data in your chart, that could be fixed with fill_raw: last
For your other question, you have the option to create a gradiant with options from here
That’s not possible unfortunately. One way to hack it is to make 2 series, on which filters out everything that is >0 and displayed as an area and the other one which filters everything that is <0 and displayed as a line
Not sure I understand what you want to achieve
Why not create a utility meter which resets every hour? (not sure it’s possible though)
Why not use an annotation to highlight a band in the chart?
You’ll need to prepend the current value with the current timestamp in the data generator
Not possible to skip a period on the timeline unfortunately. You could however stack the 3 days on top of each other using offset and reduce the timeline to only 6-22 in this case
You could use card-mod for that
You can use group_by with the diff function and a duration of 1d
You can remove the legend with:
apex_config:
legend:
show: false
Not at the moment, but I might add templates like in button-card at some point
That is something that might be able to fix, please open a feature request
Not possible at the moment, please open a feature request
The gradient configuration supports to be defined as an array, that’s the way to fix your issue