The graph looks very close to what I want when I use layout:minimal (see above). But using layout makes impossible to use any custom settings, incl those in apex_config. For this instance, it’s not possible to set min and max for each axis.
Se next image, which is based on the same code. the difference is only in existence of layout attribute.
Shouldn’t it work opposite way? Shouldn’t layout be allowed to be overridden by custom parameters?
I decided to go harder way exploring every apex config parameter. This is what I’ve achieved so far
area under graph: it remains even after moving the legend to the top
area on the left side of the graph. it remains after disabling rendering of Y-axis legend and ticks. Actually the margin remains on both sides.
Interestingly, changing minWidth/maxWidth and minHeight/maxHeight of labels to zero has impact on graph rendering even since rendering labels is disabled (show: false). Image above reflects those values set to zeroes. Without that, left and bottom margins are even bigger.
I recently discovered this wonderful card which so far does a very good job for me.
I have a scenario that I wonder if it’s feasible.
For my swimming pool, I have a water temperature sensor, and a pump activated sensor.
Being plugged somewher on the circuit pipes, the temperature sensor only have relevent information when the pump is activated.
I’m able to graph the pump status, and the temperature.
I’d really like to filter the temperature data to whether pump is activated.
I use ApexCharts to plot the humidity in my bathroom. A rule runs on a Tasmota flashed switch to turn on a fan in the bathroom when the humidity reaches a threshold and runs until another humidity threshold is reached. The switch pushes out on/off messages. Is it possible to overlay the on (say 1) and off (say 0) value onto the humidity graph?
- entity: switch.fan1
transform: 'return x == ''on'' ? 1 : 0;'
type: area
curve: stepline
stroke_width: 0
=> draw switch.fan1 history by transforming on/off status to 1/0 decimal value. Draw as area/stepline/0 width to hightlight the whole vertical area of the graph.
=> for the fan serie, don’t show the y axis but have 0 value on the bottom and 1 on the top.
You have to adapt the yaxis item to match your series index, ie is the serie is the 2nd serie, don’t forget to have a yaxis config for the 1st serie first
I am trying to find some speed optimizations. I have a very slow tablet for my Wall Panel instance, and it seems the ApexCharts is somewhat resource hungry. Everything works per se and looks great, but all the animations on the panel slow down when the ApexCard starts updating. I figure I might give up on some details, in order to speed things up.
Caching should already be used, but seems that there is still a lot happening on each update for some reason.
Assuming the transform etc calculations take place in the end device rather than on the home assistant runner, it might make sense to do groupings by etc on the assistant runner machine instead of in each client. Anyone that has had any similar concerns, or some best practices to share? Or is there some way to make the caching even more effective - only update with new info for instance?, which I guess would take away the need for more specific solutions…
I want to log the daily increase of the corona infections, also i would like the graph to show how much the increase or decrease is of the infections relative to previous day… I have no idea where to start. Could anyone help me with this?
yeah, partially my bad. it’s yaxis.
With yaxis it might be tricky. It might depends on number of y/axes. If there are more than one you may need to set attributes it for each one separatelly - at least try it. see my mentioned example.
If still not work provide complete code of your card.
Now I’m looking at my code and there is no disabling lines for yaxis… maybe other options do that
anyway if you copy apex_config from my source code it has to work. I did that trying all options from apex configuration. some are unnecessary others are.
That is disabling the dotted horizontal lines. Sadly, there doesn’t seem to be any available styling option, like solid or color. So it’s just on or of (for now).
There is:
Could somebody help me fix this problem ?
I have 2 entities, but for some reason for the line chart it adds an extra value, which is always the same as the one before that (being ‘today’ in this case)
Has anybody tried to use ApexChart Card to create a chart from data directly in InfluxDB?
For example using data_generator to run a query using the Influx API.
I periodically load my electricity usage and cost data from Octopus into InfluxDB. At the moment I create a chart in Grafana and integrate it into a HA dashboard via an iframe but its formatting options are limited and would require compromising security in order to see the graphs in the dashboard from outside my home network.
You could, but you have to write the javascript yourself There’s no “native” integration of apexcharts with influxDB. I wanted to do it at some point, but the native influxDB javascript library is waaaay to big (1.5MB!!) to add to the already heavy apexcharts
In the end, influxDB is only using HTTP requests, so it should work if you can write the appropriate code in data_generator
Hi, I am trying to graph solar monthly production, but if I type duration 1month it crashes HASS, or if it paste 1month it doesnt crash HASS but the results are not correct.
It now shows the correct monthly generation, but when I hover the mouse over the bar, the hover box has the date as mid month - eg Jan 16 2021 4:30pm. Is it possible to change this so it only has month and year - eg Jan 2021 ?
Hello,
I need some help, if possible.
I’m trying to build a graph using info from a query to a db using the sensor sql.
I’ve manage to create the sensor with the string “data_generator” format, but I’m not being able to create the graph using the sensor. I’m not able to pass the sensor values in a way that Apexchart can read it as “data_generator”. Below a screen shot of sensor.